Bundle startup order timing impacts JpaTemplate service registration

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bundle startup order timing impacts JpaTemplate service registration

Dheeraj Guntupalli
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


Reply | Threaded
Open this post in threaded view
|

Re: Bundle startup order timing impacts JpaTemplate service registration

Christian Schneider
Can you provide example code for this behaviour?

Christian

Am Mi., 3. Apr. 2019 um 07:13 Uhr schrieb Dheeraj Guntupalli <[hidden email]>:
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

Reply | Threaded
Open this post in threaded view
|

Re: Bundle startup order timing impacts JpaTemplate service registration

Dheeraj Guntupalli
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, <[hidden email]> wrote:
Can you provide example code for this behaviour?

Christian

Am Mi., 3. Apr. 2019 um 07:13 Uhr schrieb Dheeraj Guntupalli <[hidden email]>:
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


stacktrace.txt (23K) Download Attachment