I think I might be doing something wrong.
I am trying to get the NameService example from
http://java.boot.by/ocewsd6-guide/ch04.html to work on Glassfishv3 and I am not sure I am deploying correctly.
I cannot seem to find the code for the NameBean class, so I made up my own.
When I deploy, the server log seems to indicate that everything is going OK, but I am not sure what URLs to try with my curl command.
(I run Glassfish on 8081).
curl
http://localhost:8081/restejb
just gives me my prompt back.
Pretty much everything else gives me: HTTP Status 404 The requested resource () is not available.
Thanks to anyone who can help me with this. Here is what I am doing:
$ cat src/NameService.java
$ cat src/NameBean.java
$ mkdir WEB-INF
$ mkdir WEB-INF/classes
$ export GL4=/bapps/glassfish3/glassfish/modules
$ javac -cp WEB-INF/classes:$GL4/javax.ejb.jar:$GL4/jersey-core.jar -d WEB-INF/classes src/*.java
$ jar cvf restejb.war WEB-INF
added manifest
adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
adding: WEB-INF/classes/(in = 0) (out= 0)(stored 0%)
adding: WEB-INF/classes/NameBean.class(in = 394) (out= 249)(deflated 36%)
adding: WEB-INF/classes/NameService.class(in = 894) (out= 527)(deflated 41%)
$
$ cp restejb.war /bapps/glassfish3/glassfish/domains/domain1/autodeploy/restejb.war
$
Server log then says:
[#|2011-04-18T09:50:27.606-0700|INFO|glassfish3.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=63;_ThreadName=Thread-1;|[AutoDeploy] Selecting file /bapps/glassfish3/glassfish/domains/domain1/autodeploy/restejb.war for autodeployment.|#]
[#|2011-04-18T09:50:27.937-0700|INFO|glassfish3.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=63;_ThreadName=Thread-1;|Portable JNDI names for EJB NameService : [java:global/restejb/NameService, java:global/restejb/NameService!NameService]|#]
[#|2011-04-18T09:50:28.048-0700|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=63;_ThreadName=Thread-1;|WEB0671: Loading application [restejb] at [/restejb]|#]
[#|2011-04-18T09:50:28.090-0700|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=63;_ThreadName=Thread-1;|restejb was successfully deployed in 434 milliseconds.|#]
[#|2011-04-18T09:50:28.097-0700|INFO|glassfish3.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=63;_ThreadName=Thread-1;|[AutoDeploy] Successfully autodeployed : /bapps/glassfish3/glassfish/domains/domain1/autodeploy/restejb.war.|#]