I use JBuilderX. It has a wizard which can generate a class encapsulate the JMS 
service. The class implements MessageListener. Anyone who has JBuilderX can have a 
try. Use the wizard to generate the class without any Transaction or Persistance. 
Let's take topic as an example.
if we just
while(true){
  [TheClassGenerated] jmsService=new [TheClassGenerated]();//hard code parameters 
inside the class
  jmsService.publishObject(new String("this is a demo");
  jmsService.close();
}//the jndi inside should be modified

This would surely generate Exception
org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (jav
a.net.BindException: Address already in use: connect)
        at org.jboss.mq.Connection.authenticate(Connection.java:883)
        at org.jboss.mq.Connection.(Connection.java:238)
        at org.jboss.mq.Connection.(Connection.java:315)
        at org.jboss.mq.SpyConnection.(SpyConnection.java:60)
        at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnection
Factory.java:78)
        at sgipwrapper.core.MsgTransfer.getTopicConnection(MsgTransfer.java:95)
        at sgipwrapper.core.MsgTransfer.getTopicSession(MsgTransfer.java:87)
        at sgipwrapper.core.MsgTransfer.publishObject(MsgTransfer.java:216)
        at sgipwrapper.core.callback.EvtDeliverCallBack.hook(EvtDeliverCallBack.
java:53)
        at com.caimao.spapi.core.op.recv.recving(recv.java:163)
        at com.caimao.spapi.core.op.recv$2.run(recv.java:53)
        at com.caimao.spapi.core.op.recv$1.run(recv.java:22)
        at java.lang.Thread.run(Thread.java:534)
Caused by: java.net.BindException: Address already in use: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at java.net.Socket.(Socket.java:309)
        at java.net.Socket.(Socket.java:153)
        at javax.net.DefaultSocketFactory.createSocket(DashoA6275)
        at org.jboss.mq.il.oil.OILServerIL.createConnection(OILServerIL.java:563
)
        at org.jboss.mq.il.oil.OILServerIL.checkConnection(OILServerIL.java:507)

        at org.jboss.mq.il.oil.OILServerIL.authenticate(OILServerIL.java:289)
        at org.jboss.mq.Connection.authenticate(Connection.java:876)
        ... 12 more

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3833792#3833792

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3833792


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to