FileDocCategorySizeDatePackage
EjbcContextImpl.javaAPI DocGlassfish v2 API10320Fri May 04 22:34:32 BST 2007com.sun.enterprise.deployment.backend

EjbcContextImpl

public class EjbcContextImpl extends Object implements com.sun.ejb.codegen.EjbcContext
Ejbc runtime environment created by deployment backend. This class contains all the information needed by ejbc for a particular deployment.
author
Nazrul Islam
since
JDK 1.4

Fields Summary
private File
_srcDir
current directory where the ear file has been exploded
private File
_stubsDir
current stubs directory for the archive
private com.sun.enterprise.deployment.Application
_application
obj representation of deployment descriptor
private String[]
_classpathUrls
class paths for this archive
private String[]
_ejbClasspathUrls
ejb class paths for this archive
private List
_rmicOptions
RMIC options
private List
_javacOptions
JAVAC options
private com.sun.ejb.codegen.IASEJBCTimes
_timing
timing information for the sub-tasks of ejbc
private DeploymentMode
_deploymentMode
deployment mode
private Properties
_optionalArguments
optional attributes
private DeploymentRequest
_request
Deployment Request object
private static com.sun.enterprise.util.i18n.StringManager
localStrings
i18n string manager
Constructors Summary
EjbcContextImpl()
Do-nothing constructor.

	
EjbcContextImpl(File srcDir, File stubsDir, com.sun.enterprise.deployment.Application dd, DeploymentRequest request)

author
bnevins I added this constructor to get rid of the long, error-prone sequence of setter commands sprinkled in the code to create instances for CMP usage. They all use the same sequences, so it may as well be a constructor that has some smarts...

		setSrcDir(srcDir);
		setStubsDir(stubsDir);
		setDeploymentRequest(request);
		setOptionalArguments(request.getOptionalArguments());
		setDescriptor(dd);
	
Methods Summary
public java.lang.String[]getClasspathUrls()
Returns the class paths need by this archive to compile the generated src. This includes class-path prefix, class-path of the target instance, common class loader paths, shared class loader paths and the ejb class loader paths.

return
the ejb class paths for this archive

        return this._classpathUrls;
    
public DeploymentModegetDeploymentMode()
Returns the deployment mode, i.e., archive layout. Default is EXPLODED mode.

return
deployment mode

        return this._deploymentMode;
    
public DeploymentRequestgetDeploymentRequest()
Returns the original DeploymentRequest object for the current deployment

return
Deployment Request object

		return _request;
	
public com.sun.enterprise.deployment.ApplicationgetDescriptor()
Returns the object representation of the deployment descriptor for the current archive.

return
the deployment descriptor for the current archive

        return this._application;
    
public java.lang.String[]getEjbClasspathUrls()
Returns the ejb class paths of this archive.

return
the ejb class paths for this archive

        return this._ejbClasspathUrls;
    
public java.util.ListgetJavacOptions()
Returns the JAVAC options as defined in the instance's server configuration. The default is: "-g"

return
the JAVAC options

        return this._javacOptions;
    
public java.util.PropertiesgetOptionalArguments()
Returns the optional arguments - which currently consists of CMP-specific deployment arguments

return
optional attributes

		return _optionalArguments;
	
public java.util.ListgetRmicOptions()
Returns the RMIC options as defined in the instance's server configuration. The default is: "-iiop -poa -alwaysgenerate -keepgenerated -g"

return
the RMIC options

        return this._rmicOptions;
    
public java.io.FilegetSrcDir()
Returns the current directory where the archive has been exploded.

return
the directory where the archive has been exploded

        return this._srcDir;
    
public java.io.FilegetStubsDir()
Returns the (current stubs) directory where all the code is generated and being compiled for this archive.

return
the current stubs directory for this archive

        return this._stubsDir;
    
public com.sun.ejb.codegen.IASEJBCTimesgetTiming()
Returns the timing information for the sub-tasks of ejbc.

return
timing information for the sub-tasks of ejbc

        return this._timing;
    
voidsetClasspathUrls(java.lang.String[] classpathUrls)
Sets the ejb class paths.

param
classpathUrls the ejb class paths for this archive

        this._classpathUrls = classpathUrls;
    
voidsetDeploymentMode(DeploymentMode mode)
Sets the deployment mode.

param
mode deployment mode to be used for this deployment

        if (mode == null) {
            String msg = localStrings.getString(
                        "enterprise.deployment.backend.invalid_deployment_mode",
                        "null" );
            throw new IASDeploymentException(msg);
        }
        this._deploymentMode = mode;
    
voidsetDeploymentRequest(DeploymentRequest request)
Sets the original DeploymentRequest object for the current deployment

param
request Deployment Request object

		_request = request;
	
voidsetDescriptor(com.sun.enterprise.deployment.Application application)
Sets the deployment descriptor object.

param
application deployment descriptor object for the current archive

        this._application = application;
    
voidsetEjbClasspathUrls(java.lang.String[] paths)
Sets the ejb class path for this deployment. This is the ejb part of the archive and does not have any other class paths. This method is used during re-deployment optimization in ejbc.

        this._ejbClasspathUrls = paths;
    
voidsetJavacOptions(java.util.List javacOptions)
Sets the JAVAC options.

param
javacOptions JAVAC options

        this._javacOptions = javacOptions;
    
voidsetOptionalArguments(java.util.Properties p)
Sets the optional attributes

see
setOptionalAttributes
param
optionalAttributes the optional attributes as name-value pairs

		_optionalArguments = p;
	
voidsetRmicOptions(java.util.List rmicOptions)
Sets the RMIC options.

param
rmicOptions RMIC options

        this._rmicOptions = rmicOptions;
    
voidsetSrcDir(java.io.File srcDir)
Sets the directory where the archive has been exploded.

param
srcDir current directory where the archive has been exploded

        this._srcDir = srcDir;
    
voidsetStubsDir(java.io.File stubsDir)
Sets the current stubs directory.

param
stubsDir current stubs directory

        this._stubsDir = stubsDir;
    
voidsetTiming(com.sun.ejb.codegen.IASEJBCTimes timing)
Sets the timing for ejbc.

param
timing object encapsulating the timing information for the sub-tasks of ejbc

        this._timing = timing;