Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink weaver agent or Spring agent
EclipseLink weaver agent or Spring agent [message #389403] Wed, 03 June 2009 23:20 Go to next message
Frank is currently offline Frank
Messages: 1
Registered: July 2009
Junior Member
I have dynamic weaving working in an EclipseLink standalone environment
but now I want to enable dynamic weaving in EclipseLink 1.1.1 within a
Spring 2.5.6 environment.

Can I still use the EclipseLink weaving agent or do I need to use Spring's
weaving agent instead of EclipseLink?

In my persistence.xml I have these properties set:
<property name="eclipselink.weaving" value="true"/>
<property name="eclipselink.weaving.lazy" value="true"/>

And in my Spring applicationContext.xml I have this property set:
<context:load-time-weaver aspectj-weaving="on" />

but I'm wondering which option I should use for the load time weaving
class:

Currently I'm using this:

<bean id="entityManagerFactory"
class=" org.springframework.orm.jpa.LocalContainerEntityManagerFacto ryBean ">

<property name="persistenceUnitName" value="myunit" />
<property name="loadTimeWeaver">
<bean
class=" org.springframework.instrument.classloading.InstrumentationL oadTimeWeaver "
/>
</property>
</bean>

I tried setting the class to:
org.eclipse.persistence.internal.weaving.PersistenceWeaver
but got an exception from Spring that there was no default constructor

So, when integrating Spring with EclipseLink do I have to use the Spring
InstrumentationLoadTimeWeaver class?

Note I don't want to use the app server based weavers - I'm doing this in
standalone JSE 6 environment
Re: EclipseLink weaver agent or Spring agent [message #389415 is a reply to message #389403] Tue, 09 June 2009 13:31 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

I'm no Spring expert, so perhaps some else who is can give more details,
but my guess would be you still need to use the EclipseLink agent java
command option when launching your application to get weaving in JSE.

If you can't use the agent, or use JEE, then there is always the option of
using static weaving.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: EclipseLink weaver agent or Spring agent [message #389427 is a reply to message #389403] Tue, 09 June 2009 15:33 Go to previous message
Doug Clarke is currently offline Doug Clarke
Messages: 155
Registered: July 2009
Senior Member
When using EclipseLink JPA within Spring in a managed fashion you only
need to use the Spring agent. It enables the appropriate hooks for
EclipseLink to do its weaving.

Doug
Previous Topic:Expressions query generated property but execution returns no results when they
Next Topic:Join Query based on JoinTable with multiple joinColumns
Goto Forum:
  


Current Time: Wed Oct 01 12:17:29 GMT 2014

Powered by FUDForum. Page generated in 0.01652 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software