Monday, July 14, 2014

EJB v3 Client for JBoss Gotcha!

If you are writing a standalone client for either a local or remotely deployed EJB v3, and face the following issue:

[Root exception is java.lang.ClassNotFoundException: org.jboss.ejb3.proxy.JBossProxy
(no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(
at org.jnp.interfaces.NamingContext.lookup(
at javax.naming.InitialContext.lookup(Unknown Source)


The simple fix is to include 'jbossall-client.jar' in the client classpath.

Monday, July 7, 2014

EJB v3 Buy-In

Studying for my SCBCD 5 certification, I noticed these differences between the EJB v3 specification and Spring v2 framework. Thought i should share these. I will add the performance results as well, once i have something substantial.

In Favour of EJB v3,
Easier Implementation for Web Services
Time Tested & Robust Method for Remote Access
Better Instance Pooling Mechanisms
Stateful Session Beans
Annotations Make It Easier
JEE Standard / Sun Support / Industry Affiliation
Wide App Server Feature Support

In Favour of Spring v2, 
JDBCTemplate and JMSTemplate
DI Even for POJO (Outside Container)
AOP Is Feature-Rich (But Complex)

And No... I Do Not Sell for Sun.