You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by lb <lb...@gmail.com> on 2013/03/05 17:49:52 UTC

Aries-JPA Properties

Hi,

I would like to know, whatever it is possible to initialize a persistence
context using custom properties with Aries JPA, something like:

<bean id="contextWithProps">
  <jpa:context property="em" unitname="myUnit">
    <map>
      <entry key="openjpa.Log" value="slf4j"/>
      <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
    </map>
  </jpa:context></bean>

That would be really useful as the behavior of the JPA layer would then be
configurable via OSGi's ConfigAdmin.

Luca

Re: Aries-JPA Properties

Posted by lb <lb...@gmail.com>.
Done: https://issues.apache.org/jira/browse/ARIES-1023

Amend/enrich it if needed :-)


On Wed, Mar 6, 2013 at 10:20 PM, Bengt Rodehav <be...@rodehav.com> wrote:

> Yes please do that.
>
>
> 2013/3/6 Dan Tran <da...@gmail.com>
>
>> Yes please since the example does not work
>>
>>
>>
>> On Wed, Mar 6, 2013 at 9:42 AM, lb <lb...@gmail.com> wrote:
>> > Should we open a JIRA?
>> >
>> >
>> > On Wednesday, March 6, 2013, Dan Tran wrote:
>> >>
>> >> same here
>> >>
>> >> On Tue, Mar 5, 2013 at 11:40 PM, Bengt Rodehav <be...@rodehav.com>
>> wrote:
>> >> > I have been looking for the exact same thing. Putting these
>> properties
>> >> > in
>> >> > persistence.xml is, in my opininon, broken since they will, as you
>> point
>> >> > out, be hard coded.
>> >> >
>> >> > I would really appreciate a way to use the config admin for this.
>> >> >
>> >> > /Bengt
>> >> >
>> >> >
>> >> > 2013/3/6 lb <lb...@gmail.com>
>> >> >>
>> >> >> Yes I know but then the properties are hardcoded and to change them
>> I
>> >> >> have
>> >> >> to redeploy a bundle. Would be nice to be able to configure the
>> >> >> persistence
>> >> >> unit at runtime. In the aries jpa project page there is an example
>> for
>> >> >> an
>> >> >> extended persistence context but it does not work.
>> >> >>
>> >> >>
>> >> >> On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:
>> >> >>>
>> >> >>> You can put those in your persistence.xml
>> >> >>>
>> >> >>> kind regards,
>> >> >>> christoph
>> >> >>>
>> >> >>> On 2013-03-05 17:49, lb wrote:
>> >> >>>>
>> >> >>>> Hi,
>> >> >>>>
>> >> >>>> I would like to know, whatever it is possible to initialize a
>> >> >>>> persistence
>> >> >>>> context using custom properties with Aries JPA, something like:
>> >> >>>>
>> >> >>>> <bean id="contextWithProps">
>> >> >>>>    <jpa:context property="em" unitname="myUnit">
>> >> >>>>      <map>
>> >> >>>>        <entry key="openjpa.Log" value="slf4j"/>
>> >> >>>>        <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
>> >> >>>>      </map>
>> >> >>>>    </jpa:context></bean>
>> >> >>>>
>> >> >>>> That would be really useful as the behavior of the JPA layer would
>> >> >>>> then
>> >> >>>> be
>> >> >>>> configurable via OSGi's ConfigAdmin.
>> >> >>>>
>> >> >>>> Luca
>> >> >>>>
>> >> >>>
>> >> >>>
>> >> >
>>
>
>

Re: Aries-JPA Properties

Posted by Bengt Rodehav <be...@rodehav.com>.
Yes please do that.


2013/3/6 Dan Tran <da...@gmail.com>

> Yes please since the example does not work
>
>
>
> On Wed, Mar 6, 2013 at 9:42 AM, lb <lb...@gmail.com> wrote:
> > Should we open a JIRA?
> >
> >
> > On Wednesday, March 6, 2013, Dan Tran wrote:
> >>
> >> same here
> >>
> >> On Tue, Mar 5, 2013 at 11:40 PM, Bengt Rodehav <be...@rodehav.com>
> wrote:
> >> > I have been looking for the exact same thing. Putting these properties
> >> > in
> >> > persistence.xml is, in my opininon, broken since they will, as you
> point
> >> > out, be hard coded.
> >> >
> >> > I would really appreciate a way to use the config admin for this.
> >> >
> >> > /Bengt
> >> >
> >> >
> >> > 2013/3/6 lb <lb...@gmail.com>
> >> >>
> >> >> Yes I know but then the properties are hardcoded and to change them I
> >> >> have
> >> >> to redeploy a bundle. Would be nice to be able to configure the
> >> >> persistence
> >> >> unit at runtime. In the aries jpa project page there is an example
> for
> >> >> an
> >> >> extended persistence context but it does not work.
> >> >>
> >> >>
> >> >> On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:
> >> >>>
> >> >>> You can put those in your persistence.xml
> >> >>>
> >> >>> kind regards,
> >> >>> christoph
> >> >>>
> >> >>> On 2013-03-05 17:49, lb wrote:
> >> >>>>
> >> >>>> Hi,
> >> >>>>
> >> >>>> I would like to know, whatever it is possible to initialize a
> >> >>>> persistence
> >> >>>> context using custom properties with Aries JPA, something like:
> >> >>>>
> >> >>>> <bean id="contextWithProps">
> >> >>>>    <jpa:context property="em" unitname="myUnit">
> >> >>>>      <map>
> >> >>>>        <entry key="openjpa.Log" value="slf4j"/>
> >> >>>>        <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
> >> >>>>      </map>
> >> >>>>    </jpa:context></bean>
> >> >>>>
> >> >>>> That would be really useful as the behavior of the JPA layer would
> >> >>>> then
> >> >>>> be
> >> >>>> configurable via OSGi's ConfigAdmin.
> >> >>>>
> >> >>>> Luca
> >> >>>>
> >> >>>
> >> >>>
> >> >
>

Re: Aries-JPA Properties

Posted by Dan Tran <da...@gmail.com>.
Yes please since the example does not work



On Wed, Mar 6, 2013 at 9:42 AM, lb <lb...@gmail.com> wrote:
> Should we open a JIRA?
>
>
> On Wednesday, March 6, 2013, Dan Tran wrote:
>>
>> same here
>>
>> On Tue, Mar 5, 2013 at 11:40 PM, Bengt Rodehav <be...@rodehav.com> wrote:
>> > I have been looking for the exact same thing. Putting these properties
>> > in
>> > persistence.xml is, in my opininon, broken since they will, as you point
>> > out, be hard coded.
>> >
>> > I would really appreciate a way to use the config admin for this.
>> >
>> > /Bengt
>> >
>> >
>> > 2013/3/6 lb <lb...@gmail.com>
>> >>
>> >> Yes I know but then the properties are hardcoded and to change them I
>> >> have
>> >> to redeploy a bundle. Would be nice to be able to configure the
>> >> persistence
>> >> unit at runtime. In the aries jpa project page there is an example for
>> >> an
>> >> extended persistence context but it does not work.
>> >>
>> >>
>> >> On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:
>> >>>
>> >>> You can put those in your persistence.xml
>> >>>
>> >>> kind regards,
>> >>> christoph
>> >>>
>> >>> On 2013-03-05 17:49, lb wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> I would like to know, whatever it is possible to initialize a
>> >>>> persistence
>> >>>> context using custom properties with Aries JPA, something like:
>> >>>>
>> >>>> <bean id="contextWithProps">
>> >>>>    <jpa:context property="em" unitname="myUnit">
>> >>>>      <map>
>> >>>>        <entry key="openjpa.Log" value="slf4j"/>
>> >>>>        <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
>> >>>>      </map>
>> >>>>    </jpa:context></bean>
>> >>>>
>> >>>> That would be really useful as the behavior of the JPA layer would
>> >>>> then
>> >>>> be
>> >>>> configurable via OSGi's ConfigAdmin.
>> >>>>
>> >>>> Luca
>> >>>>
>> >>>
>> >>>
>> >

Re: Aries-JPA Properties

Posted by lb <lb...@gmail.com>.
Should we open a JIRA?

On Wednesday, March 6, 2013, Dan Tran wrote:

> same here
>
> On Tue, Mar 5, 2013 at 11:40 PM, Bengt Rodehav <bengt@rodehav.com<javascript:;>>
> wrote:
> > I have been looking for the exact same thing. Putting these properties in
> > persistence.xml is, in my opininon, broken since they will, as you point
> > out, be hard coded.
> >
> > I would really appreciate a way to use the config admin for this.
> >
> > /Bengt
> >
> >
> > 2013/3/6 lb <lburgazzoli@gmail.com <javascript:;>>
> >>
> >> Yes I know but then the properties are hardcoded and to change them I
> have
> >> to redeploy a bundle. Would be nice to be able to configure the
> persistence
> >> unit at runtime. In the aries jpa project page there is an example for
> an
> >> extended persistence context but it does not work.
> >>
> >>
> >> On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:
> >>>
> >>> You can put those in your persistence.xml
> >>>
> >>> kind regards,
> >>> christoph
> >>>
> >>> On 2013-03-05 17:49, lb wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> I would like to know, whatever it is possible to initialize a
> >>>> persistence
> >>>> context using custom properties with Aries JPA, something like:
> >>>>
> >>>> <bean id="contextWithProps">
> >>>>    <jpa:context property="em" unitname="myUnit">
> >>>>      <map>
> >>>>        <entry key="openjpa.Log" value="slf4j"/>
> >>>>        <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
> >>>>      </map>
> >>>>    </jpa:context></bean>
> >>>>
> >>>> That would be really useful as the behavior of the JPA layer would
> then
> >>>> be
> >>>> configurable via OSGi's ConfigAdmin.
> >>>>
> >>>> Luca
> >>>>
> >>>
> >>>
> >
>

Re: Aries-JPA Properties

Posted by Dan Tran <da...@gmail.com>.
same here

On Tue, Mar 5, 2013 at 11:40 PM, Bengt Rodehav <be...@rodehav.com> wrote:
> I have been looking for the exact same thing. Putting these properties in
> persistence.xml is, in my opininon, broken since they will, as you point
> out, be hard coded.
>
> I would really appreciate a way to use the config admin for this.
>
> /Bengt
>
>
> 2013/3/6 lb <lb...@gmail.com>
>>
>> Yes I know but then the properties are hardcoded and to change them I have
>> to redeploy a bundle. Would be nice to be able to configure the persistence
>> unit at runtime. In the aries jpa project page there is an example for an
>> extended persistence context but it does not work.
>>
>>
>> On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:
>>>
>>> You can put those in your persistence.xml
>>>
>>> kind regards,
>>> christoph
>>>
>>> On 2013-03-05 17:49, lb wrote:
>>>>
>>>> Hi,
>>>>
>>>> I would like to know, whatever it is possible to initialize a
>>>> persistence
>>>> context using custom properties with Aries JPA, something like:
>>>>
>>>> <bean id="contextWithProps">
>>>>    <jpa:context property="em" unitname="myUnit">
>>>>      <map>
>>>>        <entry key="openjpa.Log" value="slf4j"/>
>>>>        <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
>>>>      </map>
>>>>    </jpa:context></bean>
>>>>
>>>> That would be really useful as the behavior of the JPA layer would then
>>>> be
>>>> configurable via OSGi's ConfigAdmin.
>>>>
>>>> Luca
>>>>
>>>
>>>
>

Re: Aries-JPA Properties

Posted by Bengt Rodehav <be...@rodehav.com>.
I have been looking for the exact same thing. Putting these properties in
persistence.xml is, in my opininon, broken since they will, as you point
out, be hard coded.

I would really appreciate a way to use the config admin for this.

/Bengt


2013/3/6 lb <lb...@gmail.com>

> Yes I know but then the properties are hardcoded and to change them I have
> to redeploy a bundle. Would be nice to be able to configure the persistence
> unit at runtime. In the aries jpa project page there is an example for an
> extended persistence context but it does not work.
>
>
> On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:
>
>> You can put those in your persistence.xml
>>
>> kind regards,
>> christoph
>>
>> On 2013-03-05 17:49, lb wrote:
>>
>>> Hi,
>>>
>>> I would like to know, whatever it is possible to initialize a persistence
>>> context using custom properties with Aries JPA, something like:
>>>
>>> <bean id="contextWithProps">
>>>    <jpa:context property="em" unitname="myUnit">
>>>      <map>
>>>        <entry key="openjpa.Log" value="slf4j"/>
>>>        <entry key="openjpa.jdbc.**DBDictionary" value="hsql"/>
>>>      </map>
>>>    </jpa:context></bean>
>>>
>>> That would be really useful as the behavior of the JPA layer would then
>>> be
>>> configurable via OSGi's ConfigAdmin.
>>>
>>> Luca
>>>
>>>
>>
>>

Re: Aries-JPA Properties

Posted by lb <lb...@gmail.com>.
Yes I know but then the properties are hardcoded and to change them I have
to redeploy a bundle. Would be nice to be able to configure the persistence
unit at runtime. In the aries jpa project page there is an example for an
extended persistence context but it does not work.

On Tuesday, March 5, 2013, Christoph Gritschenberger wrote:

> You can put those in your persistence.xml
>
> kind regards,
> christoph
>
> On 2013-03-05 17:49, lb wrote:
>
>> Hi,
>>
>> I would like to know, whatever it is possible to initialize a persistence
>> context using custom properties with Aries JPA, something like:
>>
>> <bean id="contextWithProps">
>>    <jpa:context property="em" unitname="myUnit">
>>      <map>
>>        <entry key="openjpa.Log" value="slf4j"/>
>>        <entry key="openjpa.jdbc.**DBDictionary" value="hsql"/>
>>      </map>
>>    </jpa:context></bean>
>>
>> That would be really useful as the behavior of the JPA layer would then be
>> configurable via OSGi's ConfigAdmin.
>>
>> Luca
>>
>>
>
>

Re: Aries-JPA Properties

Posted by Christoph Gritschenberger <ch...@gmail.com>.
You can put those in your persistence.xml

kind regards,
christoph

On 2013-03-05 17:49, lb wrote:
> Hi,
>
> I would like to know, whatever it is possible to initialize a persistence
> context using custom properties with Aries JPA, something like:
>
> <bean id="contextWithProps">
>    <jpa:context property="em" unitname="myUnit">
>      <map>
>        <entry key="openjpa.Log" value="slf4j"/>
>        <entry key="openjpa.jdbc.DBDictionary" value="hsql"/>
>      </map>
>    </jpa:context></bean>
>
> That would be really useful as the behavior of the JPA layer would then be
> configurable via OSGi's ConfigAdmin.
>
> Luca
>