Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » weaving or not
weaving or not [message #386017] Thu, 19 March 2009 13:07 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
In the EclipseLink initialization code I need to set whether we are weaving or not:

cfg.put(PersistenceUnitProperties.WEAVING, "true");

However, this in fact is determined at runtime, by:
- the fact that the BM jar in the classpath is preweaved
- the fact that the -javaagent:eclipselink1.0.2.jar option is present

If I were to change my runtime configuration and remove the javaagent option and add the preweaved jar, that should be enough to allow a correct start. However, now I still need to make a compile-time change to the configuration to set weaving to false.

Is it possible to detect at runtime if the agent is weaving so the option can be set correctly?

Tom
Re: weaving or not [message #386055 is a reply to message #386017] Mon, 23 March 2009 13:34 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You should be able to always set weaving to true, as I think the inverse
will work even if weaving did not occur, then weaved features will not be
enabled.

I think there are some features that currently auto-detect weaving, and
others that require the weaving option be set. You could log a bug to
have everything be able to auto-detect, in theory it seems that it would
be possible.

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


James : Wiki : Book : Blog : Twitter
Re: weaving or not [message #386061 is a reply to message #386055] Mon, 23 March 2009 14:14 Go to previous message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
James wrote:
> You should be able to always set weaving to true, as I think the inverse
> will work even if weaving did not occur, then weaved features will not
> be enabled.

I stepwise tried to make the preweaved jar work, but I needed to set that option to false. Maybe 1.1 will behave better, I but have an exception there ATM (reported in another thread).

[RT] Bug#: 269688
Previous Topic:@Transformation - Unknown state or association field
Next Topic:mapping problem: entity as join table
Goto Forum:
  


Current Time: Mon Dec 22 17:16:45 GMT 2014

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

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