Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPA in J2SE

1 - The agent is still required for lazy OneToOne and ManyToOne support, as
well as improved performance and lazy Basic and FetchGroup support.
(-javaagent eclipselink.jar)  The agent was never required, but not using it
means that all OneToOne and ManyToOne will be loaded as eager.

2 - If an error occurs you need to call rollback, otherwise you will still
be in the transaction.
Most exceptions will mark the transaction for rollback, but you still must
call rollback or commit to complete a transaction.

3 - byte code weaving is used by the agent to add hooks into your
persistence classes to support such features as lazy OneToOne, ManyToOne,
Basic, change tracking, fetch groups and improved performance.  It basically
adds a few methods and variables into your classes.  The debugger will still
function as normal on these classes, you will just see extra variables in
the debugger when inspecting your class instance.


csergiu77 wrote:
> 
> Want to develop an desktop app with eclipselink in j2se. (so client and
> mysql)
> 
> I have some questions :
> 
> 1) in toplink there was necesary to add some -javaagent toplink...jar
> .This is not necesary anymore with eclipselink ? (maybe why ?)
> 
> 2) how to handle transactions ?
> i saw several scenarios:
> {
> em.begin()
> //tran code
> em.commit();
> }
> 
> then 
> 
> try {
> em.begin()
> //tran code
> em.commit();
> }catch(E ex){
> em.rollback();
> }finally{
> em.close();
> }
> 
> 
> Is em.rollback() needed or the transaction is automatically rolled back if
> some exception apear ?    
> 
> 3) what is weawing ? in a feew words
> 
> I will appreaciate any little help 
> 
> Regards !
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/JPA-in-J2SE-tp20459496p20460944.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top