Using JBossAS 4.0.4GA and EJB3 RC8 FD. 

1.

  | public static void main(String[] args) throws Exception
  | {
  | InitialContext ctx = new InitialContext();
  | QueueTestRemote tester =
  | (QueueTestRemote)ctx.lookup(QueueTestRemote.class.getName());
  | 
  | ProducerObject po = (ProducerObject)tester;
  | ProducerManager manager = po.getProducerManager();
  | 
  | manager.connect(); // internally create a JMS connection
  | try
  | {
  | tester.method1("hello world", 55);
  | }
  | finally
  | {
  | manager.close(); // clean up the JMS connection
  | }
  | }
  | 

Are we invoking same server 'tester' instance?
- ProducerManager manager = ((ProducerObject)tester).getProducerManager();
- tester.method1("hello world", 55);

Calling two different methods?
It must be stateful, since if it would be like stateless sesion bean -
you are not guaranteed to get the same server instance twice. And we would 
could actually be opening and closing totally different manager instance from 
the one that the second tester invocation (tester.method1(...)) is referencing.
Or am I wrong?

2.

Should I connect and close on every Producer method invocation - no need then 
for ExceptionListener?
Or is there a way to set ExceptionListener on connection (producer) if I only 
connect at app startup and close on undeploy / destroy.

Since I have this strange problem - for no particular reason system time on our 
Linux machine jumps more than 60s in the future (no idea why) - and my JMS 
collapses:


  | 2006-06-14 19:10:06,263 WARN [org.jboss.mq.Connection] Connection failure, 
use javax.jms.Connection.setExceptionListener() to handle this error and 
reconnect
  | org.jboss.mq.SpyJMSException: Cannot ping the JMS server; - nested 
throwable: (java.io.IOException: Client is not connected)
  | at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:78)
  | at 
org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:63)
  | at org.jboss.mq.Connection.pingServer(Connection.java:846)
  | at org.jboss.mq.Connection$PingTask.run(Connection.java:1281)
  | at 
EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
  | at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.io.IOException: Client is not connected
  | at 
org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:265)
  | at org.jboss.mq.il.uil2.SocketManager.sendReply(SocketManager.java:239)
  | at org.jboss.mq.il.uil2.UILServerIL.ping(UILServerIL.java:488)
  | at org.jboss.mq.Connection.pingServer(Connection.java:842)
  | ... 3 more
  | 2006-06-14 19:11:06,267 WARN [org.jboss.mq.Connection] Connection failure, 
use javax.jms.Connection.setExceptionListener() to handle this error and 
reconnect
  | org.jboss.mq.SpyJMSException: No pong received; - nested throwable: 
(java.io.IOException: ping timeout.)
  | at org.jboss.mq.Connection$PingTask.run(Connection.java:1277)
  | at 
EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
  | at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.io.IOException: ping timeout.
  | ... 3 more 
  | (and so on and on ....)
  | 

Rgds, Ales

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

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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to