based on this answer, while I was looking for tut-install
, I poked around in glassfish and found:
thufir@dur:~$
thufir@dur:~$ ll glassfish4/samples/ejb/hello-stateless-ejb/hello-stateless-ejb-bean/src/main/java/enterprise/hello_stateless_ejb/StatelessSession.java
In and of itself, the code is minimal:
package enterprise.hello_stateless_ejb;
import javax.ejb.Remote;
@Remote
public interface StatelessSession {
public String hello();
}
I would like to run this sample, there's a pom file. How can I load this project into glassfish? I was trying to load tut-install
, which would also be useful. However, this example looks like, perhaps, a simpler version.
A stateless "hello world" sample is where I would like to start, preferably just by loading the pom. I've glanced through some older EJB books, but they're woefully out of date; working code would be preferable.
the pom is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish-samples</groupId>
<artifactId>ejb-samples</artifactId>
<version>4.0-SNAPSHOT</version>
</parent>
<artifactId>hello-stateless-ejb</artifactId>
<packaging>pom</packaging>
<name>hello-stateless-ejb</name>
<modules>
<module>hello-stateless-ejb-bean</module>
<module>hello-stateless-ejb-client</module>
</modules>
</project>