[EJB 3.0] New message: "Re: Entity Manager with BMT and Transaction Timeout"
by Alexander Hartner
User development,
A new message was posted in the thread "Entity Manager with BMT and Transaction Timeout":
http://community.jboss.org/message/528562#528562
Author : Alexander Hartner
Profile : http://community.jboss.org/people/ejb3workshop
Message:
--------------------------------------------------------------
Thanks for responsing. Here is my bean code.
First the MDB which shows the injection of an entityManager, usertransaction and a datasource:
> ...
> @MessageDriven(name = "WorkListener", activationConfig = {
> @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
> @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
> @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/abc/WorkMessages")
> })
> @TransactionManagement(TransactionManagementType.BEAN)
> public class WorkListener implements MessageListener {
>
> @PersistenceContext(unitName = "entityManager")
> protected EntityManager entityManager;
>
> @Resource(name = "jdbc/abcDSNoTX")
> DataSource datasource;
>
> @Resource
> private UserTransaction userTransaction;
>
> public void onMessage(Message message) {
> try {
> Processor processor = new Processor(entityManager, userTransaction, datasource);
> processor.process(message);
> ....
Then further down the stack we begin a new userTransaction and load some entity via the entity manager
> ...
> m_userTransaction.begin();
> Account account = m_entityManager.find(Account.class, accountId);
> ...
>
> account.getRelatedAccounts();
However further down the stack we access a collection on the account which loads further linked entities and failes with the LazyInitializationException.
This problem only occurs under load and is most likely caused by a slow down while accessing the database. However I am not too concerned about performance at this stage, just want to know how I can debug this issue and see what happened to my entity manager session. My suspicion is that since I am using a User Transaction that the global timeout which I set to 3600 (=1 hour) is not applied. If this is the case where do you set the default transaction timeout for a user transaction or the hibernate session. Usually the first time the exception is thrown is between 20 and 30 minutes after submitting a large volume of work.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528562#528562
15 years, 10 months
[JBoss Microcontainer Development] New message: "Re: VFS3 and symlinks"
by Ales Justin
User development,
A new message was posted in the thread "VFS3 and symlinks":
http://community.jboss.org/message/528555#528555
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> Just want to say that if this is the correct fix, it should not be optional.
>
I don't see any other way of fixing this -- force all paths to be canonical.
But I would expect that this call is not cheap, asking the underlying FS for canonical path.
And since 99% of users are not using symlinks (at least that's what I would expect), making this force optional makes sense.
> No point in allowing configurations which aren't valid.
I don't get this.
Unfortunately I think the problem is even bigger than just VFS::getChild.
My guess is that even calls to VirtualFile::getChild are due to fail with symlinked path?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528555#528555
15 years, 10 months
[jBPM] New message: "Re: Test workflow with JUnit"
by tamisier laure
User development,
A new message was posted in the thread "Test workflow with JUnit":
http://community.jboss.org/message/528545#528545
Author : tamisier laure
Profile : http://community.jboss.org/people/lauretamisier
Message:
--------------------------------------------------------------
I have found my problem... i have forgotten to deploy my drl file.
find here the code to deploy and delete the deploy
NewDeployment deploy
protected void setUp() throws Exception {
super.setUp();
deploy = repositoryService.createDeployment().addResourceFromClasspath("process.jpdl.xml");
deploy.addResourceFromClasspath("test.drl");
deploymentId = deploy.deploy();
}
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
thanks for your help .. and i hope this will help you
Laure
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528545#528545
15 years, 10 months
[JBoss Messaging] New message: "Redelivery Delay and Redelivery Times"
by null null
User development,
A new message was posted in the thread "Redelivery Delay and Redelivery Times":
http://community.jboss.org/message/528543#528543
Author : null null
Profile : http://community.jboss.org/people/Paul_ADP
Message:
--------------------------------------------------------------
>From all of the documentation for JBM 1.4 (integrated into JBoss 5.1.0) it appears that for both:
- MaxDeliveryAttempts - the number of times a message will be delivered to an MDB before being pushed to the DLQ
- DeliveryDelay - the delay between subsequent redeliveries of the message to an MDB
these values can ONLY be configured on a per destination basis (ie per Queue or Topic) and not per message.
Is this true? I could swear the when I used JBoss MQ that you could set it in the message.
Can someone please confirm?
Thanks,
--Paul
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528543#528543
15 years, 10 months