News for hackers. Stuff that matters.
Re:J2EE Is Dead - Completely Dead by swah on Tuesday December 14, 2010 @07:46AM (#2003981)
Can anyone show the one line hello world?
Re:J2EE Is Dead - Completely Dead by mgkimsal on Tuesday December 14, 2010 @08:10AM (#2004019)
The author links to a page that's not accessible. The google cache shows this page: http://webcache.googleusercontent.com/search?q=cache:3cGnLJF...

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.

Re:J2EE Is Dead - Completely Dead by drtse4 on Tuesday December 14, 2010 @08:37AM (#2004073)
He should have left out that "exactly". The main point is something he highlights at the beginning, J2EE was the triumph of configuration over convention, it had a lot of xml descriptors and interfaces/utility classes to be implemented (this caused by the some architectural decisions that remind me of CORBA). This stuff was usually auto-generated but you still often had to tweak these file manually. The polar opposite of modern web frameworks.