tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: OPEN EJB most recent version and POJO's.
Date Tue, 07 Jun 2011 07:05:41 GMT

On Jun 6, 2011, at 4:15 PM, Zachary1234 wrote:

> However, if I wish to access the pojo outside of openEJB,
> or even on another network pc, the way to go is JNDI.
> Is there an easy way to bind a class or interface pojo
> to JNDI?  Will just @JNDI (with an optional name)
> at the top do the trick?

I suspect you might be falling victim to the "EJB is bad and heavy" marketing.

Here are some performance numbers

Each with 20 threads invoking this object

The first numbers are the class being invoked via calling it directly, not as an EJB.

The second set of numbers are it being invoked as an EJB via its @Local interface.

The third set is it being invoked as an @Remote EJB, but still inside the vm of the server.
 We use the same code for Local and Remote interfaces when calls are in the same VM as the
server where the bean lives.  Under the covers the only actual difference is we have to perform
an extra serialization step as required by the EJB spec.

The fourth set is it being invoked by a client over the network.  Now we're getting into sockets
and networking hardware.  It looks bad next to the pojo and local calls, but it's actually
pretty great.  To put in perspective, last time I did this measuring I added Jetty to the
picture as it's known to have great performance.  Our socket handling code came in about 3x
faster.  It's not apples to apples as they are designed for different things.  Here's the
details on that:

Also note, you get some pretty create failover support in the ejb client code:

Happy to give all the setup code if you want to do some playing on your own.  Uses all open
source tools.


View raw message