ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » siBus - non-web-environment

Post new topic  Reply to topic
 siBus - non-web-environment « View previous topic :: View next topic » 
Author Message
semasaba
PostPosted: Wed Jun 11, 2008 11:56 pm    Post subject: siBus - non-web-environment Reply with quote

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
View user's profile Send private message
JLRowe
PostPosted: Thu Jun 12, 2008 1:01 am    Post subject: Re: siBus - non-web-environment Reply with quote

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
View user's profile Send private message Send e-mail
semasaba
PostPosted: Thu Jun 12, 2008 3:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » siBus - non-web-environment
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.