Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.3.0)

E17486-04


oracle.adf.share.platform
Class AdfServerPlatformSupport

java.lang.Object
  extended by oracle.adf.share.platform.AdfAbstractSupport
      extended by oracle.adf.share.platform.AdfServerPlatformSupport

Direct Known Subclasses:
AdfNoServerPlatformSupport, GlassFishAdfServerPlatformSupport, JbossAdfServerPlatformSupport, WASAdfServerPlatformSupport, WLSAdfServerPlatformSupport

public abstract class AdfServerPlatformSupport
extends AdfAbstractSupport

Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.adf.share.platform.AdfAbstractSupport
AdfAbstractSupport.PLATFORM_TYPE

 

Field Summary
static java.lang.String CLUSTER_UNKNOWN
          Checked value for getClusterName().
protected  oracle.jrf.ServerPlatformSupport svrcomp
           

 

Fields inherited from class oracle.adf.share.platform.AdfAbstractSupport
GLASSFISH, TOMCAT

 

Constructor Summary
AdfServerPlatformSupport()
           

 

Method Summary
 java.lang.String getAdminServerName()
          Return the name of the AdminServer for the current Domain.
 oracle.jrf.ApplicationIdentifier getApplicationIdentifier()
          Return the ApplicationIdentifier instance which contains the deployment and runtime application names, and application version if applicable.
 java.lang.String getClusterName()
          Return cluster name of the running server.
 java.lang.String getDomainConfigDirectory()
          Return the FMW domain/cell config directory.
 java.lang.String getDomainName()
          Return the domain name in WebLogic server and cell name in WebSphere server
 java.sql.Connection getNativeDBConnection(java.sql.Connection datasourceJdbcConnection, java.lang.Class targetUnwrapClass)
          This method will unwrap DB connection to native DB connection in current server platform.
 java.lang.String getPlatformName()
          Return the application's running server platform name, e.g.
 oracle.jrf.PortConfig getPortConfig()
           Return the port configuration object of the running server.
 oracle.jrf.PortConfig getPortConfig(java.lang.String serverId)
           Return the port configuration object of a specific server in the same WebLogic domain or WAS cell as the running server.
 java.lang.String getServerConfigDirectory()
          Return the FMW server config directory.
 java.lang.String getServerConfigDirectory(java.lang.String domainName, java.lang.String serverName)
          Return config directory of a specified server under a specified domain/cell
 java.lang.String getServerLogPath()
          Return the Absolute path to the log directory associated with this Server instance
 java.lang.String getServerName()
          Return the name of the current Server.
 java.lang.String[] getSupportedPlatformNames()
          Return the array of application server platform names being supported by the portability layer.
 boolean isAdminServer()
          Return true if the current Server is the AdminServer
 boolean isExalogicOptimizationsEnabled()
          Returns true if the underlying platform has optimizations for Exalogic turned on.
static boolean isGlassFish()
           
static boolean isJBoss()
          Return true if the server platform is JBoss Server
static boolean isJEE()
          THis will wrap up checking WLS/WAS/GF/TC/JBOSS
static boolean isTomcat()
           
static boolean isWebLogic()
          Return true if the server platform is WebLogic Server
static boolean isWebSphere()
          Return true if the server platform is WebSphere Server
 boolean isWebSphereAS()
          Return true if the server platform is WebSphere Server AS Edition
 boolean isWebSphereND()
          Return true if the server platform is WebSphere Server ND Edition

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

CLUSTER_UNKNOWN

public static final java.lang.String CLUSTER_UNKNOWN
Checked value for getClusterName(). The value indicates the API cannot determine if the current server is clustered when running on a particular platform (i.e JBoss)
See Also:
Constant Field Values

svrcomp

protected oracle.jrf.ServerPlatformSupport svrcomp

Constructor Detail

AdfServerPlatformSupport

public AdfServerPlatformSupport()

Method Detail

getClusterName

public java.lang.String getClusterName()
                                throws oracle.jrf.PortabilityLayerException
Return cluster name of the running server. If the running server is clustered, return the cluster name. If the running server is not clustered, return null. If it cannot determined server is clustered when running on a particular platform, return ServerPlatformSupport.CLUSTER_UNKNOWN
   Usage:
     String clusterName = platform.getClusterName();
     boolean isServerClustered = clusterName != null && clusterName != ServerPlatformSupport.CLUSTER_UNKNOWN;
  
Throws:
oracle.jrf.PortabilityLayerException - - when there is problem accessing runtime mbeans
UnknownPlatformException - - when the method is called in unsupported platform

getPlatformName

public java.lang.String getPlatformName()
Return the application's running server platform name, e.g. weblogic, websphere, jboss.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform

getApplicationIdentifier

public oracle.jrf.ApplicationIdentifier getApplicationIdentifier()
                                                          throws oracle.jrf.PortabilityLayerException
Return the ApplicationIdentifier instance which contains the deployment and runtime application names, and application version if applicable.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException
See Also:
ApplicationIdentifier

getNativeDBConnection

public java.sql.Connection getNativeDBConnection(java.sql.Connection datasourceJdbcConnection,
                                                 java.lang.Class targetUnwrapClass)
This method will unwrap DB connection to native DB connection in current server platform. The method impl the default unwrap fucntion.
Parameters:
datasourceJdbcConnection -
targetUnwrapClass -
Returns:

getSupportedPlatformNames

public java.lang.String[] getSupportedPlatformNames()
Return the array of application server platform names being supported by the portability layer. Besides what JRF supports: "weblogic", "websphere", "jboss", we will add "glassfish" at very end of the array.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform

getAdminServerName

public java.lang.String getAdminServerName()
                                    throws oracle.jrf.PortabilityLayerException
Return the name of the AdminServer for the current Domain.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getServerName

public java.lang.String getServerName()
                               throws oracle.jrf.PortabilityLayerException
Return the name of the current Server.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getServerLogPath

public java.lang.String getServerLogPath()
                                  throws oracle.jrf.PortabilityLayerException
Return the Absolute path to the log directory associated with this Server instance
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

isAdminServer

public boolean isAdminServer()
                      throws oracle.jrf.PortabilityLayerException
Return true if the current Server is the AdminServer
Throws:
oracle.jrf.PortabilityLayerException

isWebLogic

public static boolean isWebLogic()
Return true if the server platform is WebLogic Server

isWebSphere

public static boolean isWebSphere()
Return true if the server platform is WebSphere Server

isWebSphereND

public boolean isWebSphereND()
Return true if the server platform is WebSphere Server ND Edition

isWebSphereAS

public boolean isWebSphereAS()
Return true if the server platform is WebSphere Server AS Edition

isJBoss

public static boolean isJBoss()
Return true if the server platform is JBoss Server

isJEE

public static boolean isJEE()
THis will wrap up checking WLS/WAS/GF/TC/JBOSS
Returns:
false if none of these platform is available

isGlassFish

public static boolean isGlassFish()

isTomcat

public static boolean isTomcat()

getServerConfigDirectory

public java.lang.String getServerConfigDirectory(java.lang.String domainName,
                                                 java.lang.String serverName)
                                          throws oracle.jrf.PortabilityLayerException
Return config directory of a specified server under a specified domain/cell
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getDomainConfigDirectory

public java.lang.String getDomainConfigDirectory()
                                          throws oracle.jrf.PortabilityLayerException
Return the FMW domain/cell config directory.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getServerConfigDirectory

public java.lang.String getServerConfigDirectory()
                                          throws oracle.jrf.PortabilityLayerException
Return the FMW server config directory.
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getDomainName

public java.lang.String getDomainName()
                               throws oracle.jrf.PortabilityLayerException
Return the domain name in WebLogic server and cell name in WebSphere server
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getPortConfig

public oracle.jrf.PortConfig getPortConfig()
                                    throws oracle.jrf.PortabilityLayerException
 Return the port configuration object of the running server.  This method is optimized by caching the result and automatically refreshed 
 the cache when change to the port configuration is detected.
 
 Note: On WAS platform, the result is built from parsing local configurations.  WAS ND user is required to synchronize 
 the local node to obtain configurations from the master repository, if changes were made to related configurations.
 
Throws:
UnknownPlatformException - - when the method is called in unsupported platform
oracle.jrf.PortabilityLayerException

getPortConfig

public oracle.jrf.PortConfig getPortConfig(java.lang.String serverId)
                                    throws oracle.jrf.PortabilityLayerException
 Return the port configuration object of a specific server in the same WebLogic domain or WAS cell as the running server.  
 The return instance is not cached.  This is used to obtain port configuration of a server that differs from the running server.
  
 Not supported on single server platforms: JBoss and WAS AS.
 
 LIMITATION: 
 On WAS platform, if the running server is not "dmgr" or not in the same node as the specifying server, JRF can only discover 
 the specifying server JNDI port/url using local configuration files of the running server.  Only  getJndiProviderURL() and 
 and getJndiSslProviderURL() can be relied up on the returned PortConfig instance in this case.  If you can connect to MBean 
 server on the "dmgr", use JRF domain runtime MBean, ObjectName "oracle.jrf:name=JRFService,type=oracle.jrf.JRFServiceMBean", 
 to obtain server URLs, see oracle.jrf.JRFServiceMBean.
 
 Note: On WAS platform, the result is built from parsing local configurations.  WAS ND user is required  to synchronize 
 the local node to obtain configurations from the master repository, if changes were made to related configurations.
 
Parameters:
serverId - - server name on WebLogic. On WAS ND, it is the containment path of the server (i.e: "/Cell:cell1/Node:node1/Server:server1").
Throws:
oracle.jrf.PortabilityLayerException - - when used on JBoss or WAS AS.
UnknownPlatformException - - when the method is called in unsupported platform

isExalogicOptimizationsEnabled

public boolean isExalogicOptimizationsEnabled()
Returns true if the underlying platform has optimizations for Exalogic turned on. Can only ever be true for a WLS platform.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.3.0)

E17486-04


Copyright © 1997, 2012, Oracle. All rights reserved.