Websphere MQ Everyplace

examples.osgi.client
Class MQeClientBundleActivator

java.lang.Object
  |
  +--examples.osgi.client.MQeClientBundleActivator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class MQeClientBundleActivator
extends java.lang.Object
implements org.osgi.framework.BundleActivator

Example Bundle Activator. Shows how to start an MQe Application within the OSGI framework Example shows how to:

  . start and configure the MQeClientApp
  . stop the MQeClientApp
 


Field Summary
static short[] version
           
 
Constructor Summary
MQeClientBundleActivator()
           
 
Method Summary
 void start(org.osgi.framework.BundleContext context)
          Called by the framework when this bundle is started.
 void stop(org.osgi.framework.BundleContext context)
          Called by the framework when this bundle is stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version
Constructor Detail

MQeClientBundleActivator

public MQeClientBundleActivator()
Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Called by the framework when this bundle is started. It takes the value stored in the java properties:
  . examples.osgi.server.port 
  . examples.osgi.server.address 
       
 
and passes these to the application. Under the covers this is the port and address that is used to configure the MQe connection definition to the servers queue manager. It should be the same port number that the server is configured with. These properties should be setup before the bundle is started. If not set then the default values are port 8085 and address 127.0.0.1

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
context - org.osgi.framework.BundleContext, BundleContext.
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Called by the framework when this bundle is stopped. It shutsdown the underlying MQeQueueManager if one was started in the start method.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
context - org.osgi.framework.BundleContext, BundleContext.
java.lang.Exception

Websphere MQ Everyplace