Alright, after many many hours of digging around, I found out the JBoss 
extension of the EJB3 MDB annotations from wiki. I cleared the jboss.xml and 
ejb-jar.xml file and used only the EJB3 annotations. My MDB now looks like:

  | @MessageDriven(name = "notificationMDB", activationConfig = {
  |                                                                           
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = 
"javax.jms.Topic"),
  |                                                                           
@ActivationConfigProperty(propertyName = "destination", propertyValue = 
"topic/notificationTopic"),
  |                                                                           
@ActivationConfigProperty(propertyName = "user", propertyValue = "user"),
  |                                                                           
@ActivationConfigProperty(propertyName = "password", propertyValue = "pass"),
  |                                                                           
@ActivationConfigProperty(propertyName = "noLocal", propertyValue = "true") })
  | @ResourceAdapter("jms-ra.rar")
  | public class NotificationMDB extends BaseServiceBean implements 
MessageListener {
  | 
  |     public void onMessage(Message message) {
  |             System.out.println(message.toString());
  |     }
  | 
  | }
  | 

As you can see, I didn't configure it as Durable to test it out. It deployed 
fine without error, and it received a message okay. But then it gives out a 
nasty error:

  | 13:39:30,290 WARN  connectionmanager.SimpleConnectionManager - A problem 
has been detected with the
  | connection to remote client 4co2mt-vld24e-exm5wy4h-1-exm5xes0-5. It is 
possible the client has exite
  | d without closing its connection(s) or there is a network problem. All 
connection resources correspo
  | nding to that client process will now be removed.
  | 13:39:30,300 ERROR util.ExceptionUtil - ConsumerEndpoint[-2147483628] close 
[4co2mt-vld24e-exm5wy4h-
  | 1-exm5yc1o-o]
  | java.lang.RuntimeException: Failed to obtain lock
  |         at 
org.jboss.messaging.core.local.PointToMultipointRouter.remove(PointToMultipointRouter.jav
  | a:166)
  |         at org.jboss.messaging.core.local.Topic.remove(Topic.java:126)
  |         at 
org.jboss.messaging.core.local.CoreSubscription.disconnect(CoreSubscription.java:111)
  |         at 
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.close(ServerConsumerEndpoint.java:36
  | 0)
  |         at 
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.remove(ServerConsumerEndpoint.java:5
  | 43)
  |         at 
org.jboss.jms.server.endpoint.ServerSessionEndpoint.close(ServerSessionEndpoint.java:403)
  | 
  |         at 
org.jboss.jms.server.endpoint.ServerConnectionEndpoint.close(ServerConnectionEndpoint.jav
  | a:300)
  |         at 
org.jboss.jms.server.connectionmanager.SimpleConnectionManager.handleClientFailure(Simple
  | ConnectionManager.java:158)
  |         at 
org.jboss.jms.server.connectionmanager.SimpleConnectionManager.handleConnectionException(
  | SimpleConnectionManager.java:208)
  |         at 
org.jboss.remoting.ConnectionNotifier.connectionLost(ConnectionNotifier.java:46)
  |         at org.jboss.remoting.Lease$LeaseTimerTask.execute(Lease.java:133)
  |         at org.jboss.util.TimerQueue$TimerTaskLoop.run(TimerQueue.java:181)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.lang.InterruptedException
  |         at 
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire(WriterP
  | referenceReadWriteLock.java:234)
  |         at 
org.jboss.messaging.core.local.PointToMultipointRouter.remove(PointToMultipointRouter.jav
  | a:161)
  |         ... 12 more
  | 

>From that point on, the messages are not delivered to the MDB anymore. It 
>looks like a connection not closed problem, but it is out of my control as it 
>is a MDB, I don't create a connection in my code.

I always feeled that JBoss' products are very solid. But a easy MDB deployment 
is taking me days and still no clue. Very frustrated.

Another thing is, I looked into the source code of SimpleConnectionManager, and 
it is a very short class. It apparently does not have a line 208. Seems that 
the source code in the download is not the one been compiled?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008969
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to