Hello,
I am currently testing Session EJBs that has only local intefaces.
It was compiled and deployed with no problems..
but when I lookup JNDI Name of the Session EJB , I got
javax.naming.NameNotFoundException etc ~~
Surely, JNDI Name is Correct.
So I made an EAR File like this.
Make 2 modules .. ( It deployed well in each )
SampleWar.war (WEB) , SampleSessionEJB.jar (LocalEJB)
Copy them to certain Folder
c:\ear
and execute EarInit utility
java weblogic.marathon.ddinit.EarInit c:\ear
It compiled and deployed succcessfully .
but the problem was context-root.
weblogic.marathon.ddinit.EarInit produces application.xml file
and it says context-root is SampleWar.war
like this
<web>
<web-uri>SampleWar.war</web-uri>
<context-root>SampleWar.war</context-root>
</web>
SampleWar.war has web.xml file and I set context-root as /sample.
So if I deploy SampleWar.war alone there's no problem.
In case of EAR, I should browse like this
http://127.0.0.1:7001/SampleWar.war/index.jsp
Can I change context-root ? I can not modify after creation of
application.xml manually, because i am using ant and that was a apart
of ant build target.
Is it possible ?
If not , Can I look up Local EJB Interfaces without packaging as EAR ?
I tried set <ejb-local-ref> but I got same NamingException.
I prefer deploy and test EJBs without EAR. cause it is easy to test .
Thanks is advance. Have a good day ~ :)