Java Doc for MockEjbContext.java in  » Testing » MockEJB » org » mockejb » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » MockEJB » org.mockejb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mockejb.MockEjbContext

MockEjbContext
public class MockEjbContext implements SessionContext,MessageDrivenContext,EntityContext,Serializable(Code)
Provides implementation of javax.ejb.SessionContext, javax.ejb.MessageDrivenContext and javax.ejb.EntityContext as well as some extra convenience methods.
author:
   Alexander Ananiev



Constructor Summary
 MockEjbContext(Object homeProxy)
    

Method Summary
public  IdentitygetCallerIdentity()
    
public  PrincipalgetCallerPrincipal()
     Returns the principal that was logged in using MockContainer.login.
public  EJBHomegetEJBHome()
    
public  EJBLocalHomegetEJBLocalHome()
    
public  EJBLocalObjectgetEJBLocalObject()
     Obtains a reference to the EJB local object that is currently associated with the instance.
public  EJBObjectgetEJBObject()
     Obtains a reference to the EJB object that is currently associated with the instance.
public  PropertiesgetEnvironment()
     Always returns empty Properties object.
public  ObjectgetPrimaryKey()
     Returns the primary key for entity beans.
public  booleangetRollbackOnly()
    
public  UserTransactiongetUserTransaction()
     Calls TransactionManager to get the javax.transaction.UserTransaction object.
public  booleanisCallerInRole(Identity arg0)
    
public  booleanisCallerInRole(String role)
    
public  booleanisRemote()
     Tests if the business interface for this context's bean is remote interface meaning that it extends EJBObject.
This is useful for exception handling and in other places where local/remote interfaces behave differently.
 voidsetEjbObjectProxy(Object ejbObjectProxy)
    
public  voidsetPrimaryKey(Object primaryKey)
    
public  voidsetRollbackOnly()
    


Constructor Detail
MockEjbContext
MockEjbContext(Object homeProxy)(Code)




Method Detail
getCallerIdentity
public Identity getCallerIdentity()(Code)
This method is not supported
See Also:   javax.ejb.EJBContext.getCallerIdentity



getCallerPrincipal
public Principal getCallerPrincipal()(Code)
Returns the principal that was logged in using MockContainer.login. Returns the anonymous principal if login was not called. principal of the logged in user or anonymous principal
See Also:   javax.ejb.EJBContext.getCallerPrincipal



getEJBHome
public EJBHome getEJBHome()(Code)

See Also:   javax.ejb.EJBContext.getEJBHome



getEJBLocalHome
public EJBLocalHome getEJBLocalHome()(Code)

See Also:   javax.ejb.EJBContext.getEJBLocalHome



getEJBLocalObject
public EJBLocalObject getEJBLocalObject() throws IllegalStateException(Code)
Obtains a reference to the EJB local object that is currently associated with the instance. the EJB object currently associated with the instance



getEJBObject
public EJBObject getEJBObject() throws IllegalStateException(Code)
Obtains a reference to the EJB object that is currently associated with the instance. the EJB object currently associated with the instance



getEnvironment
public Properties getEnvironment()(Code)
Always returns empty Properties object. Bean-scoped environment is not supported directly.
See Also:   javax.ejb.EJBContext.getEnvironment



getPrimaryKey
public Object getPrimaryKey() throws IllegalStateException(Code)
Returns the primary key for entity beans. If the context is assotiated with Session bean or MDB, returns null. MockEJB does not automatically handles primary keys for entity beans. Since "create" returns null, you need to intercept "create" methods of your entity bean and return the real PK.
See Also:   javax.ejb.EntityContext.getPrimaryKey



getRollbackOnly
public boolean getRollbackOnly() throws IllegalStateException(Code)

See Also:   javax.ejb.EJBContext.getRollbackOnly



getUserTransaction
public UserTransaction getUserTransaction() throws IllegalStateException(Code)
Calls TransactionManager to get the javax.transaction.UserTransaction object. javax.transaction.UserTransaction object
See Also:   javax.ejb.EJBContext.getUserTransaction



isCallerInRole
public boolean isCallerInRole(Identity arg0)(Code)
This method is not supported
See Also:   javax.ejb.EJBContext.isCallerInRole(java.security.Identity)



isCallerInRole
public boolean isCallerInRole(String role)(Code)

See Also:   javax.ejb.EJBContext.isCallerInRole(java.lang.String)



isRemote
public boolean isRemote()(Code)
Tests if the business interface for this context's bean is remote interface meaning that it extends EJBObject.
This is useful for exception handling and in other places where local/remote interfaces behave differently. true if the business interface of this context's EJB implements remote interface. Always returns false for message-driven beans.



setEjbObjectProxy
void setEjbObjectProxy(Object ejbObjectProxy)(Code)



setPrimaryKey
public void setPrimaryKey(Object primaryKey)(Code)



setRollbackOnly
public void setRollbackOnly() throws IllegalStateException(Code)

See Also:   javax.ejb.EJBContext.setRollbackOnly



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.