MockEJB / News: Recent posts

MockEJB Article

Eoin Woods and I just published the article ( about MockEJB on dev2dev. Eoin came up with some good examples, theyre different from whats on website. Enjoy...

Posted by Alexander Ananiev 2005-10-19

MockEJB 0.6-beta2 released

This relase adds the support for security as well as bug fixed and improved BMP support.

List of changes:

- MockUser class is added to support EJBContext.getCallerPrincipal() and EJBContext.isCallerInRole().
See FundamentalsTest for an example.
- Aspect framework allows to intercept implementation methods as well as interface methods (previously only interface methods could be intercepted).
E.g., now users can define a pointcut for ejbFind... methods of the implementation class.
- MockEJB now automatically calls ejbLoad method for BMP finders.
- EntityDatabase becomes an interface. User can now supply their implementation classes using
"mockejb.entity.database" system property.
- EntityDatabase.getInstance() is deleted. Users should use mockContainer.getEntityDatabase() instead.
- JDK 1.3 support.
- Jakarta ORO library is now used for regexp support instead of JDK 1.4 java.util.regexp.
The library is packaged with MockEJB distribution.
- setEntityContext is now called on temporary entities used for finders and home methods.
- MockContextFactory.revertSetAsInitial() now clears the content of the JNDI tree to provide
for better test isolation. ... read more

Posted by Alexander Ananiev 2004-09-04

MockEJB 0.6-beta1 released

This is the major release of the framework with many new features.
The focus of this release is on CMP/BMP entity bean support, as well as JMS.

List of key changes

- Mock JMS implementation.
- Ability to deploy an MDB to JMS destination.
- Fully revamped Interceptor framework.
- CMP entity bean support.
- BMP entity bean support.
- EjbBeanAccess interface allowing to access Bean (implementation) object by casting the business interface of an EJB instance. ... read more

Posted by Alexander Ananiev 2004-06-21

MockEJB 20040419 nightly build is available

MockEJB 20040419 nightly build is available on This release has the following changes:

- Interceptor/AOP framework has been re-worked to use cglib ( This allows us to intercept non-public classes.
- MockEJB distribution now includes J2EE interfaces jar, so you don't need any third-party jar to begin using MockEJB.
- HelloWorldTest sample test class and build script have been added.
- Build scripts have been cleaned up. ... read more

Posted by Alexander Ananiev 2004-04-20

MockEJB 20040314 nightly build is available

MockEJB 20040314 nightly build is available on This build has the following new features:
- Mock JMS implementation (org.mockejb.jms) which uses AOP/interceptor framework.
- New MDB deployment mechanism. MockContainer now automatically creates mock connection factory and destination and makes MDB listen to the destination. Since mock JMS is, in fact, synchronous (the message is delivered immediately), it should make it easy to write integration tests with multiple session beans/MDBs involved.
- Support for EasyMock/Dynamock (suggested by Thomas Svensen). You can now specify an instance of an implementation class (as opposed to the implementation class itself) in EJB deployment descriptor. Also, MockEJB will not call EJB callback methods ( ejbCreate, ejbActivate, setSessionContext, etc.) if the implementation class does not implement EnterpriseBean interface.... read more

Posted by Alexander Ananiev 2004-03-15

MockEJB nightly builds are available

MockEJB nightly builds are now available from We will update this page every time we commit a substantial change to MockEJB source code. We wont be publishing a new build literally every night, however we do intend to keep this page in synch with all major changes in MockEJB trunk (tip), so depending on the time were able to spend on MockEJB, one can expect to see an update several times a month.
We will notify the user list about the new builds and in some cases post a news item on
Needless to say that all nightly builds are bleeding edge, however we do make sure that all our tests run successfully.
We will continue using our sourceforge site for all official stable MockEJB releases. ... read more

Posted by Alexander Ananiev 2004-03-03

MockEJB 0.5 is released

The focus of this release is the improved support for using and running mock EJBs inside the container.

See for more details.

List of all changes

- New OptionalCactusTestCase class can be used as a base class for test classes to switch between standalone and Cactus testing.

- Improved support for mock implementation classes for EJBs.

- MockEJB can now work with any JNDI provider, not only with MockContext. ... read more

Posted by Alexander Ananiev 2003-12-03

MockEjb 0.4 release is available

This is the first official release of the MockEjb framework. Please see for more details.

Posted by Alexander Ananiev 2003-08-05

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks