Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] RE: JBoss JNDI lookup issue around "Not a compound name"

Daoqi,
    1) If both changing the JTA datasource name and running as STRING_LOOKUP do not fix your issue then I suspect you are seeing some configuration issue with your datasource - or an issue running on Derby - as our examples run on Oracle 10/11.  We may need to retest on Derby to reproduce it. 
    Currently we are working fine on JBoss 4/5 using generic stateless session beans to inject the em and a servlet or java se client that either injects or looks up the session bean.

    Verify your jdbc global scoped datasource setup in the configuration xml files on the server at
        http://wiki.eclipse.org/EclipseLink/Examples/JPA/JBoss_Web_Tutorial#JBoss_Server_Configuration_Changes

    See also a migration of the JBoss published jsfejb3.ear as an example
        http://wiki.eclipse.org/EclipseLink/Examples/JPA/Migration/JBoss

    For an example of the generic JPA EAR project that is used in all our examples - you may refer to the WebLogic one that is the same except for some configuration files and the SessionCustomizer. - until the JBoss specific ones are uploaded to SVN as part of bug# 250477
        http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.common.ddlgen/
        http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEAR/
        http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB/
        http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.weblogic.enterpriseWeb/


    2) Yes, the SessionCustomizer interface has been moved since the JBoss 4.2.2 based tutorial was written - it is now at the following config package location - wiki updated, thank you.
    There is an open bug# 260383 for servers based on the Catalina container that would add this JNDIConnector lookupType change into the platform class - you may vote for it - this would take the place of providing a SessionCustomizerImpl.  However this would only be after we verify whether JBoss 5 can run with COMPOSITE_NAME_LOOKUP which it looks like it does.

org.eclipse.persistence.config.SessionCustomizer

The following bug is a proposed enhancement for a STRING_LOOKUP JNDI default for Catalina based servers
http://bugs.eclipse.org/260383


    I am running JBoss 4.2.2 (where the SessionCustomizer is required) but Kevin is running JBoss 5.0 GA (where we no longer require the SessionCustomizer)
    I will reverify for JBoss 5.0 GA and update the wiki and post any changes shortly as part of enhancement bugs bug# 252965 and bug# 250477

For reference:
The following ELUG wiki has been updated to reflect the new package name - thank you
http://bugs.eclipse.org/229763
The following tutorial wiki bug is in progress for a test of JBoss 5.0 GA
http://bugs.eclipse.org/250477
The following bug is tracking our testing, documentation and possible platform change for the new JBoss 5.0 GA release
http://bugs.eclipse.org/252965

thank you
/michael


Kevin Yuan wrote:
Hi Daoqi,
I haven't SessionCustomizer in my persistence.xml, and the following is my persistence.xml:

<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
    <persistence-unit name="default">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>java:/EclipseLinkDS</jta-data-source>
        <properties>
            <property name="eclipselink.target-server" value="JBoss"/>
            <property name="eclipselink.validate-existence" value="true"/>
            <!--property name="eclipselink.logging.level" value="FINEST"/-->
        </properties>
    </persistence-unit>
</persistence>

Regards,
Kevin

Yang, Daoqi (D.) wrote:
Kevin:

Regarding to the datasource issue in Jboss 5.0 GA, per your sugestion, I tested with  

<jta-data-source>java:/jpaTestJtaDS</jta-data-source>

However, it still gives me the same error. You mentioned that it went well when you tested EclipseLink with JBoss GA 5.0.
What is your EclipseLink and Jboss related configuration inside persistence.xml? Did you configure a SessionCustomizer?
Do you mind sharing your persistence.xml file?

Michael:
Your suggestion to configure a SessionCustomer seems to be on the right track so that EclipseLink JNDIConnector will be using
STRING_LOOKUP instead of "COMPOSITE_NAME_LOOKUP". However, when I tried to define a session customizer, I found the base class

org.eclipse.persistence.internal.sessions.factories.SessionCustomizer;

No long exists in EclipseLin 1.0.2. I suspect that a common string lookup session customizer class would be included with the distribution of EclipseLink so that a developer can just configure it inside persistence.xml without having to extending the base class. Is this the case? If not, could you point out the new base class for session customizers? 

Many thanks,


Regards,
Daoqi  Yang
Application Technology Architect
Ford Java Center of Excellence, E1F001 iTek
dyang11@xxxxxxxx, 313-206-3960

  


_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top