Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 262437

Summary: [EclipseLink] Use Galileo EclipseLink in Platform
Product: [WebTools] Dali JPA Tools Reporter: Shaun Smith <shaun.smith>
Component: GeneralAssignee: Tran Le <tranle1>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kaloyan, karenfbutzke, konstantin, neil.hauge
Version: 2.1Keywords: plan
Target Milestone: 2.2 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard: EclipseLink
Attachments:
Description Flags
screen shot of OSGi bundles
none
Screenshot with Eclipselink as target platform
none
Screenshot with Eclipselink as target platform none

Description Shaun Smith CLA 2009-01-26 16:34:48 EST
EclipseLink is participating in the Galileo release and is currently providing all functionality as bundles/plugins.  Dali should be using these bundles instead of the monolithic eclipselink.jar.
Comment 1 Neil Hauge CLA 2009-02-24 15:23:25 EST
There are two primary use cases driving the need for a dependency on the EclipseLink bundles from the Dali EclipseLink feature.  The first involves a plugin-level dependency, necessary for using EclipseLink's API to perform JPQL query validation or DDL Generation.  The second involves creating a better out-of-the-box experience for end users of the Dali EclipseLink feature.

Regarding the second case, it makes sense to add a dependency on the EclipseLink JPA feature from the optional Dali EclipseLink feature since these two features go hand-in-hand.  This dependency would help end users get all of the bits they need to work with EclipseLink JPA out-of-the-box.  

Comment 2 Tran Le CLA 2009-03-05 18:44:40 EST
Fix #1:
Added the capability for Dali project to add EclipsLink Osgi bundles to it classpath. 
In order to use this functionality, you need to define an EclipseLink platform in your PDE environment. 

Fix #2:
The DDLGen code has been updated to handle projects with EclipsLink Osgi bundles in their classpath. Projects with EclipsLink setup as User Library is still valid.
Comment 3 Karen Butzke CLA 2009-03-09 16:48:54 EDT
Created attachment 128104 [details]
screen shot of OSGi bundles

This is not working for me, I have the EclipseLink plugins in my development workspace.  I am then running Eclipse and it correctly defaults and shows EclipseLink as the JPA implementation type, and displays the eclipselink plugins in the list.  When I create the project, the OSGi Bundles appear with the packages screwed up.  See the attached screen shot, the packages all have src and classes appended to them.
Comment 4 Shaun Smith CLA 2009-03-09 17:06:16 EDT
In the screenshot, why is the EclipseLink library given the name "OSGi Bundles"?  It should just be "EclipseLink" or maybe "EclipseLink 1.1".  I understand users may also define a library using the single EclipseLink.jar and we need to come up with a good way to distinguish between the provided library and a user defined library.  However the important feature here is that in this context the EclipseLink bundles are being used as plain old Java jars so "OSGi" is misleading and has to be removed.
Comment 5 Neil Hauge CLA 2009-03-10 00:07:16 EDT
(In reply to comment #4)
> In the screenshot, why is the EclipseLink library given the name "OSGi
> Bundles"?  It should just be "EclipseLink" or maybe "EclipseLink 1.1".  I
> understand users may also define a library using the single EclipseLink.jar and
> we need to come up with a good way to distinguish between the provided library
> and a user defined library.  However the important feature here is that in this
> context the EclipseLink bundles are being used as plain old Java jars so "OSGi"
> is misleading and has to be removed.
> 

I think this label is a function of the JST Library Provider Framework, but we can talk to Konstantin about making this configurable.  Tran can correct me if I am wrong about this.
Comment 6 Karen Butzke CLA 2009-03-10 11:20:26 EDT
Tran, are you able to reproduce this issue?  I have checked the eclipselink plugins out from subversion, they are in my development workspace, not in my target workspace. They are in the run configuration when I run eclipse within my dev workspace.  I do not have eclipselink plugins in my target workspace.  Is this a library provider framework bug?
Comment 7 Tran Le CLA 2009-03-10 12:10:07 EDT
Created attachment 128223 [details]
Screenshot  with Eclipselink as target platform

Karen, I believe that it is a bug from the library provider framework. I have attached the screenshot for the case where Eclipselink plugins are referenced from the target platform. I noticed from your screenshot that you had both the JPA user library and the Osgi bundle, however I don’t think that is the cause.
Comment 8 Tran Le CLA 2009-03-10 12:15:35 EDT
Created attachment 128224 [details]
Screenshot with Eclipselink as target platform
Comment 9 Karen Butzke CLA 2009-03-11 10:39:49 EDT
Kosta, could you take a look at the problem I mention in comment 3?  Do you know if this is a bug in the library provider framework?  I guess the other possibility is that there is something wrong with the EclispeLink plugins that is causing this.
Comment 10 Konstantin Komissarchik CLA 2009-03-11 11:34:13 EDT
The OSGi bundles container has no support for self-hosted bundles. It only handles binary bundles.
Comment 11 Karen Butzke CLA 2009-03-11 11:36:34 EDT
Then is it a bug that I even see the EclipseLink library as an option in our wizard?  If this is not supported, then I should not be able to use that library
Comment 12 Konstantin Komissarchik CLA 2009-03-11 11:44:56 EDT
The bottom line is that the OSGi library provider is designed for the production environment. The problems that you are seeing is something that no user will ever run into. It is conceivable that this library provider could be extended to support the self-hosted usecases if there was an interesting need for that, but that entire scenario is not within the set of its current requirements.
Comment 13 Karen Butzke CLA 2009-03-11 12:35:52 EDT
good point, thanks!
Comment 14 Neil Hauge CLA 2009-03-11 13:07:12 EDT
Konstantin,

One other question that came up here was about the label used for the library, "OSGi Bundles".  We think it would make more sense to have this label correspond with the specific contents of the library, rather than the fact that they are bundles.  Would it be possible to make this configurable, and have "OSGi Bundles" perhaps be a default label.  Wanted to get your thoughts on this.
Comment 15 Konstantin Komissarchik CLA 2009-03-11 13:18:41 EDT
Sure, I can see adding ability to customize container label/description. How quickly can you open an ER?
Comment 16 Neil Hauge CLA 2009-03-11 13:42:03 EDT
(In reply to comment #15)
> Sure, I can see adding ability to customize container label/description. How
> quickly can you open an ER?
> 

Bug 268163 has been opened.
Comment 17 Tran Le CLA 2009-03-18 16:39:05 EDT
Fixed in WTP 3.1M6:
-EclipseLink library provider name
-Dali has been enable to use EclipseLink Osgi bundles 1.1.0 and 1.0.2
Comment 18 Neil Hauge CLA 2009-04-23 14:30:33 EDT
All that remains for the completion of this bug is for the EclispeLink bundles to be a part of Galileo and the Java EE package.  There are a couple of bugs related to this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=267442
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272947

Setting this to fixed in M7, since the Dali side of the work is complete.