camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-6798) JPAComponent: unable to find EntityManagerFactory in JNDIRegistry
Date Sun, 29 Sep 2013 09:57:24 GMT


Claus Ibsen resolved CAMEL-6798.

    Resolution: Duplicate
      Assignee: Claus Ibsen

There is another JIRA about JNDIRegistry should be improved to implement these methods also.

> JPAComponent: unable to find EntityManagerFactory in JNDIRegistry
> -----------------------------------------------------------------
>                 Key: CAMEL-6798
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-jpa
>    Affects Versions: 2.12.0, 2.12.1
>            Reporter: Alessandro Baldoni
>            Assignee: Claus Ibsen
> When using a JNDIRegistry in a Camel context to make a JPA EntityManagerFactory available
to a JPAComponent (required when running Camel in a Java EE container), the JPAComponent is
unable to find it due do this line:
>             Map<String, EntityManagerFactory> map = getCamelContext().getRegistry().findByTypeWithName(EntityManagerFactory.class);
> since the method findByTypeWithName in JNDIRegistry is unimplemented (returns a null
> This forces to fallback to a SimpleRegistry or to a Spring registry, thus making impossible
to use the JAVA EE container JNDI registry.
> Proposted solution: At present, JNDI does not allow lookups based on a class.
> My suggestion is to lookup the EntityManagerFactory by a standard name, such as when
looking for the default persistence unit name (and eventually adding a property for the JPA
URL in order to use a custom name).

This message was sent by Atlassian JIRA

View raw message