Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] bug 297332: JNDI lookupstring for SessionBeanTests on NetWeaver

Hi Adrian,
The changes with the test code are fine, and also verified the tests on WLS. But the minimum change should add jndi lookup for NetWeaver after JBoss and before "All lookups failed", and don't need to move back all other code, just like the following:

            try {
                service = (EmployeeService) PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/EmployeeService"), EmployeeService.class);
            } catch (NameNotFoundException notFoundException) {
                try {
                    service = (EmployeeService) PortableRemoteObject.narrow(context.lookup("ejb/EmployeeService"), EmployeeService.class);
                } catch (NameNotFoundException notFoundException2) {
                    try {
                        // WLS likes this one.
                        service = (EmployeeService) PortableRemoteObject.narrow(context.lookup("EmployeeService#org.eclipse.persistence.testing.models.jpa.sessionbean.EmployeeService"), EmployeeService.class);
                    } catch (NameNotFoundException notFoundException3) {
                        try {
                             //jboss likes this one
                             service = (EmployeeService) PortableRemoteObject.narrow(context.lookup("EmployeeService/remote"), EmployeeService.class);
                        } catch (NameNotFoundException notFoundException4) {
                             try {
                                 // NetWeaver likes this one.
                                 service = (EmployeeService) PortableRemoteObject.narrow(context.lookup("JavaEE/servertest/REMOTE/EmployeeServiceBean/org.eclipse.persistence.testing.models.jpa.sessionbean.EmployeeService"), EmployeeService.class);
                             } catch (NameNotFoundException notFoundException5) {
                                 throw new Error("All lookups failed.", notFoundException);

By the way, if you want to run nativeapitest in server-test-lrg, you also need to make the same changes with: trunk\jpa\eclipselink.jpa.test\src\org\eclipse\persistence\testing\tests\nativeapitest\


Goerler, Adrian wrote:
on NetWeaver, we are having an issue with the SessionBeanTests as the JNDI lookup string used by NetWeaver is not among the strings tried by the test:
I am proposing a patch, which fixes the issue on NetWeaver. Please review and give feedback.
Adrian Görler

Pflichtangaben/Mandatory Disclosure Statements:

_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx

Back to the top