|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mockrunner.mock.ejb.EJBMockObjectFactory
Used to create all types of EJB mock objects.
Maintains the necessary dependencies between the mock objects.
If you use the mock objects returned by this
factory in your tests you can be sure, they are all
up to date.
This factory takes the UserTransaction
from the MockEJB mock context. If there's no transaction
bound to the mock context, the factory will create and bind a
MockUserTransaction
.
If the bound transaction is no
MockUserTransaction
,
the method getMockUserTransaction()
returns null
.
Use getUserTransaction()
instead in this case.
You can configure the JNDI name of the UserTransaction
with the class Configuration
.
Constructor Summary | |
EJBMockObjectFactory()
Creates a new set of mock objects. |
|
EJBMockObjectFactory(Configuration configuration)
Creates a new set of mock objects based on the specified configuration. |
Method Summary | |
org.mockejb.MockContainer |
getMockContainer()
Returns the MockEJB MockContainer . |
MockUserTransaction |
getMockUserTransaction()
Returns the MockUserTransaction . |
javax.transaction.UserTransaction |
getUserTransaction()
Returns the UserTransaction . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EJBMockObjectFactory()
public EJBMockObjectFactory(Configuration configuration)
Method Detail |
public MockUserTransaction getMockUserTransaction()
MockUserTransaction
.
If the bound transaction is no MockUserTransaction
,
this method returns null
.
MockUserTransaction
public javax.transaction.UserTransaction getUserTransaction()
UserTransaction
.
UserTransaction
public org.mockejb.MockContainer getMockContainer()
MockContainer
.
MockContainer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |