[Persistence, JBoss/CMP, Hibernate, Database] - Re: Calling datasource.getConnection() after sessionContext.
by AlexFDT
Peter, Jaikiran,
thank you for you participation.
I have just tested it on jboss-4.2.3.GA. It throws the same exception.
Actually as it can be seen on "Fix Version/s" and "Subversion Commits" tab on https://jira.jboss.org/jira/browse/JBAS-1916 such behavior have been introduced in JBossAS-4.0.3RC1.
I think it would be not good to use an older version.
Jaikiran, i thought about changing order of statements. But there is a problem with it. The code which I presented here is a simplified concept. Real code is much more complicated. The application which i am adapting is quite a big one and I have already seen few different places in which it tries to get a connection after possible setRollbackonly(). And i am not sure about how many more such places there are.
I understand that setRollbackOnly() marks transaction for rollback. But i think that it should not be prohibited to take a connection and make queries (reading) even after marking it for rollback because it is marked but not actually rolled back at that moment.
As I can see for now I have 2 variants:
1. Try to override TxConnectionManager to make it providing the behaviour i need. I think there should be a way to make an overriding child class and to provide it for JBOSS to use through the configuration files. Or may be i have to change and recompile JBOSS library sources...
2. Try to find and reorganize all such places in my application.
It will be very hard because of complicated and undocumented code.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168322#4168322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168322
16 years, 6 months
Delivery Failure
by Postmaster
---------------------------------------------------------------------------------
The message you sent to erotica-uk.com/info was rejected because it would exceed the quota for the mailbox.
The subject of the message follows:
Subject: =?windows-1251?B?X83z5u3g/18g4ejn7eXxLuzl7fMg?=
---------------------------------------------------------------------------------
16 years, 6 months
[JBossMQ] - Nested transaction is not working
by jonathanztaub
I have a message driven bean which also persists data to the database.
In case data persistence fails, I just log out an error and rollback the transaction. This causes the JMS transaction to be rolled back as well, resulting in redelivery of the message.
I'm not interested in message redelivery so I created another method in the message driven bean, and configured it to have a RequiresNew transaction attribute in the ejb-jar.xml. The idea is that if database persistence fail, I can perform a rollback in the second method, thereby rolling back only the database transaction. However, this doesn't seem to work as the JMS transaction is rolledback as well.
My questions are:
* Am I misunderstanding how transaction demarcation and rollback work?
* Are there specific issues with JMS I'm unaware of?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168313#4168313
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168313
16 years, 6 months
[EJB 3.0] - Failed to acquire the pool semaphore
by sonicfab
We are using EJB3 MDBS on JBoss 4.2.2GA, and we keep getting the following exception.
Any ideas ?
2008-08-02 16:41:43,033 124733 DEBUG [org.springframework.jms.listener.DefaultMessageListenerContainer] (listenerContainer-1:) Consumer [org.jboss.resource.adapter.jms.JmsMessageConsumer@55ca6954] of session [org.jboss.resource.adapter.jms.JmsSession@1d1fceed] did not receive a message
2008-08-02 16:41:43,183 124883 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] (WorkManager(2)-58:) Unexpected error delivering message delegator->JBossMessage[909932]:PERSISTENT, deliveryId=15
javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=10000
at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:122)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
at $Proxy91.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:802)
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.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168302#4168302
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168302
16 years, 6 months