See my post at
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=59240
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932242#3932242
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932242
--
@alex
I am sorry but does not the J2EE spec say that transaction handling for CMP is
the job of the Container?
By stating the desired Transactional behaviour in the deployment descriptor the
container should take care of this matter.
anonymous wrote : As previously mentioned, entity beans that
Any ideas?
Who can help me?
Thx!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3887075#3887075
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3887075
---
SF.Net ema
You should always access entity beans in a transaction. And then make sure that you
get a CMR collection and work on it in the same tx.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847128#3847128
Reply to the post :
http://www.jboss.org/index.html?module=b
Hello Collin,
I added the following line in my session facade's method:
| logger.info(TransactionInfo.getTransactionInformation());
|
and it says "ACTIVE" which means that my session facade runs within a transaction.
Right?
The source for my session facade bean is here:
http://www.parispan
Sure, just use the getTransactionInformation() method right before you obtain your
CMR collection to determine whether or not you are in a transaction.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847060#3847060
Reply to the post :
http://www.jboss.org/in
Hello Collin,
Thanks for the reply. Can you give a hint as to how to use your class please?
Julien.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847058#3847058
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3847058
-
You can actually see this problem from one line of code to the next if you are not in
a transaction. For instance, if you have a BeanManaged SessionBean and forgot to
grate a transaction and have a method that calls:
. . .
Collection c = myEntity.getCMREntities();
Iterator i = c.iterator();
.
This is caused by, well, usually, executing some method that obtains a collection of
entities within the context of a transaction, and then another method (possibly the
calling method) using that collection within
* a transaction (if the collection was obtained without a transaction)
* no trans
The error you see pretty much tells all.
What you probably do is something in your servlet:
a = getOneSideOfCmr();
b = a.getOtherSide();
There ist no transaction around it, so b is invalid.
Either surround this by a user transaction
or do the two calls within a method in a session bean.
View t
10 matches
Mail list logo