Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JMS TopicConnection problem while running in standalone

484 views
Skip to first unread message

panne...@gmail.com

unread,
Mar 26, 2008, 10:16:17 AM3/26/08
to
Hi friends,<br />
I am new for websphere and I wrote one sample standalone program for asynchronous JMS messaging for WebSphere 6.1 V. while running this program I am not able to get the TopicConnection object and it is falling into infinite loop and it is not throwing any exceptions also.<br />
<p />
public static void main(String[] args) <br />
{<br />
Hashtable&lt;String, Object&gt; properties = new Hashtable&lt;String, Object&gt;();<br />
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");<br />
properties.put(Context.PROVIDER_URL, "iiop://localhost:2809");<br />
properties.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");<br />
<br />
try<br />
{<br />
InitialContext context = new InitialContext(properties);<br />
<br />
TopicConnectionFactory factory = (TopicConnectionFactory)context.lookup("SampleTCF");<br />
System.out.println("Factroy object retrived.");<br />
<br />
TopicConnection connection = factory.createTopicConnection(); <b>&lt;============== Here is problem</b><br />
System.out.println("Connection object created");<br />
<br />
TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);<br />
Topic topic = (Topic) context.lookup("SampleTopic");<br />
TopicPublisher publisher = session.createPublisher(topic);<br />
<br />
TopicSubscriber subscriber = session.createSubscriber(topic);<br />
subscriber.setMessageListener(new MessageListener()<br />
{<br />
public void onMessage(Message message)<br />
{<br />
TextMessage msg = null;<br />
if(message instanceof TextMessage)<br />
{<br />
msg = (TextMessage) message;<br />
try {<br />
System.out.println("Message Received.");<br />
System.out.println(msg.getText());<br />
} catch (JMSException e)<br />
{<br />
e.printStackTrace();<br />
}<br />
}<br />
}<br />
});<br />
connection.start();<br />
<br />
TextMessage message = session.createTextMessage();<br />
message.setText("Sample Message");<br />
publisher.publish(message);<br />
System.out.println("msg published.");<br />
<br />
}catch(Exception e)<br />
{<br />
e.printStackTrace();<br />
}<br />
}<br />
<p />
<b><u>The following is the o/p I'm getting.</u></b><br />
<br />
Factroy object retrived.<br />
Mar 26, 2008 7:24:40 PM com.ibm.ws.channel.framework.impl.WSChannelFrameworkImpl<br />
AUDIT: chain.started<br />
<br />
<b>(its in infinite loop)</b><br />
<br />
Anyone pls help me........

tom.e....@macys.com

unread,
Apr 16, 2008, 1:06:52 AM4/16/08
to
Did you solve it? I got this problem too.

panne...@gmail.com

unread,
Apr 18, 2008, 5:04:33 AM4/18/08
to
Yes, I solved this problem.

Using IBM JMS Client you can acheive JMS messaging outside the container.

download JMS Client and Getting Started on the following link,

http://www-1.ib m.com/support/docview.wss?uid=swg24012804

regards,

Panneer selvam.

aruna...@in.ness.com

unread,
Jun 12, 2008, 8:26:14 AM6/12/08
to
Hi,

I am getting the same message for JMS QueueConnection problem while running in standalone.

Please help me.. it is urgent for me..

Message on ecliplese console:

Jun 12, 2008 5:22:03 PM com.ibm.ws.channel.framework.impl.WSChannelFrameworkImpl

AUDIT: chain.started

#######################################################

Message on SystemOut.log file:

6/12/08 5:30:16:341 CDT 0000002b SibMessage E [:] CWSIJ0042E: A connection from host 10.132.0.119 on transport chain InboundBasicMessaging has been terminated after it became unreponsive after a period of 7 seconds.

6/12/08 5:30:16:359 CDT 0000002b SibTr$Suppres I CWSIU0002I: Future occurences of the CWSIJ0042E message will be suppressed for the next

##############################################

Please suggest me...

Thanks a lot in advance.

Regards,

Arun

duangai...@sina.com

unread,
Jul 3, 2008, 9:28:50 PM7/3/08
to
i download the IBM Client for Java Message Service on Java 2 Platform,install it,and To compile JMS code, include the following jar files in the CLASSPATH "sibc.jms.jar",then another exception was found :

Exception in thread "main" java.lang.NoSuchMethodError: com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()Z

at com.ibm.ejs.oa.EJSORBImpl. (EJSORBImpl.java:223)

at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)

at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:309)

at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFa ctory.java:400)

at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)

at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)

at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)

at javax.naming.InitialContext.lookup(InitialContext.java:351)

at com.topnet.dxp2.que.test.test.init(test.java:54)

at com.topnet.dxp2.que.test.test.main(test.java:38)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

please helpe me,thank you

gsattu

unread,
Oct 16, 2008, 2:49:26 PM10/16/08
to
Hi,
I am getting a similar error message
" E UOW=null source=com.ibm.ws.sib.utils.ras.SibMessage org=IBM prod=WebSphere component=Application Server thread=[SIBFAPThreadPool : 258]
[:] CWSIJ0071E: A connection to host 127.0.0.1 on port 7277 using transport chain BootstrapBasicMessaging has been terminated after it became unreponsive after a period of 7 seconds."

Curious to know if you found the solution.

thanks
Satish

0 new messages