aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Ward (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1642) Aries JPA container cannot be used without Configuration Admin
Date Mon, 09 Jan 2017 14:40:58 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15811922#comment-15811922
] 

Timothy Ward commented on ARIES-1642:
-------------------------------------

> I also think we should rather not make config admin optional

I don't want to make the package dependency optional, but if no configuration admin service
implementation is present then Aries JPA should still work.

> So the only solution is to call createAndPublishEMF on start with default properties
and then destroy EMF and call another time createAndPublishEMF with custom properties.
I'm not sure if this behaviour is right one.

That behaviour sounds right to me. It's exactly what would happen if Configuration Admin were
present, and someone created a configuration for an EMF that was previously unconfigured.

> Aries JPA container cannot be used without Configuration Admin
> --------------------------------------------------------------
>
>                 Key: ARIES-1642
>                 URL: https://issues.apache.org/jira/browse/ARIES-1642
>             Project: Aries
>          Issue Type: Bug
>          Components: JPA
>    Affects Versions: jpa-2.5.0
>            Reporter: Timothy Ward
>
> The Aries JPA ManagedEMF registers a managed service factory for each "complete" EntityManagerFactory
service. This isn't part of the JPA service specification, but does provide a nice way to
fix up clients which don't use the EMFBuilder.
> The problem is that if no Config Admin is available in the framework then no EMF service
is ever registered!
> The only call to createAndPublishEMF is from the updated method, and the updated method
is only called if Config Admin is running!
> https://github.com/apache/aries/blob/d85be2b8f8a026cb1959c83ceb4ed812cd9d1279/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/ManagedEMF.java#L128
> Having a running Configuration Admin should not be a hard requirement for Aries JPA.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message