Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Marian Mroz

Greenhorn
+ Follow
since Mar 05, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marian Mroz

Hello

I've got a problem with following project. We've two classes: CustomerValue and AddressValue which are join one-to-many (Customer can have many Addresses), and I have one EJB3 bean which is responsible for transaction - putting elements into database. When I try to put some wrong data in AddressValue class (with null value), EJB does rollback but only for AddressValue entity, not for whole CustomerValue entity. CustomerValue is created at the begining, then I add AddressValue and do save() by EJB.

What should I do to do rollback for whole CustomerValue when in one of his part (eg AddressValue) will notify that it can't be added to DB (PersistanceException)?

I work on JBoss 5.0.0GA, Java 1.6.0_12-b04
Code with setting is attached bellow:

AddressValue:

CustomerValue:

CustomerDAO:

CustomerDAOTest

persistance.xml



Thanks for help
Thanks for help. It was a problem - there was a different access to jbossall-client.jar (it was set jbossall-client-3.2.3.jar)
Hi I've got a problem with run simple EJB3.0 application

I've got an interface:


and EJB Bean implementation:


and I complie it with using jdk6

I put it on JBoss 4.2.3.GA with jre1.5.0_16

On the server there is an information that it started:
12:27:20,328 INFO [EJBContainer] STARTED EJB: pl.edu.mmroz.CalculatorBean ejbName: CalculatorBean

When I'm try run simple test application:



I receive following error:


Does anybody know what is the reason of this exception?