Entries tagged [openejb]

Tuesday January 24, 2012

Apache TomEE 1.0.0-beta-2 released!

It's time! Apache TomEE 1.0.0-beta-2 and Apache OpenEJB 4.0.0-beta-2 are finally out!

These releases are major improvements over their predecessors and incorporate heavy doses user feedback and road testing. Nicely balanced at 50% bug fixes, 30% improvement of existing features, and 20% filling out features for better production and test experience, Apache TomEE is a major leap toward. Based on feedback of 1.0.0-beta-2, a final release could be right around the corner.

Top among the areas to show the most improvement include CDI and JAX-RS, both of which received major attention. Support for an Arquillian adapter for TomEE Embedded is a must-not-miss new feature. The project itself has been taking a test-first approach to support and has amassed a rapidly growing number of tests for all the issues reported during the 1.0.0-beta-1 cycle. An Arquillian adapter for remote Apache TomEE usage does exist as a snapshot and should make it into the next release. As well this release boasts over 70 example applications, making a remarkable resource that cannot be ignored.

See the downloads page for the full changelog. Get the binaries while they're hot!

Thank you so much to all the users who gave feedback and contributed towards the quality of the release. We're very lucky to have gotten exactly the kind of user feedback were after with the 1.0.0-beta-1 release and we couldn't be prouder of the results.

Saturday November 05, 2011

JavaOne 2011 Report

It was a big year for Apache TomEE and OpenEJB at JavaOne this year. Many thanks to everyone on all sides who helped get us there, all the wonderful people who attended and of course everyone in the community that makes this project tick.

First of all, we were very excited and honored to announce Apache TomEE as a Java EE 6 Web Profile certified. The announcement went out on Tuesday of that week and set the stage for some very exciting presentations and panels throughout the week.

We had three presentations total:

And participated in three panels:

  • Meet the Experts: EJB 3.2 Expert Group

  • The Road to Java EE 7: Is It All About the Cloud?

  • CDI Today and Tomorrow

The Apache TomEE talk was quite full with 134 attendees, only 5 less than the "CDI Today and Tomorrow" panel. All in all a very full week and one that will not soon be forgotten!

Friday April 08, 2011

Apache OpenEJB Get-Together, Tours France, April 18th - 21st

Second annual Get-Together. No fees no conference and no sessions. Just an excuse to get-together, code, and have a beer or two.

Hacking Monday - Thursday. Friday and the weekend is for non-technical fun.

Tech-time will likely be focusing on TomEE, Java EE 6 Web Profile and OSGi hacking. If you have something you've been wanting to work on, come on down and I'm sure someone will be available to give you some pointers and get you rolling. Even if you just know you want to work on something but don't know what, I'm sure we can find a nice little project for you. Even the smallest task has a way of taking you in unexpected and fun directions.

Most of us are staying here:


A good second choice:


Jean-Louis' company, Atos Origin, has graciously offered space for daytime hacking fun. Please rsvp to him if you wish to partake as he will need to get you a security badge. His apache address is jlmonteiro@. I've heard rumors of a limited supply of food and coffee on the premises for those that rsvp. So definitely get word to JL!

Evening fun will likely be around the center of Tours. I'll try and twitter our locations, facebook checkin and am happy to give out my cell and google voice to anyone who would love to happen by for a beer. Just email me offline. There are likely some neat social networking tools we could use, feel free to suggest one.

Hope to see you there!

Thursday April 07, 2011

Apache OpenEJB and Apache TomEE at JAX London 2011

Join us next week at JAX London 2011 where David Blevins and Jonathan Gallimore will be presenting two presentations on EJB and Java EE.

Both sessions will be demo heavy and hands on. See some of the neat innovations happening in the OpenEJB 4.0 codebase such as meta annotations. Get an demo and introduction to the new Apache TomEE platform a Tomcat-focused Java EE 6 Web Profile implementation assembled in minimalist fashion from all-Apache projects. And of course, a good chance to talk with the developers and ask all the questions you want!

You won't want to miss it!

Thursday November 18, 2010

ApacheCon NA 2010, OpenEJB In-Depth

Thanks to all who attended ApacheCon NA this last week in Atlanta, GA. We had a nice little session Friday of the conference. For those that weren't able to attend or for those who made it and wanted to share the slides, we're putting them up online for all to see.

OpenEJB In-Depth

It was a real pleasure being able to present. People attending presentations are often skeptical when things first get rolling. There's a tendency for people to feel like they're getting a sales pitch despite the fact that all that we do, time and software, is given away for free. When we got into the demos, what started as reserved and scrutinizing facial expressions turned into very excited faces with big bright smiles. It was quite the transformation.

That excitement was triggered by the demos, which really drives home the importance of having more video content for people. In that vein we plan to introduce a series of Lightening Demos. Quick 2 minute screencasts so people can see individual examples run, download to debug!

Wednesday October 20, 2010

Apache OpenEJB 3.1.3 Released!

We are pleased to announce the release of Apache OpenEJB 3.1.3. The 3.1.3 release continues in the Java 5 and Java EE 5 line with partial EJB 3.1 support. Overall the release is focused on production concerns and includes dramatically expanded Stateless Session Bean pooling, greater Failover and Discovery support, JMX Monitoring and prepackaged Tomcat setup. Support for EJB 3.1 @LocalBean views and @ManagedBean also included.

The 3.2 codebase is now the new trunk where all further Java 6 and Java EE 6 work is being done. Betas of the 3.2 codebase expected before the end of the year.

New Features


Client-Server & Failover
  • OPENEJB-1293 Conditional Client Failover based on container or bean thrown Exception types
  • OPENEJB-1292 Client Failover on connection pool timeout
  • OPENEJB-1232 Client Failover and ConnnectionStrategy configurable on a per bean basis
  • OPENEJB-1100 EJB Clients using http can set connectTimeout and readTimeout
  • OPENEJB-1369 Help, expanded options and cleaner output for MulticastTool
  • OPENEJB-1112 ejbds service (ejbd+ssl) setup on port 4203
  • OPENEJB-1370 Broadcast InetAddress.getLocalHost() when ejbd is bound to
  • OPENEJB-1281 Preconfigured failover with JNDI provider url such as "failover:ejbd://foo:4201,ejbd://bar:4201"
  • OPENEJB-1289 Client connection pool timeouts events catchable as ConnectionPoolTimeoutException
  • OPENEJB-1240 @WebServiceRef support for @LocalClient
  • OPENEJB-1130 Stricter ClientModule classpath discovery prevents possible NameAlreadyBoundException
  • OPENEJB-1372 Default openejb.descriptors.output to true when there are validation failures
  • OPENEJB-1353 Be more tolerant of truly empty beans.xml and ejb-jar.xml – zero length files
  • OPENEJB-1107 Updated builtin exclude list
  • OPENEJB-1122 Create a sample to illustrate the SEI inheritance
  • OPENEJB-1378 Example: MDB with Quartz Resource Adapter
  • OPENEJB-1381 Example: WebService SEI Inheritance
  • OPENEJB-1380 Example: Common Troubleshooting Flags
  • OPENEJB-1379 Example: Transaction Rollback
  • OPENEJB-847 Validation: @Resource UserTransaction injection mistakenly used on bean with Container-Managed Transactions
  • OPENEJB-1255 Time-based configuration options can now be additive, as in "1 hour, 27 minutes and 34 seconds"
  • OPENEJB-1111 PAX friendly LogStreamFactory for use in OSGi environments
  • OPENEJB-1276 Add #getTransactionIdentifier(Transaction tx) to o.a.o.hibernate.TransactionManagerLookup
  • OPENEJB-1279 Stateless PreDestroy called on undeploy/shutdown
  • OPENEJB-1208 Handle "destinationName" as synonym for the "destination" ActivationConfigProperty
  • OPENEJB-1238 Custom JNDI name format properties at bean, app, or server level
  • OPENEJB-1365 New log4j.category.OpenEJB.persistence log category
  • OPENEJB-1242 suport connector 1.6 and 1.0 dds in jee jaxb tree
  • OPENEJB-1027 Add the application name to the data sources matching heuristics
  • OPENEJB-1301 MDB InstanceLimit settable on a per-bean basis via openejb-jar.xml
  • OPENEJB-1123 Allow default security service to be overriden
  • OPENEJB-1275 JMX: EJB Method invocations
  • OPENEJB-1273 JMX: Stateless Pool Stats


  • OPENEJB-1282 mappedName fails to work for @Singleton
  • OPENEJB-1258 Boolean conversion problem in ejb-jar.xml
  • OPENEJB-1118 Split package org.apache.openejb.client
  • OPENEJB-1252 URL->File decoding should avoid "+" in paths
  • OPENEJB-1251 osgi annotation import needs to specify version 1.1 to avoid picking up jdk's v 1 classes
  • OPENEJB-1297 HeartBeat message is not read correctly for multipoint cluster
  • OPENEJB-1300 Possible Windows jvm bug results in "java.lang.ClassCastException: org.apache.xbean.recipe.ObjectRecipe cannot be cast to ...."
  • OPENEJB-1120 TomcatSecurityService should grant the guest role when no user is logged in
  • OPENEJB-1020 Inheritance not supported in JAX-WS endpoint interfaces exposed via CXF
  • OPENEJB-1347 ClassCastException in ClassLoaderUtil.clearSunJarFileFactoryCache
  • OPENEJB-1127 Unpacked RARs ignored
  • OPENEJB-1249 Undeploy apps and stop ResourceAdapters on shutdown
  • OPENEJB-1109 Deploy time java.sql.SQLException: Auto-commit can not be set while enrolled in a transaction
  • OPENEJB-1261 JSP Error on installer-view.jsp with Tomcat 6.0.26
  • OPENEJB-1053 web.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"taglib"
  • OPENEJB-1116 CMP2 EntityBean conflict when a persistent property exists called "deleted"
  • OPENEJB-1114 <ejb-class> element should be optional for <session> and <message-driven> declarations
  • OPENEJB-1315 NPE when deploying EJB modules.
  • OPENEJB-1241 Using @WebServiceRef does not allow standard JAX-WS Api usage
  • OPENEJB-1309 Make the DependOn sort algorithm stable
  • OPENEJB-1244 upgrade legacy activemq 4 support to 4.1.2
  • OPENEJB-1245 Possible Stateful bean passivation/activation error: ClassNotFoundException
  • OPENEJB-1129 Reverse lookup for logging may cause poor client/server performance
  • OPENEJB-1239 Bad client connection is never getting discarded from pool
  • OPENEJB-1286 Bug in reporting invalid @PostActivate/@PrePassivate usage in Stateful and Singleton beans
  • OPENEJB-1131 JDK 1.6.0 u18 has a ClassCastException in ClassLoaderUtil.clearSunJarFileFactoryCache
  • OPENEJB-1247 @Singleton @PreDestroy on container system shutdown

Thursday April 29, 2010

Several new features for Stateless Beans

As OpenEJB is deployed into more and more production environments we've been hard at work filling out the system to meet demands. The latest overhaul has been around the @Stateless bean pooling options.

At a high level, the new features provide:

  • Availability: guarantee a minimum number of instance in a pool, from startup and through the entire life of the pool.
  • Shrinking: aggressively shrink pools via an inactive bean timeout and/or gracefully shrink pools via VM garbage collection when memory is needed.
  • Freshness: aggressively flush a pool via the bean's SessionContext and/or gracefully expire, and possibly replace, beans via a max age.
  • Using the above features it's possible to build a pool to fit your exact needs. The pool shrinking functionality allows a pool that has reached its maximum size to shrink down over time to its minimum size (which can be zero!) either aggressively or gracefully, keeping resources consumed at a minimum. The freshness functionality allows the entire pool, even the minimum, to be purged and renewed either aggressively or gracefully over time, preventing leaky state from building up over the long life of the pool.

    The new options are: PoolMin, IdleTimeout, PollInterval, MaxAge, ReplaceAged, MaxAgeOffset, and CallbackThreads. Garbage collection functionality is achieved internally through java.lang.SoftReference(s) and nothing is required to enable it, though it can be tuned at the VM level. Pool flushing can be done via the javax.ejb.SessionContext object of Stateless beans which now can be cast to java.io.Flushable.

    All of the above functionality is of course thread-safe. Instances cannot be garbage collected, expired via MaxAge, or flushed while in use. Calling flush() on a "hot" pool will not affect instances in use till they return to the pool. The same applies for any instances that reach their MaxAge while in use -- they are only expired once returned to the pool.

    The above options are properly tuned and balanced as well and will not compete. For example, flushing a pool will not cause any instances created to refill the pool to have the same creation time and therefore expire together in one, very ungraceful, drop. Creation times will be skewed to keep MaxAge expiration spread out. As well MaxAge and IdleTimeout are enforced together such that MaxAge is enforced, instances are transitioned into the "minimum side" of the pool as needed, and the remainder is subject to IdleTimeout. The pool will not timeout a perfectly good instance that could be used to keep the pool at it's minimum.

    Monday April 26, 2010

    How much time have you saved with OpenEJB? Find out!

    Inspired by Matthew B. Jones' blog post sharing his experience saving a whopping 26 person weeks in development with OpenEJB, we've put together a time saved calculator.

    A fun little tool for those that develop with OpenEJB and use a different platform in production. Check it out!

    User Blog: OpenEJB : Rapid J2EE Development & Testing

    Matthew B. Jones writes a great piece, OpenEJB : Rapid J2EE Development & Testing, sharing his team's experience using OpenEJB to aid in the development of their very large JBoss application. His team of 10 has been using OpenEJB since February and by his most conservative estimations has saved 26 man-weeks on deployment time alone. A shocking amount even to our ears.

    Friday March 12, 2010

    Example: Common Troubleshooting flags

    Having trouble with a test? It's bound to happen eventually. We've coded up a little example that employs some of the more common ways to get more information to help resolve issues.

    The heart of the example is the following setup method:

    public void setUp() throws Exception {
        Properties p = new Properties();
        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
        p.put("movieDatabase", "new://Resource?type=DataSource");
        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
        // These two debug levels will get you the basic log information
        // on the deployment of applications. Good first step in troubleshooting.
        p.put("log4j.category.OpenEJB.startup", "debug");
        p.put("log4j.category.OpenEJB.startup.config", "debug");
        // This log category is a good way to see what "openejb.foo" options
        // and flags are available and what their default values are
        p.put("log4j.category.OpenEJB.options", "debug");
        // This will output the full configuration of all containers
        // resources and other openejb.xml configurable items.  A good
        // way to see what the final configuration looks like after all
        // overriding has been applied.
        p.put("log4j.category.OpenEJB.startup.service", "debug");
        // Want timestamps in the log output?
        p.put("log4j.appender.C.layout", "org.apache.log4j.PatternLayout");
        p.put("log4j.appender.C.layout.ConversionPattern", "%d - %-5p - %m%n");
        // Will output a generated ejb-jar.xml file that represents
        // 100% of the annotations used in the code.  This is a great
        // way to figure out how to do something in xml for overriding
        // or just to "see" all your application meta-data in one place.
        // Look for log lines like this "Dumping Generated ejb-jar.xml to"
        p.put("openejb.descriptors.output", "true");
        // Setting the validation output level to verbose results in
        // validation messages that attempt to provide explanations
        // and information on what steps can be taken to remedy failures.
        // A great tool for those learning EJB.
        p.put("openejb.validation.output.level", "verbose");
        initialContext = new InitialContext(p);
        initialContext.bind("inject", this);

    In practice it is not a good idea to enable so many debug flags as the output will be too much. Best to start with one, read the log output, and see if that doesn't give some direction. If not, disable it and move on to the next.

    Wednesday March 10, 2010

    Example: Testing Transaction Rollback

    We've coded up a nice little example project that shows various ways to rollback transactions in unit tests.

    The example also serves to show the various options in EJB that pertain to how to rollback transactions via either a UserTransaction, SessionContext.setRollbackOnly(), or throwing a RuntimeException. The example also shows how to mark a RuntimeException with @ApplicationException to bypass the rollback behavior.

    Here's a snippet from the test case to show how simple it is to test:

     * Transaction is marked for rollback inside the bean via
     * calling the javax.ejb.SessionContext.setRollbackOnly() method
     * This is the cleanest way to make a transaction rollback.
    public void testMarkedRollback() throws Exception {
        try {
            entityManager.persist(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
            entityManager.persist(new Movie("Joel Coen", "Fargo", 1996));
            entityManager.persist(new Movie("Joel Coen", "The Big Lebowski", 1998));
            List list = movies.getMovies();
            assertEquals("List.size()", 3, list.size());
        } finally {
            try {
                fail("A RollbackException should have been thrown");
            } catch (RollbackException e) {
                // Pass
        // Transaction was rolled back
        List list = movies.getMovies();
        assertEquals("List.size()", 0, list.size());

    Monday March 08, 2010

    User Blog: Maven, OpenEJB and eviware soapUI

    Magnus K Karlsson has written a nice blog post about using Maven, OpenEJB and eviware soapUI to develop and test JAX-WS Web Services.

    The full chain involves creating the Maven, OpenEJB driven unit tests and eventually deployment into JBoss with further testing driven manually via the eviware soapUI tool.

    Thursday March 04, 2010

    Article: Coarse Grained Unit Testing

    Dr. Dobb's has a great article titled Coarse-Grained Unit Testing: Using OpenEJB and DBUnit to write repeatable unit tests for Java componentswhich shows how to combine OpenEJB with DBUnit to get a very effective testing setup. The article is complete with an example based on the fictitious Blue Star Galactic spaceship company. All source code is available to download.

    Wednesday December 23, 2009

    User Blog: Tomcat, OpenEJB and Jersey, oh my

    Russ Jackson writes on his success getting Tomcat, OpenEJB and Jersey all hooked up and running together. More than anything, it's great to see people exploring this stack. Certainly there are cool things that can be done with the three. A note on the @EJB injection; if there is some way to extend or enhance the injection that Jersey does, it would definitely be possible to add support for @EJB, @Resource, @PersistenceContext and more to Jersey components running in a Tomcat/OpenEJB stack. Wonderful area for contribution if anyone has the itch!

    Tuesday October 20, 2009

    Apache OpenEJB 3.1.2 Released!

    Apache OpenEJB 3.1.2 has been released! This release is a short 4 months after our prior 3.1.1 release and is largely focused on bug fixes and small improvements with a couple new features. Scanning support for JSF 2.0 ManagedBeans allows for a nice OpenEJB/Tomcat/Mojarra stack. Database passwords listed in the openejb.xml can now be encrypted using our new 'cipher' command line tool. Focus areas of improvements/fixes include @LocalClient support, remote client disconnections and connection caching, AltDD support, Stateful bean caching, and additional JNDI name formatting options.

    The next release, 3.1.3, will likely contain more significant changes. A major CXF upgrade is planned which should bring with it new Web Services features. Exciting new testing techniques are in the works. As well third-party descriptor support is being expanded. Stay tuned to the project blog for details on these developments and more!



    Hot Blogs (today's hits)

    Tag Cloud