Java EE 6 Application Server for Web Profile with JavaMail

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

  • It seems that the bug with multi-part forms in GlassFish 3.1.2 and GlassFish 3.1.1 had other problems that hurt me, fixed in 3.1.2. (catch 22 ...) This error is fixed by the bank in the ticket.
  • There seems to be much more room for application servers that support a "web profile" than a "full profile", and the former should be much easier.
  • I want to choose the best option for deployment

I am currently using the GlassFish built-in application server function for tests, so it is advisable to use a similar installation for any alternative. In the worst case scenario, I can live with GlassFish for automated tests.

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

Which application servers that meet my requirements can you recommend?

, " " EJB, EJB lite. , Java EE. , - Java EE?

Java EE, , , .

1

Apache TomEE doc, TomEE, TomEE + OpenEJB .

2

AS 7.1, this thead JBoss AS 7.1.0, , .

+5
3

, GlassFish, .

, , jboss 7.1 .

Jboss 5.1, JDK 6, .

jboss . , "" / , . ( .)

wiki, jboss jboss 5. , . , , , .

, :

  • , " " "", , .
  • "" "-" , . , . ( )

. , . (, , AS, . , , -, .)

, .

+4

, JBoss AS7 . , - AS7 EAP 6 (!) - . , , , .

AS7 , . , , , , ( 7.1), -, -. , , (7.1.0 - 125 , - ).

, ( , ), . , Geronimo EE6, , , .

Tomcat. , Tomcat, " Tomcat", , - , - . TomEE. Tomcat, .

+3

, OpenEJB/TomEE . , , , :

To set up your JavaMail resource in a test case, simply follow these steps:

Properties p = new Properties();
p.setProperty("superbizMail", "new://Resource?type=javax.mail.Session");
p.setProperty("superbizMail.mail.smtp.host", "mail.superbiz.org");
p.setProperty("superbizMail.mail.smtp.port", "25");
p.setProperty("superbizMail.mail.transport.protocol", "smtp");
p.setProperty("superbizMail.mail.smtp.auth", "true");
p.setProperty("superbizMail.mail.smtp.user", "someuser");
p.setProperty("superbizMail.password", "mypassword");

EJBContainer.createEJBContainer(p);

Then enter the JavaMail session in your EJB with:

@Resource
private Session superbizMail;

Behind the scenes of "superbizMail". the part resets all properties, and the resulting set of properties is passed to javax.mail.Session.getDefaultInstance(Properties props). Resulting Sessionis what is entered into the link@Resource

+2
source

All Articles