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:
[#|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.|#]
Thanks to Milan Kuchtiak for the example previously referenced. I also changed my package from the default (none) to "name" like he did and I also added the ApplicationConfig class like he did (to demonstrate that not even a web.xml is necessary here). I rejarred and re-deployed.
What Milan does not show you is how to call these using curl (in case you do not want to go to the trouble of setting up NetBeans 6.8, etc). Here they are: