com.interface21.ejb.support
Class EJBContainerDetective
java.lang.Object
|
+--com.interface21.ejb.support.EJBContainerDetective
- public class EJBContainerDetective
- extends java.lang.Object
NOTE: THIS CLASS IS A DEMONSTRATION ONLY:
IT DOES NOT FORM PART OF THE FRAMEWORK PROPER.
IT SHOWS HOW TO AUTO-DETECT THE EJB CONTAINER,
ENABLING CONDITIONAL EXECUTION AT RUNTIME
Singleton to auto-detect EJB container.
Does not use read-write static fields, so doesn't violate
EJB programming restrictions.
Does not introduce any dependencies on vendor-specific
classes.
Servers supported:
- JBoss (tested with JBoss 3.0 - "Rabbit Hole")
- Orion (tested with 1.5.2)
- Author:
- Rod Johnson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JBOSS
public static final int JBOSS
- Code for JBoss
ORION
public static final int ORION
WEBLOGIC
public static final int WEBLOGIC
UNKNOWN
public static final int UNKNOWN
getInstance
public static EJBContainerDetective getInstance()
- Singleton design pattern
getServer
public int getServer()
- Return the code for the detected server
- Returns:
- the server id code (one of the constants
defined in this class)
Rod Johnson and Spring contributors 2001-2003.