Closed glassfishrobot closed 14 years ago
@glassfishrobot Commented mvatkina said: it's an error in the sample: APP_NAME should be used only to simulate an ear name. For a single EJB module it shouldn't be used.
@glassfishrobot Commented mvatkina said: ...
@glassfishrobot Commented mvatkina said: removed use of APP_NAME:
Sending ejb-embedded/ejb-embedded-client/src/java/ejb/embedded/client/TestClient.java Sending ejb-embedded/nbtest/src/java/ejb/embedded/client/SimpleEjbTest.java Sending ejb-embedded/test/src/java/ejb/embedded/client/SimpleEjbTest.java Transmitting file data ... Committed revision 777.
@glassfishrobot Commented sherryshen said: Verified the fix from sqe tests.
@glassfishrobot Commented @vkraemer said: it looks like this change broke the test ejb from NetBeans case.
I will probably need to revert the changes in the nbtest directory.
I will test the NB case and the command-line case before I commit the change...
@glassfishrobot Commented Was assigned to mvatkina
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-12113
@glassfishrobot Commented Reported by sherryshen
@glassfishrobot Commented Marked as fixed on Tuesday, July 27th 2010, 6:00:58 am
glassfish-3.1-b03.zip This test is based on JavaEE 6 sample. glassfish/samples/javaee6/ejb/ejb-embedded
The test failed to lookup ejb. javax.ejb.embeddable.EJBContainer in TestClient.java
Map<String, Object> p = new HashMap<String, Object>(); p.put(EJBContainer.APP_NAME, "sample"); EJBContainer c = null; try { c = EJBContainer.createEJBContainer(p); Context ic = c.getContext(); TestEJB ejb = (TestEJB) ic.lookup("java:global/sample/TestEJB");
To reproduce the issue: With sqe source and env, do "ant all" in appserver-sqe/pe/ejb/ejb31/embedslsbcmt and see error. [java] Looking up EJB... [java] ---test(): Got Ex in--- [java] javax.naming.NamingException: Lookup failed for 'java:global/sample/TestEJB' in SerialContext [Root exception is javax.naming.NameNotFoundException: sample] [java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:456) [java] at javax.naming.InitialContext.lookup(InitialContext.java:392) [java] at javax.naming.InitialContext.lookup(InitialContext.java:392) [java] at ejb.embed.client.TestClient.test(TestClient.java:58) [java] at ejb.embed.client.TestClient.main(TestClient.java:28) [java] Caused by: javax.naming.NameNotFoundException: sample [java] at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:266) [java] at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:185) [java] at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:186) [java] at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:72) [java] at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:115) [java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:444) [java] ... 4 more [java] Closing container ...
The same test passed on v3.0.1 b20 with following related output. [java] Looking up EJB... [java] Invoking EJB... [java] Inserting entities... ....
[java] ----------------------------------------- [java] - EJB31-embedslsbcmt:jpa: PASS - [java] -----------------------------------------
For sqe test source and env, please see http://agni-1.sfbay.sun.com/JSPWiki/Wiki.jsp?page=SQECoreFULL
Environment
Operating System: All Platform: All
Affected Versions
[3.1]