|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
siBus - non-web-environment |
« View previous topic :: View next topic » |
Author |
Message
|
semasaba |
Posted: Wed Jun 11, 2008 11:56 pm Post subject: siBus - non-web-environment |
|
|
Novice
Joined: 21 May 2008 Posts: 17
|
Hey guys,
I have a normal web-environment and get the connection to the siBus via jndi.
I also have some standalone applications or batchjobs.
Is it also possible to connect with the siBus in non-web-environment?
Thx |
|
Back to top |
|
 |
JLRowe |
Posted: Thu Jun 12, 2008 1:01 am Post subject: Re: siBus - non-web-environment |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
semasaba wrote: |
Hey guys,
I have a normal web-environment and get the connection to the siBus via jndi.
I also have some standalone applications or batchjobs.
Is it also possible to connect with the siBus in non-web-environment?
Thx |
You mean, can you connect from outside a J2EE container, without JNDI, the answer is yes and it is all detailed in the docs. |
|
Back to top |
|
 |
semasaba |
Posted: Thu Jun 12, 2008 3:08 am Post subject: |
|
|
Novice
Joined: 21 May 2008 Posts: 17
|
Try this answer next time:
Over IP:
JmsConnectionFactory jmsCF = JmsFactoryFactory.getInstance().createQueueConnectionFactory();
jmsCF.setBusName("MyBus");
jmsCF.setProviderEndpoints("localhost:1234");
Connection conni = jmsCF.createConnection();
Over JNDI:
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL,"iiop://localhost:2810");
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put("java.naming.corba.orb",org.omg.CORBA.ORB.init((String[])null,null));
JmsManagedConnectionFactoryImpl cf1 = (JmsManagedConnectionFactoryImpl)initialContext.lookup("jms/MyTopicFactory");
Connection conni1 = cf1.createConnection();
import following jars:
com.ibm.ws.sib.utils_2.0.0.jar
com.ibm.ws.webservices.thinclient_6.1.0.jar
ibmorb.jar
ftp://ftp.software.ibm.com/software/websphere/appserv/support/tools/JMSclient/GettingStarted.html
Cheers!!! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|