4 Replies Latest reply on Mar 31, 2009 10:57 AM by David

    Persistenceprovider hotplug

    David Newbie

      Hi,

      I try to test the reconnection after persistence provider modifications.
      I send one message to the queue and MDB consumes it.
      I change the jms-ds.xml to a wrong Oracle schema.
      I send one message to the queue, a failure appears.
      I reset the jms-ds.xml to a working version.
      I send one message to the queue, message is posted but MDB does not consume it. The MDB must be restarted to consume messages posted to the queue (seen using jmx-console).

      I use JBoss 4.2.3.GA and JBM 1.4.2.GA.

      Thanks for your help.

        • 1. Re: Persistenceprovider hotplug
          Yong Hao Gao Master

          Can you post the error messages in the server.log ? thanks.

          • 2. Re: Persistenceprovider hotplug
            David Newbie

            There is no error about MDB. Messages are just not consumed.

            Here are the logs from the server, when changing ds.xml:

            2009-03-31 14:24:43,140 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 34s:94ms
            2009-03-31 14:24:57,734 INFO [com.pdf.common.service.messaging.test.mdb.MessagingTestBean] Message recieved at Tue Mar 31 14:24:57 CEST 2009
            2009-03-31 14:24:57,734 INFO [com.pdf.common.service.messaging.test.mdb.MessagingTestBean] Type of message object is: ObjectMessage
            2009-03-31 14:24:57,734 INFO [com.pdf.common.service.messaging.test.mdb.MessagingTestBean] Message recieved from 3kf6z1j (10.10.101.205)
            2009-03-31 14:24:57,734 INFO [com.pdf.common.service.messaging.test.mdb.MessagingTestBean] Message acknowledged
            2009-03-31 14:24:57,875 INFO [com.pdf.common.service.messaging.test.mdb.MessagingTestBean] Waiting 15s before sending response...
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1013985 undeployed
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@3dcf03 undeployed
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@f007ad undeployed
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/DLQ] stopped
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/ExpiryQueue] stopped
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/MessagingTestBean1] stopped
            2009-03-31 14:25:03,203 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/MessagingTestBean2] stopped
            2009-03-31 14:25:03,421 INFO [org.jboss.jms.server.ServerPeer] JMS ServerPeer[0] stopped
            2009-03-31 14:25:03,421 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JMSDS' from JNDI name 'java:JMSDS'
            2009-03-31 14:25:03,625 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JMSDS' to JNDI name 'java:JMSDS'
            2009-03-31 14:25:04,531 WARN [org.jboss.jms.server.security.SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
            2009-03-31 14:25:04,562 INFO [org.jboss.jms.server.ServerPeer] JBoss Messaging 1.4.2.GA server [0] started
            2009-03-31 14:25:04,593 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://3kf6z1j:4457 has leasing enabled, lease period 10000 milliseconds
            2009-03-31 14:25:04,593 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1013985 started
            2009-03-31 14:25:04,593 WARN [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
            2009-03-31 14:25:04,593 WARN [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
            2009-03-31 14:25:04,593 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://3kf6z1j:4457 has leasing enabled, lease period 10000 milliseconds
            2009-03-31 14:25:04,593 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@3dcf03 started
            2009-03-31 14:25:04,609 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://3kf6z1j:4457 has leasing enabled, lease period 10000 milliseconds
            2009-03-31 14:25:04,609 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@f007ad started
            2009-03-31 14:25:04,656 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2009-03-31 14:25:04,859 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2009-03-31 14:25:04,953 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/MessagingTestBean1] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2009-03-31 14:25:05,109 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/MessagingTestBean2] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2009-03-31 14:25:12,703 ERROR [org.jboss.messaging.util.ExceptionUtil] SessionEndpoint[m1-jjsakysf-1-8al9kysf-54n75p-p5t2aa] send [n1-jjsakysf-1-8al9kysf-54n75p-p5t2aa]
            java.lang.NullPointerException
            at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.routeInternal(MessagingPostOffice.java:2088)
            at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.route(MessagingPostOffice.java:499)
            at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:755)
            at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:397)
            at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:87)
            at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
            at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:157)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
            at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
            at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)
            at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:95)
            at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
            at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
            at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
            at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:420)
            at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
            2009-03-31 14:25:12,906 INFO [com.pdf.common.service.messaging.impl.ConnectionEntry] Messaging connection initialized for remote queues on host defined in jndi properties
            2009-03-31 14:25:13,390 INFO [com.pdf.common.service.messaging.MessagingService] Message sent to queue: queue/MessagingTestBean2 successfully.
            2009-03-31 14:25:13,406 INFO [com.pdf.common.service.messaging.test.mdb.MessagingTestBean] Duration (ms): 531
            2009-03-31 14:25:13,406 ERROR [org.jboss.messaging.util.ExceptionUtil] ConnectionEndpoint[j-le4akysf-1-8al9kysf-54n75p-p5t2aa] sendTransaction [y1-23takysf-1-8al9kysf-54n75p-p5t2aa]
            org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
            at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:463)
            at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:512)
            at org.jboss.messaging.core.impl.JDBCPersistenceManager.handleBeforeCommit1PC(JDBCPersistenceManager.java:1863)
            at org.jboss.messaging.core.impl.JDBCPersistenceManager$TransactionCallback.beforeCommit(JDBCPersistenceManager.java:2974)
            at org.jboss.messaging.core.impl.tx.Transaction.commit(Transaction.java:208)
            at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:490)
            at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:101)
            at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
            at org.jboss.jms.server.container.SecurityAspect.handleSendTransaction(SecurityAspect.java:195)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
            at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
            at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
            at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
            at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)
            at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:82)
            at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
            at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
            at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
            at org.jboss.remoting.Client.invoke(Client.java:1634)
            at org.jboss.remoting.Client.invoke(Client.java:548)
            at org.jboss.remoting.Client.invoke(Client.java:536)
            at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
            at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
            at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:221)
            at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
            at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
            at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
            at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
            at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
            at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
            at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
            at org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)
            at org.jboss.jms.tx.ResourceManager.sendTransactionXA(ResourceManager.java:662)
            at org.jboss.jms.tx.ResourceManager.commit(ResourceManager.java:367)
            at org.jboss.jms.tx.MessagingXAResource.commit(MessagingXAResource.java:254)
            at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:636)
            at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2619)
            at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)
            at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
            at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
            at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
            at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
            at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
            at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
            at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
            at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
            at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
            at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
            at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
            at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
            at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
            at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
            at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
            at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
            at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
            at java.lang.Thread.run(Unknown Source)
            Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:393)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
            ... 60 more
            2009-03-31 14:25:13,421 ERROR [org.jboss.jms.asf.StdServerSession] failed to commit/rollback
            javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
            at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
            at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
            at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
            at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
            at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
            at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
            at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
            at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
            at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
            at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
            at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
            at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
            at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
            at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
            at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
            at java.lang.Thread.run(Unknown Source)

            • 3. Re: Persistenceprovider hotplug
              Yong Hao Gao Master

              Hi,

              I'm sorry I thought you changed the data source config file. But what you changed is jms-ds.xml, can you give the contents you have changed here?

              Anyway, i don't think JBM 1.4 can support this kind of changes without restarting.

              • 4. Re: Persistenceprovider hotplug
                David Newbie

                I just change the oracle schema to describe an invalid one to check reconnection.

                I have found a solution to restart the MDB when the persistence provider is restarted, just add a 'depends' in jboss.xml but unfortunately, a jboss issue (JBAS-5332) does not allow restarting.