Search code examples
javajakarta-eeweb-applicationsjava-ee-6application-server

Java EE 6 Application Server for Web Profile with JavaMail


I have a Java EE web application using features from the Java EE 6 web profile + the EJB Timer service and JavaMail. I'm currently using GlassFish 3.1.2 full profile during development, but I want to investigate the alternatives because:

  • There seems to be a bug with multipart forms in GlassFish 3.1.2 and GlassFish 3.1.1 had other problems hurting me which are fixed in 3.1.2. (catch 22...) That bug is fixed by the jar in the ticket.
  • There seems to be a lot more options for application servers supporting the "web profile" than the "full profile" and the former is supposed to be so much more lightweight.
  • I want to choose the best option for deployment

I am currently using the embedded application server feature of GlassFish for tests, so a similar facility for any alternative is desirable. At worst, I can live with stiking to GlassFish embedded for the automated tests.

Is it possible to "add" a JavaMail and EJB Timer Service implementation module to an applicaton server implementing only the web profile? Does it work well? If this is not possible, are there alternatives to using JavaMail and the EJB Timer Service?

Which application servers meeting my requirements can you recommend?

Finally, I considered using the "Asynchronous invocation" feature of EJBs which is not part of EJB lite. If I understood correctly, it is illegal to start threads manually when running in a Java EE container. In that case, how can asynchronous operations be started in the Java EE Web Profile?

I'm still relatively new to the whole Java EE ecosystem and terminology so please don't hesitate to ask me to clarify any parts of my question.

Supporting doc

edit 1

According to the Apache TomEE doc, TomEE, TomEE+ and OpenEJB would fit the bill.

edit 2

Based on the AS 7.1 release notes, this thead and this issue JBoss AS 7.1.0 seems to implement all the features I need.


Solution

  • First of all, I have never used GlassFish so I cannot give you any information about that.

    I'm not sure if your application is being build for a true production envrionment but jboss 7.1 does not yet have any official commercial support in case you run into trouble.

    Jboss 5.1 optimized for JDK 6 has commercial support via red hat.

    That being said, a jboss instance can be fully configured and is very flexible. That means that you can start with the 'web' profile and add/remove services you do not need. (Removing unused services is always advised for production environments.)

    Here is a wiki that gives information about slimming a jboss profile in jboss 5. It indicates all steps needed to remove a service. The slimming operation can also be reversed, so you can add anything you need to a certain profile.

    So there are basicly two approaches:

    • Start with a profile like 'default' or 'all' and start removing services that are not needed for your application
    • Start with the 'minimal' or 'web' profile and start adding services you are missing for your application. You copy the services from a profile that has it. (I personally prefer this approach)

    Adding and removing services can be a work of trial and error though. You need to search the internet for a correct guide for the service you are trying to add or remove. (Tip, always do your operations on a copy of the profile provided by the AS and document each step. That way you can start over if you did something that seems irreversible.)

    I hope this is of any help.