David,

I've put together a simple test program which shows the behavior I described in the initial posting for this thread. I've attached the source code, Junit test. and ANT script as a jar file.

When you run the test with 'no' transaction the test succeed. If you run with transaction required it fails.

I'm just confuse on what the behavior should be, and what did I miss here.

Thanks for any help you may provide

Kris


The jboss server output when running with transaction 'required' is. Check the output at timestamp 14:29:15,253

14:28:16,970 INFO [MainDeployer:149] {} Deployed package: file:/E:/opt/corp/inm
_3rdparty/jboss-3.0.4_tomcat-4.1.12/server/default/deploy/MyEntityEJB.jar
14:29:14,723 INFO [MyEntityEJB:236] {MyEntity} New MyEntity
MyEntity: id=TestBean
State=InitialState
ElementName Element1
Attribute1 Initial-1.1
Attribute2: Initial-1.2
ElementName Element2
Attribute1 Initial-2.1
Attribute2: Initial-2.2
14:29:14,793 INFO [MyEntityEJB:253] {MyEntity} Storing MyEntity
MyEntity: id=TestBean
State=InitialState
ElementName Element1
Attribute1 Initial-1.1
Attribute2: Initial-1.2
ElementName Element2
Attribute1 Initial-2.1
Attribute2: Initial-2.2
14:29:15,193 INFO [MyEntityEJB:191] {MyEntity} >>>> Changed Element1 Attribute1
<<<<
14:29:15,203 INFO [MyEntityEJB:253] {MyEntity} Storing MyEntity
MyEntity: id=TestBean
State=HELLO_STATE
ElementName Element1
Attribute1 ChangedAttr1
Attribute2: Initial-1.2
ElementName Element2
Attribute1 Initial-2.1
Attribute2: Initial-2.2
14:29:15,253 INFO [MyEntityEJB:253] {MyEntity} Storing MyEntity
MyEntity: id=TestBean
State=HELLO_STATE <== That state attribute was saved propertly
ElementName Element1
Attribute1 Initial-1.1 <== This attribute is back to it's initial value!!!
Attribute2: Initial-1.2
ElementName Element2
Attribute1 Initial-2.1
Attribute2: Initial-2.2
14:29:15,384 INFO [MyEntityEJB:248] {MyEntity} Removed MyEntity
MyEntity: id=TestBean
State=HELLO_STATE
ElementName Element1
Attribute1 Initial-1.1
Attribute2: Initial-1.2
ElementName Element2
Attribute1 Initial-2.1
Attribute2: Initial-2.2

Attachment: TransactionTestSrc.jar
Description: Binary data

Reply via email to