You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by Dheeraj Guntupalli <re...@gmail.com> on 2019/04/03 05:12:59 UTC

Bundle startup order timing impacts JpaTemplate service registration

Hello All,

This is in continuation to the previous post below, some how unable to
reply to that post directly and created a new post.

http://mail-archives.apache.org/mod_mbox/aries-user/201812.mbox/%3Cb2f0a69a-5e6b-d77b-6386-46aaeec5e5a5%40googlemail.com%3E



We have separate databases db1 and db2, and db1 has two schemas schema1,
schema2, and db2 has just one schema. We have separate persistent units
(bundles) for each schema. When we deploy this for the first time we
observed that we are not able to get JPATemplate service for db1, but for
db2 the service is working fine. This occurs frequently i.e. if we deploy
this for the first time, we are able to reproduce the issue 5 out of 10
times.



We observed that if component1 references this JpaTemplate service, and
component2 references component1, and component2 activate method operation
takes time, we see that JpaTemplate for the remaining two persistent units
are not registered. This occurs 4 out of 10 times.



When we removed this operation inside component2 activate method, we are
able to see the JpaTemplate services registered for all three persistent
units.



So it appears that the bundle startup order/timing has an impact on
provisioning of the JpaTemplate services – which it shouldn’t. Is this
observed by others too? And how to resolve this?



Thanks & Regards,

Dheeraj

Re: Bundle startup order timing impacts JpaTemplate service registration

Posted by Dheeraj Guntupalli <re...@gmail.com>.
Hello Christian,

Thank you for the quick reply, while we try to create example code to
reproduce the issue, attaching the stack trace we see on thread dump.

We used Aries JPA 2.7.2, karaf 4.2.4 and pax jdbc 1.3.4

Thanks & regards,
Dheeraj

On Thu 4 Apr, 2019, 1:21 AM Christian Schneider, <ch...@die-schneider.net>
wrote:

> Can you provide example code for this behaviour?
>
> Christian
>
> Am Mi., 3. Apr. 2019 um 07:13 Uhr schrieb Dheeraj Guntupalli <
> reindheer@gmail.com>:
>
>> Hello All,
>>
>> This is in continuation to the previous post below, some how unable to
>> reply to that post directly and created a new post.
>>
>>
>> http://mail-archives.apache.org/mod_mbox/aries-user/201812.mbox/%3Cb2f0a69a-5e6b-d77b-6386-46aaeec5e5a5%40googlemail.com%3E
>>
>>
>>
>> We have separate databases db1 and db2, and db1 has two schemas schema1,
>> schema2, and db2 has just one schema. We have separate persistent units
>> (bundles) for each schema. When we deploy this for the first time we
>> observed that we are not able to get JPATemplate service for db1, but for
>> db2 the service is working fine. This occurs frequently i.e. if we deploy
>> this for the first time, we are able to reproduce the issue 5 out of 10
>> times.
>>
>>
>>
>> We observed that if component1 references this JpaTemplate service, and
>> component2 references component1, and component2 activate method operation
>> takes time, we see that JpaTemplate for the remaining two persistent units
>> are not registered. This occurs 4 out of 10 times.
>>
>>
>>
>> When we removed this operation inside component2 activate method, we are
>> able to see the JpaTemplate services registered for all three persistent
>> units.
>>
>>
>>
>> So it appears that the bundle startup order/timing has an impact on
>> provisioning of the JpaTemplate services – which it shouldn’t. Is this
>> observed by others too? And how to resolve this?
>>
>>
>>
>> Thanks & Regards,
>>
>> Dheeraj
>>
>>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>

Re: Bundle startup order timing impacts JpaTemplate service registration

Posted by Christian Schneider <ch...@die-schneider.net>.
Can you provide example code for this behaviour?

Christian

Am Mi., 3. Apr. 2019 um 07:13 Uhr schrieb Dheeraj Guntupalli <
reindheer@gmail.com>:

> Hello All,
>
> This is in continuation to the previous post below, some how unable to
> reply to that post directly and created a new post.
>
>
> http://mail-archives.apache.org/mod_mbox/aries-user/201812.mbox/%3Cb2f0a69a-5e6b-d77b-6386-46aaeec5e5a5%40googlemail.com%3E
>
>
>
> We have separate databases db1 and db2, and db1 has two schemas schema1,
> schema2, and db2 has just one schema. We have separate persistent units
> (bundles) for each schema. When we deploy this for the first time we
> observed that we are not able to get JPATemplate service for db1, but for
> db2 the service is working fine. This occurs frequently i.e. if we deploy
> this for the first time, we are able to reproduce the issue 5 out of 10
> times.
>
>
>
> We observed that if component1 references this JpaTemplate service, and
> component2 references component1, and component2 activate method operation
> takes time, we see that JpaTemplate for the remaining two persistent units
> are not registered. This occurs 4 out of 10 times.
>
>
>
> When we removed this operation inside component2 activate method, we are
> able to see the JpaTemplate services registered for all three persistent
> units.
>
>
>
> So it appears that the bundle startup order/timing has an impact on
> provisioning of the JpaTemplate services – which it shouldn’t. Is this
> observed by others too? And how to resolve this?
>
>
>
> Thanks & Regards,
>
> Dheeraj
>
>

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com