com.sun.ts.lib.porting
Interface TSDeploymentInterface2
public interface TSDeploymentInterface2
This is the TSDeploymentInterface2. The TSDeploymentInterface2 interface
allows for implementation specific functionality for those operations not
defined by JSR-88.
Method Summary |
void |
createConnectionFactory(javax.enterprise.deploy.spi.TargetModuleID[] targetIDs,
java.util.Properties p)
This method is called to create a connection factory in your
Java EE implementation. |
java.lang.String |
getAppClientArgs(java.util.Properties p)
This method is called by the test harness to get any additional test
specific arguments that must be passed to the application client
container class, which is specified in the ts.jte file in the given
environment (command.testExecuteAppClient property). |
java.lang.String |
getClientClassPath(javax.enterprise.deploy.spi.TargetModuleID[] targetIDs,
DeploymentInfo info,
javax.enterprise.deploy.spi.DeploymentManager manager)
This method is called by the Standard Deployment implementation of
TSDeploymentInterface to get the classpath to any generated classes
that must be accessible to application clients. |
java.util.Hashtable |
getDependentValues(DeploymentInfo[] infoArray)
This method is called by the test harness to get any property values
which must be set in one component's runtime info according to rules
defined by the opposite server's implementation
in an interop scenario. |
java.lang.Object |
getDeploymentPlan(DeploymentInfo info)
This method should return a Deployment Plan for a given Java EE
implementation. |
javax.enterprise.deploy.spi.Target[] |
getTargetsToUse(javax.enterprise.deploy.spi.Target[] targets,
DeploymentInfo info)
This method allows vendors to choose which targets, of the available targets,
they would like to deploy on. |
void |
init(java.io.PrintWriter writer)
Initializes a new TSDeploymentInterface2 instance. |
void |
postDistribute(javax.enterprise.deploy.spi.status.ProgressObject po)
Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to distribute. |
void |
postStart(javax.enterprise.deploy.spi.status.ProgressObject po)
Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to start. |
void |
postStop(javax.enterprise.deploy.spi.status.ProgressObject po)
Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to stop. |
void |
postUndeploy(javax.enterprise.deploy.spi.status.ProgressObject po)
Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to undeploy. |
void |
removeConnectionFactory(javax.enterprise.deploy.spi.TargetModuleID[] targetIDs,
java.util.Properties p)
This method is called to remove a connection factory from your
Java EE implementation. |
init
void init(java.io.PrintWriter writer)
- Initializes a new TSDeploymentInterface2 instance. All output should be
printed to this PrintWriter. All properties in the ts.jte file are
accessible to this porting implementation class only via the
TSPropertyManager class. Please see Sun's implementation of this method
for an example (SunRIDeployment2.java).
- Parameters:
writer
- The PrintWriter that should be used to log output.
getClientClassPath
java.lang.String getClientClassPath(javax.enterprise.deploy.spi.TargetModuleID[] targetIDs,
DeploymentInfo info,
javax.enterprise.deploy.spi.DeploymentManager manager)
throws TSDeploymentException
- This method is called by the Standard Deployment implementation of
TSDeploymentInterface to get the classpath to any generated classes
that must be accessible to application clients.
- Parameters:
targetIDs
- The list of deployment target IDs. These are the targets
where the current application is being deployed.info
- The deployment info object that contains the S1AS runtime
infomation.
- Returns:
- String This method should return a string which is formatted such
that it can be appended to the classpath. Your Java EE
implementation returns the fully qualified path to a jar
file, which contains the generated ejb stub classes, which
are used by any appclient tests (tests whose client directly
uses an ejb).
- Throws:
TSDeploymentException
getDeploymentPlan
java.lang.Object getDeploymentPlan(DeploymentInfo info)
throws TSDeploymentException
- This method should return a Deployment Plan for a given Java EE
implementation. The Deployment Plan is constructed from deployment-time
information passed to this method via the DeploymentInfo object. The
DeploymentInfo object is an objectized version of Sun's RI runtime.xml.
Much of this information is needed to deploy the apps to your server.
For detailed info on the elements contained in the DeploymentInfo object,
please see the sun-ri 1.4 DTD that's included in the Java EE RI.
Note that the returned Deployment Plan may have additional
data which is not present in the DeploymentInfo object. The returned
InputStream or File is passed to the JSR-88 API via the DeploymentManager.
distribute method.
- Returns:
- A Deployment Plan as an InputStream or a File
- Throws:
TSDeploymentException
createConnectionFactory
void createConnectionFactory(javax.enterprise.deploy.spi.TargetModuleID[] targetIDs,
java.util.Properties p)
throws TSDeploymentException
- This method is called to create a connection factory in your
Java EE implementation. We extract such info as deployment_host
and rar_file from these props. The following properties in 'p' are
available for this method's use:
rar_file - the fully qualified connector file (.rar file)
deployment_host - the host name of the machine to deploy it to
rar_module_id - the module id returned from deploying the rar file which
requires this connection factory to be created
The connection factory to be created can be looked up via the
PropertyManager, using the rar_file name as the key. The key maps to a
value in the ts.jte file. For more information, please refer to the Sun
RI impl of this interface - located in src/com/sun/ts/lib/implementation/sun/
javaee/SunRIDeployment2.java.
- Parameters:
targetIDs
- List of target module IDs where the connector will
be deployed to.p
- Properties specific to the currently running test
- Throws:
TSDeploymentException
removeConnectionFactory
void removeConnectionFactory(javax.enterprise.deploy.spi.TargetModuleID[] targetIDs,
java.util.Properties p)
throws TSDeploymentException
- This method is called to remove a connection factory from your
Java EE implementation. We extract such info as deployment_host
and rar_file from these props. The following properties are available
for this method's use:
rar_file - the fully qualified connector file (.rar file)
deployment_host - the host name of the machine to undeploy it from
The connection factory to be removed can be looked up via the
PropertyManager, using the rar_file name as the key. The key maps to a
value in the ts.jte file. For more information, please refer to the Sun
RI impl of this interface - located in src/com/sun/ts/lib/implementation/sun/
javaee/SunRIDeployment2.java.
- Parameters:
p
- Properties specific to the currently running test
- Throws:
TSDeploymentException
getAppClientArgs
java.lang.String getAppClientArgs(java.util.Properties p)
- This method is called by the test harness to get any additional test
specific arguments that must be passed to the application client
container class, which is specified in the ts.jte file in the given
environment (command.testExecuteAppClient property).
The additional args should be
appended to the value of (p.getProperty("executeArgs");), and returned.
The following properties are available for this method's use:
executeArgs - the current executeArgs as specified in the jte file
- Parameters:
p
- Properties specific to the currently running test
- Returns:
- This method should return a string which represents all
executeArgs to be used.
getDependentValues
java.util.Hashtable getDependentValues(DeploymentInfo[] infoArray)
- This method is called by the test harness to get any property values
which must be set in one component's runtime info according to rules
defined by the opposite server's implementation
in an interop scenario. Currently this method should return a hashtable
of mappings for any EJB references in the array of DeploymentInfo objects
where:
key = original corbaname JNDI name in the RI format
value = vendor corbaname JNDI name in the Vendor format
or it will return mappings for WSDL publish locations so that a client
component's runtime info can be updated prior to deployment to the secon
server.
key = original corbaname JNDI name in the RI format
value = vendor corbaname JNDI name in the Vendor format
In reality, it can be used generically to handle any string format
that must be retrieved from one server and applied to the runtimeinfo
prior to deploying to another server.
- Parameters:
infoArray
- Array of DeploymentInfo objects for the ear files
associated with a particular directory
- Returns:
- Hashtable This method should return a Hashtable of mappings
(see above)
getTargetsToUse
javax.enterprise.deploy.spi.Target[] getTargetsToUse(javax.enterprise.deploy.spi.Target[] targets,
DeploymentInfo info)
- This method allows vendors to choose which targets, of the available targets,
they would like to deploy on.
- Parameters:
targets
- Available deployment targetsinfo
- The deployment info object containing all the S1AS runtime info
- Returns:
- Target[] List of targets to deploy the application on.
postDistribute
void postDistribute(javax.enterprise.deploy.spi.status.ProgressObject po)
- Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to distribute. They may also wish to
invoke some vendor specific code based on the state of the specified progress
object. Vendors can choose to implement this method as a no-op.
- Parameters:
po
- The progress object returned from the distribute call.
postStart
void postStart(javax.enterprise.deploy.spi.status.ProgressObject po)
- Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to start. They may also wish to
invoke some vendor specific code based on the state of the specified progress
object. Vendors can choose to implement this method as a no-op.
- Parameters:
po
- The progress object returned from the start call.
postStop
void postStop(javax.enterprise.deploy.spi.status.ProgressObject po)
- Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to stop. They may also wish to
invoke some vendor specific code based on the state of the specified progress
object. Vendors can choose to implement this method as a no-op.
- Parameters:
po
- The progress object returned from the stop call.
postUndeploy
void postUndeploy(javax.enterprise.deploy.spi.status.ProgressObject po)
- Vendors may choose to implement this method if they want to examine the progress
object returned from the JSR 88 API call to undeploy. They may also wish to
invoke some vendor specific code based on the state of the specified progress
object. Vendors can choose to implement this method as a no-op.
- Parameters:
po
- The progress object returned from the undeploy call.