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:

Author:
Rod Johnson

Field Summary
static int JBOSS
          Code for JBoss
static int ORION
           
static int UNKNOWN
           
static int WEBLOGIC
           
 
Method Summary
static EJBContainerDetective getInstance()
          Singleton design pattern
 int getServer()
          Return the code for the detected server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Method Detail

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.