Release Notes for MockEJB 0.6-beta2
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.
Release Notes for MockEJB 0.6-beta1
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.
Changes that are not compatible with the previous version of MockEJB
- Interceptors APIs have changed almost entirely. Please
see Interceptors JavaDoc
for more details.
- Many MockEjbObject methods have been deleted because they have been superceded
by the new Interceptors framework. The direct use of MockEjbObject is now deprecated.
- All "deploy" methods of MockContainer have become "void".
- Signature of "deploy" methods for MDBs have changed.
Release Notes for MockEJB 0.5
The focus of this release is the improved support for using and running
mock EJBs inside the container.
List of all changes
- New OptionalCactusTestCase class can be used as a base class for
test classes to switch between standalone and Cactus testing.
See this documentation for more details.
- Improved support for mock implementation classes for EJBs.
See this documentation for more details.
- MockEJB can now work with any JNDI provider, not only with
MockContext.
See this documentation for more details.
- MockContext now supports hierarchical names and subcontexts.
- "java:comp/env" is now correctly supported for tests running
inside the container.
- MockContextFactory.setAsInitial() and revertSetAsInitial()
convenience methods have been added.
- MockContextFactory now supports the delegate JNDI environment instead
of just an initial context factory.
See this documentation for more details.
- Interceptor API has been changed substantially to make it more generic so it
can be used with any dynamic proxy, not just with the ones provided by MockEJB.
- InvocationRecorder interceptor allows preserving the information
about the call stack for further inspection by the test class.
See this documentation for more details.
- TransactionManager (former TransactionInvoker) no longer uses the static field to store
UserTransaction instance.
- Homes are now serializable.
- Updated, more detailed documentation.
- Updated and extended examples.
See examples here.
- New build files.
Fixed bugs
- 821272 Problems with the context to lookup a name.
- 832358 Context.INITIAL_CONTEXT_FACTORY only set on deploy.
Changes that are not compatible with the previous version of MockEJB
Non-backward compatible changes have been introduced to streamline
MockEJB APIs and improve the overall flexibility of the framework.
Given the nature of changes, porting the
existing code to the new version should not be difficult.
- MockContainer.deployXXX methods have been changed to instance
methods from static methods.
- An instance of javax.naming.Context must be passed to the
constructor of MockContainer.
- MockContext and MockContextFactory classes have been moved to
"org.mockejb.jndi" package.
- MockContextFactory.setRemoteFactory() has been renamed to
MockContextFactory.setDelegateEnvironment()
- MockContainer.isActivate() and MockContainer.deactivate() methods
have been deleted. You can now use OptionalCactusTestCase.isAppServer()
to check if the test class runs inside the app server.
- MockContext.add() has been removed. You can use
MockContext.bind() or MockContext.rebind() methods.
- "Invoker" interface has been renamed to "Interceptor", its "invoke" method
has been renamed to "intercept". The method now takes "Object" as a parameter as opposed to
"javax.ejb.EnterpriseBean".
- Interceptor framework has been segregated into "org.mockejb.interceptor" package.
- TransactionInvoker has been renamed to TransactionManager.
- ExceptionInvoker has been renamed to ExceptionHandler.