copy/paste from the link above
=================
@Stateless
public class SimpleSample {
public void doSomething() { /*business logic*/ }
}How to compile:
You will need the the EJB 3.0 / 3.1 API in the classpath, or at least the @Stateless annotation.
How to deploy:
Just JAR the class and put the JAR into e.g: [glassfishv3-prelude-b23]\glassfish\domains\domain1\autodeploy
How to use:
e.g.:
import javax.ejb.EJB;
public class MyServlet extends HttpServlet{
@EJB
private SimpleSample sample;
}
And: there is no XML, strange configuration, libraries, additional frameworks or jars needed...
=================
Looks a slight bit more than 1 line to me. Note: the page was linked to from another page indicating you can do 'hello world' in JEE6 in 'one line' of code. Java people have a funny way of counting lines sometimes.