[jboss-user] [JBoss Messaging] - EJB3s in JBoss cluster affected by clustered messaging setup

stupormundi do-not-reply at jboss.com
Fri May 27 10:34:46 EDT 2011


stupormundi [http://community.jboss.org/people/stupormundi] created the discussion

"EJB3s in JBoss cluster affected by clustered messaging setup"

To view the discussion, visit: http://community.jboss.org/message/607501#607501

--------------------------------------------------------------
Hi Group!

I'm struggling with messaging setup for an (existing) JBoss cluster.

Our project has, so far without problems, been using various EJB3s on a cluster.

So far, our project hadn't used messaging, and the datasource defined in the /server/all/deploy/ as DefaultDS was HSQLDB (hsqldb-ds.xml).

After experimenting with messaging / datasource setup a bit I've now set up a new postgres datasource used for messaging alone, called it "MessagingDS", leaving in place the existing "DefaultDS", and have configured the default queues (DLQ etc.) as clustered, configured some additional clustered queues, and set up a clustered PostOffice.

I've added the additional attributes (for clustering) for DataChannelConfig and ControlChannelConfig into 
/server/all/deploy/messaging/postgresql-persistence-service.xml , as described in the messaging / clustering docs.

Now, the clustered messaging works fine, BUT, those of our EJBs annotated like this:

@Service
@Depends({"jboss.ha:service=HASingletonDeployer,type=Barrier"})
(to ensure a true Singleton on the cluster) 

... have stopped working. More specifically, they now fail when they (or rather, a stateless ejb invoked by them) try to access data on hibernate, like so:

javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
        at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
...
Caused by: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
        at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:202)
        at org.jboss.jpa.tx.TransactionScopedEntityManager.find(TransactionScopedEntityManager.java:176)
        at org.example.myproj.SingletonServices.ejb3.MyStateLessBean.doHibernateStuff(MyStateLessBean.java:42)

They used to work just fine before. Evidently, my additional setup for clustered messaging has screwed things up for those EJBs, but I don't understand how since I've left the DefaultDS as it was configured before.

Any Ideas?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/607501#607501]

Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110527/b7dadbda/attachment.html 


More information about the jboss-user mailing list