[JBoss-user] [EJB 3.0] - Re: Cancel a Rollback

2005-12-28 Thread redijedi
That's unfortunate for me. How can you use find with a native SQL query? I 
think that using @ApplicationException(rollback=false) will not be so great for 
me because the Exception I am raising should rollback transactions under 
certain circumstances. I know I could create two different exceptions, but that 
doesn't feel right. 

If I demarcate the first operation as requiring a new transaction, thereby 
nesting the transaction, and then it throws an exception that I catch will the 
parent trans rollback?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3914663#3914663

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3914663


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Cancel a Rollback

2005-12-28 Thread [EMAIL PROTECTED]
that won't work either as you won't have the same persistence context and the 
returned entity won't be managed anymore.

I fhink you need to rearchitect your API as suggested above.

BTW, your scenario is exactly the reason why the spec has

find() which returns null
and getReference() which throws an ENFE.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3914666#3914666

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3914666


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Cancel a Rollback

2005-12-28 Thread redijedi
Again, unfortunately find is not an option because I use native sql. I have 
moved an existance check into my stored proc and it works fine now. It is not 
ideal, but it works.

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3914682#3914682

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3914682


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Cancel a Rollback

2005-12-27 Thread [EMAIL PROTECTED]
So, your ENFE exception is propagated to the nester of the EJB?  If a runtime 
exception gets thrown pass an EJB boundary then the transaction is marked for 
rollback.

You can't get around this.  Refactor your code to use find() and check for NULL 
or catch the ENFE exception within the nested EJB call and wrap it with a 
non-rollbacking exception (checked or runtime annotatied with 
@ApplicationException(rollback=false)), or, just change the contract of your 
nested EJB invocation.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3914488#3914488

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3914488


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user