Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Re: rcp, osgi, and dynamic weaving

Hi Ted,

I apologize that this part of the code is a bit fragile and needs more documentation. We will have to do some work to solve that issue soon. FYI: We are considering temporarily moving this weaving code into our Incubation component to more accurately reflect the fact that there is some work we have to do to make this functionality more easily usable.

The way Equinox works, fragments that extend the framework must be placed in the same area of the classpath as the Equinox bundle itself. One way to do that is to drop the org.eclipse.persistence.jpa.weaving.equinox bundle right in your Eclipse plugins directory. (Another way is described here: http://www.eclipsecon.org/2008/sub/attachments/Equinox_Framework_How_to_get_Hooked.pdf)

The other thing you have to do is tell Equinox about the extension by providing the following VM argument at startup.

  -Dosgi.framework.extensions=org.eclipse.persistence.jpa.equinox.weaving

At the moment, in order for weaving to work none of your domain classes can be loaded at the time you create your persistence unit.

-Tom

Ted Pricer wrote:
Switching to 3.4 libraries had no noticeable effect. Can you recommend
a way to diagnose this?

On Tue, Jan 13, 2009 at 2:52 PM, Ted Pricer <ted.pricer@xxxxxxxxx> wrote:
I can try to test it with 3.4, although the HookRegistry is tagged as
since 3.2 (and I have access to that API, so it clearly was in 3.3).
I'll let you know the results from updating to 3.4.

Ted

On Tue, Jan 13, 2009 at 2:47 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
Hi Ted,

 I believe the hook APIs were added in Equinox in Ganymede (3.4) - though
someone can correct me if I am wrong.

 We certainly have not tested the dynamic weaving on a pre-Ganymede version.
The best bet for users on earlier versions is to use static weaving.  Here
is some info about our weaving support:

http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#Using_EclipseLink_JPA_Weaving

-Tom



Ted Pricer wrote:
Tom,
Maybe. Did you mean:
org.eclipse.persistence.jpa.equinox
org.eclipse.persistence.jpa.equinox.weaving
which were both referenced in this thread.

Assuming that is what you meant, then I can provide a few more details
that may be important:
I've modified the org.eclipse.persistence.jpa.equinox.weaving manifest
file to use bundle-version 3.3.0 (my current target platform).
I've set breakpoints in the WeavingConfigurator class, which are not hit.

Are you aware of anything that could be preventing the discovery of
the HookConfigurator?

Ted

On Tue, Jan 13, 2009 at 1:24 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
Appologies... answers to my emails in the wrong order.

What I meant to say for this email is that I do expect this to work.

There should be two bundles that are deployed to allow this to work.

org.eclipse.persistence.jpa.weaving is a component of EclipseLink and
org.eclipse.persistence.jpa.weaving.equinox is a fragment for Equinox.

Are you using both of these?

-Tom

Tom Ware wrote:
Hi Mike,

 One question, one comment:

- In EMImpl.flush(), you do a check to see whether we are within a flush
before toggling the withinFlush variable, but the call to write is not in
the same if statement.  Are there cases where we could get into flush() with
withinFlush set to true where we would still want writeChanges to execute?
- In EJBQueryImpl.executeReadQuery, you directly access the withinFlush
variable in entityManager.  Stylistically, I would prefer to see that access
through an accessor method.

-Tom

Ted Pricer wrote:
Does this currently work with an RCP based application? I've tried
including the fragments in my project but haven't seen any dynamic
weaving taking place. In fact the WeavingConfigurator isn't being
instantiated (it looks to me like that is where the weaving libraries
get incorporated at runtime).

I'm currently launching via an eclipse debug configuration.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top