• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

MDB tranx attribute ?

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Why cant a MDB have a transaction attribute as "Never" ?.

Thanks
Arun
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definition of 'Never':
If an invoked method has no transaction context, run the method in an unspecified transaction contxet. If the method has an existing transaction, throw RemoteException/EJBexception to the remote/local client.

As you might know, MDBs have no clients. Who will handle the RemoteException/EJBException if thrown by the container?
[ March 25, 2005: Message edited by: Keerthi P ]
 
arunij katiliyar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definition of 'Never':
If an invoked method has no transaction context, run the method in an unspecified transaction contxet. If the method has an existing transaction, throw RemoteException/EJBexception to the remote/local client.

As you might know, MDBs have no clients. Who will handle the RemoteException/EJBException if thrown by the container?

MDBS are triggered by the arrival of the message on the respective destinations so the onMessage block will always be triggered in isolation so the if part never arises in MDB's run time . The onMessage block can run with no transaction.

The conclusion is that it doesnt make sense for MDBs to have rather than your statement because your statement leaves a room of possibility .

" Who will handle the RemoteException/EJBException if thrown by the container?"

Thanks
Arun
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arun,
I think Keerthi is right, please consider the behaviour of Never....if there is No Tx context, called Method will run in Unspecified Tx, but if there is a context, Client will get an exception...so now client is never existant for MDB's, and thats what keerthi means...who will handle the exception...its contradiction....so both if's apply to mdb's.
Makes sence...!!!

Amol.
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic