You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Jarek Gawor <jg...@gmail.com> on 2010/03/26 05:50:50 UTC

JPA & WAB question

Hi,

The Aries OSGi JPA implementation claims that "WABs that use JPA are
not supported as part of the OSGi JPA specification". I can't find any
such text in the OSGi JPA spec. Does anybody know where that's
described or why that is?

Thanks,
Jarek

Re: JPA & WAB question

Posted by Lin Sun <li...@gmail.com>.
Hi,

It seems to me that the current Aries JPA implementation won't process
WAB for persistence bundle, however a WAB could still be a persistence
client.  Does this sound right?

Lin

On Fri, Mar 26, 2010 at 12:50 AM, Jarek Gawor <jg...@gmail.com> wrote:
> Hi,
>
> The Aries OSGi JPA implementation claims that "WABs that use JPA are
> not supported as part of the OSGi JPA specification". I can't find any
> such text in the OSGi JPA spec. Does anybody know where that's
> described or why that is?
>
> Thanks,
> Jarek
>

Re: JPA & WAB question

Posted by Jarek Gawor <jg...@gmail.com>.
Valentin, Tim,

So because there is no integration for web container, the JPA extender
is ignoring the WABs? If so, that seems weird. Just because there is
no integration, JPA shouldn't ignore the bundles. We might provide
that integration in Geronimo but we need the JPA extender to process
the persistence.xml resources. Unless of course I'm still missing or
misunderstanding something.

Jarek

On Mon, Mar 29, 2010 at 10:09 AM, Timothy Ward <ti...@apache.org> wrote:
>
> Hi Jarek,
>
> The JPA service specification does not cover any form of managed JPA. The Aries JPA code is not an implementation of the JPA service specification, but attempts to use concepts defined by that specification to provide managed JPA in an OSGi environment. This should hopefully feed back into future versions of the OSGi service specification.
>
> Currently, as Valentin points out, there is no integration mechanism that we can use to plug the Aries JPA container into a web container to provide injection into servlets. We felt it safer to temporarily disable WAB persistence units in the Aries container until such support was available. We also need to consider the case where the web container already has JEE style support for WAR persistence units.
>
> I hope to be able to write a plugin for the Pax webcontainer to demonstrate how integration can be supported through the existing injection plugin (used by the blueprint integration layer). This should not be a difficult task, and I would hope that porting the code to other web containers is trivial. Once this support is present I would have no issue with removing the restriction in the Aries JPA container.
>
> I too would like to hear your use case, as it should be useful in driving further implementation of the JPA web container integration.
>
> Regards,
>
> Tim
>
> ----------------------------------------
>> From: vmahrwald@googlemail.com
>> To: aries-dev@incubator.apache.org
>> Subject: Re: JPA & WAB question
>> Date: Fri, 26 Mar 2010 07:05:34 +0000
>>
>> Hi Jarek,
>>
>> that is correct, the OSGi JPA spec is agnostic of web bundles
>> altogether.
>>
>> Now, in a servlet 2.5 webcontainer there are certain assumptions a
>> developer can make about how JPA works, including say injecting
>> persistence contexts. These we cannot satisfy from the Aries JPA
>> container. Instead this kind of support needs to be provided chiefly
>> by the webcontainer. Hence, as an initial starting point Tim and I
>> have decided to explicitly exclude WABs from being handled by our JPA
>> container. (Maybe the message should read "JPA support for WABs is not
>> covered by the OSGi JPA specification" to be clearer?)
>>
>> The plan is then hopefully to reuse bits of our JPA container
>> implementation to facilitate adding JPA functionality to any given
>> OSGi webcontainer. Have you got a use case in mind for Geronimo?
>>
>> Regards,
>>
>> Valentin
>>
>> On 26 Mar 2010, at 04:50, Jarek Gawor wrote:
>>
>>> Hi,
>>>
>>> The Aries OSGi JPA implementation claims that "WABs that use JPA are
>>> not supported as part of the OSGi JPA specification". I can't find any
>>> such text in the OSGi JPA spec. Does anybody know where that's
>>> described or why that is?
>>>
>>> Thanks,
>>> Jarek
>>
>
> _________________________________________________________________
> Tell us your greatest, weirdest and funniest Hotmail stories
> http://clk.atdmt.com/UKM/go/195013117/direct/01/

RE: JPA & WAB question

Posted by Timothy Ward <ti...@apache.org>.
Hi Jarek,

The JPA service specification does not cover any form of managed JPA. The Aries JPA code is not an implementation of the JPA service specification, but attempts to use concepts defined by that specification to provide managed JPA in an OSGi environment. This should hopefully feed back into future versions of the OSGi service specification.

Currently, as Valentin points out, there is no integration mechanism that we can use to plug the Aries JPA container into a web container to provide injection into servlets. We felt it safer to temporarily disable WAB persistence units in the Aries container until such support was available. We also need to consider the case where the web container already has JEE style support for WAR persistence units.

I hope to be able to write a plugin for the Pax webcontainer to demonstrate how integration can be supported through the existing injection plugin (used by the blueprint integration layer). This should not be a difficult task, and I would hope that porting the code to other web containers is trivial. Once this support is present I would have no issue with removing the restriction in the Aries JPA container.

I too would like to hear your use case, as it should be useful in driving further implementation of the JPA web container integration. 

Regards,

Tim

----------------------------------------
> From: vmahrwald@googlemail.com
> To: aries-dev@incubator.apache.org
> Subject: Re: JPA & WAB question
> Date: Fri, 26 Mar 2010 07:05:34 +0000
>
> Hi Jarek,
>
> that is correct, the OSGi JPA spec is agnostic of web bundles
> altogether.
>
> Now, in a servlet 2.5 webcontainer there are certain assumptions a
> developer can make about how JPA works, including say injecting
> persistence contexts. These we cannot satisfy from the Aries JPA
> container. Instead this kind of support needs to be provided chiefly
> by the webcontainer. Hence, as an initial starting point Tim and I
> have decided to explicitly exclude WABs from being handled by our JPA
> container. (Maybe the message should read "JPA support for WABs is not
> covered by the OSGi JPA specification" to be clearer?)
>
> The plan is then hopefully to reuse bits of our JPA container
> implementation to facilitate adding JPA functionality to any given
> OSGi webcontainer. Have you got a use case in mind for Geronimo?
>
> Regards,
>
> Valentin
>
> On 26 Mar 2010, at 04:50, Jarek Gawor wrote:
>
>> Hi,
>>
>> The Aries OSGi JPA implementation claims that "WABs that use JPA are
>> not supported as part of the OSGi JPA specification". I can't find any
>> such text in the OSGi JPA spec. Does anybody know where that's
>> described or why that is?
>>
>> Thanks,
>> Jarek
>
 		 	   		  
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Re: JPA & WAB question

Posted by Valentin Mahrwald <vm...@googlemail.com>.
Hi Jarek,

that is correct, the OSGi JPA spec is agnostic of web bundles  
altogether.

Now, in a servlet 2.5 webcontainer there are certain assumptions a  
developer can make about how JPA works, including say injecting  
persistence contexts. These we cannot satisfy from the Aries JPA  
container. Instead this kind of support needs to be provided chiefly  
by the webcontainer. Hence, as an initial starting point Tim and I  
have decided to explicitly exclude WABs from being handled by our JPA  
container. (Maybe the message should read "JPA support for WABs is not  
covered by the OSGi JPA specification" to be clearer?)

The plan is then hopefully to reuse bits of our JPA container  
implementation to facilitate adding JPA functionality to any given  
OSGi webcontainer. Have you got a use case in mind for Geronimo?

Regards,

Valentin

On 26 Mar 2010, at 04:50, Jarek Gawor wrote:

> Hi,
>
> The Aries OSGi JPA implementation claims that "WABs that use JPA are
> not supported as part of the OSGi JPA specification". I can't find any
> such text in the OSGi JPA spec. Does anybody know where that's
> described or why that is?
>
> Thanks,
> Jarek