prohibited method  
Author Message
gk





PostPosted: 2006-10-25 18:03:00 Top

java-programmer, prohibited method what does it mean when we say ,
in EJB session bean
"The bean instance calls a prohibited method of its session context."

what does it mean by prohibited method ? who prohibits ? how can we
set this prohibition ?

thanks

 
JanTheKing





PostPosted: 2006-10-25 18:30:00 Top

java-programmer >> prohibited method Hope this helps..

http://docs.sun.com/source/817-2175/detrans.html#17654

Methods Not Allowed in Container-Managed Transactions

For container-managed transactions, you should not invoke any method
that might interfere with the transaction boundaries set by the
container. Prohibited methods are:

* The commit, setAutoCommit, and rollback methods of
java.sql.Connection

* The getUserTransaction method of javax.ejb.EJBContext

* Any method of javax.transaction.UserTransaction

You may, however, use these methods to set boundaries in bean-managed
transactions.

----------------------------------------------------------------------------------------

gk wrote:
> what does it mean when we say ,
> in EJB session bean
> "The bean instance calls a prohibited method of its session context."
>
> what does it mean by prohibited method ? who prohibits ? how can we
> set this prohibition ?
>
> thanks

 
gk





PostPosted: 2006-10-25 19:52:00 Top

java-programmer >> prohibited method
JanTheKing wrote:
> Hope this helps..
>
> http://docs.sun.com/source/817-2175/detrans.html#17654
>
> Methods Not Allowed in Container-Managed Transactions
>
> For container-managed transactions, you should not invoke any method
> that might interfere with the transaction boundaries set by the
> container. Prohibited methods are:
>
> * The commit, setAutoCommit, and rollback methods of
> java.sql.Connection
>
> * The getUserTransaction method of javax.ejb.EJBContext
>
> * Any method of javax.transaction.UserTransaction
>
> You may, however, use these methods to set boundaries in bean-managed
> transactions.
>
> ----------------------------------------------------------------------------------------
>
> gk wrote:
> > what does it mean when we say ,
> > in EJB session bean
> > "The bean instance calls a prohibited method of its session context."
> >
> > what does it mean by prohibited method ? who prohibits ? how can we
> > set this prohibition ?
> >
> > thanks

thank you