|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<JeeServer>
sk.baka.tools.javaee.JeeServer
public enum JeeServer
Enumerates JavaEE servers and provides several information such as remote EJB endpoint name, transaction manager location etc. Provides running JavaEE application server auto-detection mechanism.
| Enum Constant Summary | |
|---|---|
Glassfish
The Glassfish application server. |
|
JBoss
The JBoss server. |
|
Oc4j
The OC4J application server. |
|
OpenEJB
OpenEJB. |
|
WebLogic
WebLogic. |
|
WebSphere
WebSphere. |
|
| Method Summary | |
|---|---|
protected static boolean |
existsClass(String className)
|
abstract String |
getHibernateTransactionManagerFactory()
Returns a correct Hibernate org.hibernate.transaction.TransactionManagerLookup instance class name. |
abstract Properties |
getJNDIProperties(boolean local)
Returns JNDI properties for instantiating correct instance of InitialContext. |
String |
getLocalhostRemoteURL()
A localhost sample of how the connection URL should look like when connecting to remote EJBs. |
abstract String |
getRemoteURL(String host,
Integer port)
Returns the connection URL for connecting to remote EJBs. |
static JeeServer |
getRuntime()
Returns the server we are running on. |
static JeeServer |
getRuntimeNull()
Returns the server we are running on. |
abstract String |
getServerName()
Returns the displayable name of the application server. |
abstract String |
getTransactionManagerJndi()
Returns a JNDI name of the TransactionManager implementation. |
abstract String |
getUserTransactionJndi()
Returns a JNDI name of the UserTransaction implementation. |
protected abstract boolean |
isRunningOn()
Checks if we are running on a particular kind of a server. |
static JeeServer |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static JeeServer[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final JeeServer JBoss
public static final JeeServer WebSphere
public static final JeeServer WebLogic
public static final JeeServer OpenEJB
public static final JeeServer Glassfish
public static final JeeServer Oc4j
| Method Detail |
|---|
public static JeeServer[] values()
for (JeeServer c : JeeServer.values()) System.out.println(c);
public static JeeServer valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullprotected abstract boolean isRunningOn()
true if we are running on this server,
false otherwise.public static JeeServer getRuntimeNull()
null then no known server is running in this VM.protected static boolean existsClass(String className)
public static JeeServer getRuntime()
public abstract String getHibernateTransactionManagerFactory()
org.hibernate.transaction.TransactionManagerLookup instance class name.
public abstract String getTransactionManagerJndi()
UnsupportedOperationException - if the TransactionManager cannot be simply looked up in JNDI.public abstract String getUserTransactionJndi()
public abstract String getServerName()
public final String getLocalhostRemoteURL()
remote EJBs.
null sample URL.
public abstract String getRemoteURL(String host,
Integer port)
Context.PROVIDER_URL.
host - the host name, must not be null.port - optional port. If null then use the default
port.
public abstract Properties getJNDIProperties(boolean local)
InitialContext. Note that in properly configured JavaEE environment there should be no need to set JNDI parameters to InitialContext, therefore
this method should be used in special environments only:
local - if true then JNDI is configured to invoke local
beans; if false then remote beans are invoked.
null if the server requires a JavaEE environment and thus a correct Context instance can be obtained simply by
invoking new InitialContext().
UnsupportedOperationException - if this type of connectivity is not supported.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||