[jboss-user] [EJB 3.0 Users] - EntityManager.refresh() - Works on Detatched Or Managed Enti

2009-12-06 Thread CatchSandeepVaid
[P-298 Of EJB3 In Action Book] States: In the diagram, it shows that using a refresh method a detatched entity can become managed.. [P-332Of EJB3 In Action Book] States: The refresh method only works on managed entities... Aren;t the above 2 statements contradictory? Moreover S

[jboss-user] [EJB 3.0 Users] - Container-Manager EntityManager - Automatically joins JTA ?

2009-12-05 Thread CatchSandeepVaid
In application-managed EntityManager, we explicitly call entityManager.joinTransaction(). In container-manager Entitymanager does it automaticalls joins JTA ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269131#4269131 Reply to the post : http://www.

[jboss-user] [EJB 3.0 Users] - Re: EntityManager.refresh() works only on managed entities.

2009-11-23 Thread CatchSandeepVaid
I am just trying to figure out why such a constraint. Well i personally don;t see any complexity in refreshing entity graph using PK. As the PK is intact in detached instances, we can always load(refresh) the entity graph. View the original post : http://www.jboss.org/index.html?module=bb&op=v

[jboss-user] [EJB 3.0 Users] - EntityManager.refresh() works only on managed entities.

2009-11-22 Thread CatchSandeepVaid
Why can't EntityManager.refresh() work on detatched entities? Any reason behind this ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266932#4266932 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266932 ___

[jboss-user] [EJB 3.0 Users] - Application-Managed EntityManager transaction type must be R

2009-11-21 Thread CatchSandeepVaid
[P-312 of Ejb3 In Action Book"] states: "For application-based EntityManager, the transaction-type must be set to RESOURCE_LOCAL in the persistence.xml file". but in case the application is running inside container (App server) , it can join JTA transaction. Sp why always transaction-

[jboss-user] [EJB 3.0 Users] - One-To-many & Many-To-One - @Join columns on both sides or

2009-11-08 Thread CatchSandeepVaid
[P-279 of EJB3 In Action] states: "Note that the exact @JoinColumn vspecification could have been repeated for both the Bid.item and Item.bids persistent fields on either side of the relationship." [P-280 of EJB3 In Action] states: "The persistence provider will

[jboss-user] [EJB 3.0 Users] - Bidirectional One-To-One using @PrimaryKeyJoinColumn

2009-11-08 Thread CatchSandeepVaid
[p-277 of EJB3 In Action Book] talks about only unidirectional one-to-one. How about bidirectional one-to-one using @PrimaryKeyJoinColumn? Do i have to specify mapped-by attribute as i did it for bidirectional one-to-one using @JoinColumn. View the original post : http://www.jboss.

[jboss-user] [EJB 3.0 Users] - Entity - Field-Based Access Vs Property Based Access

2009-11-02 Thread CatchSandeepVaid
P-230 of EJB3 In Action Book states "If you want to use field-based access, you can declare all your POJO persisted data fields public or protected" P-231 "Even if you used field-based access, we recommend that you make the fields private and expose the fields to be modified

[jboss-user] [EJB 3.0 Users] - Re: CMT setRollbackOnly(), RollabackException

2009-11-01 Thread CatchSandeepVaid
Sorry, i don;t know how to edit my post.. So posting updated question again : [P-189] of EJB3 In Action: "In case of transactions propagated from the client, if our method indicates that the transaction should be rolled back, the container will not only roll back the whole transact

[jboss-user] [EJB 3.0 Users] - CMT setRollbackOnly(), RollabackException

2009-11-01 Thread CatchSandeepVaid
[P-189] of EJB3 In Action: "In case of transactions propagated from the client, if our method indicates that the transaction should berolled back, the container will not only roll back the whole transaction but will also throw a javax.transaction.RollbackException back to

[jboss-user] [EJB 3.0 Users] - CMT and Connection Objects

2009-10-03 Thread CatchSandeepVaid
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void someMethod(...) { // obtain con1 and con2 connection objects con1 = ...; con2 = ...; stmt1 = con1.createStatement(); stmt2 = con2.createStatem