private static String getAppNameFromDeployCmdParams(DeploymentContext dc) { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); return commandParams.name(); }
@Override public boolean isJava2DBRequired() { OpsParams params = deploymentContext.getCommandParameters(OpsParams.class); // We only do java2db while being deployed on DAS. We do not do java2DB on load of an application or being deployed on an instance of a cluster return params.origin.isDeploy() && isDas; }
@Override public ClassLoader getTempClassloader() { return ( (InstrumentableClassLoader)deploymentContext.getClassLoader() ).copy(); }
@Override public void unload(DummyApplication container, DeploymentContext context) { OpsParams params = context.getCommandParameters(OpsParams.class); cleanSecurityContext(params.name()); }
/** * Returns the meta data assocated with this Deployer * * @return the meta data for this Deployer */ public MetaData getMetaData() { return new MetaData(false, null, null); }
@Override public <U extends OpsParams> U getCommandParameters(Class<U> commandParametersType) { return context.getCommandParameters(commandParametersType); }
@Override public <T> T getTransientAppMetaData(String metaDataKey, Class<T> metadataType) { return context.getTransientAppMetaData(metaDataKey, metadataType); }
@Override public void addTransientAppMetaData(String metaDataKey, Object metaData) { context.addTransientAppMetaData(metaDataKey, metaData); }
public ServerProviderContainerContractInfo(DeploymentContext deploymentContext, ConnectorRuntime connectorRuntime, boolean isDas) { super(connectorRuntime, deploymentContext); this.deploymentContext = deploymentContext; // Cache finalClassLoader as deploymentContext.getFinalClassLoader() is expected to be called only once during deployment. this.finalClassLoader = deploymentContext.getFinalClassLoader(); this.isDas = isDas; }
/** * Stops a module, meaning that components implemented by this module should not be accessed * by external modules * * @param context stopping context * @return */ public boolean stop(ApplicationContext context) { return appCtr.stop(context); }
@Override public void addTransformer(final ClassTransformer transformer) { // Bridge between java.lang.instrument.ClassFileTransformer that DeploymentContext accepts // and javax.persistence.spi.ClassTransformer that JPA supplies. deploymentContext.addTransformer(new ClassFileTransformer() { public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { return transformer.transform(loader, className, classBeingRedefined, protectionDomain, classfileBuffer); } }); }
private static String getAppNameFromDeployCmdParams(DeploymentContext dc) { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); return commandParams.name(); }
@Override public MetaData getMetaData() { return new MetaData(false, new Class[] {EjbBundleDescriptorImpl.class}, new Class[] {Application.class}); }
@Override public String getJTADataSourceOverride() { return deploymentContext.getTransientAppMetaData(DatabaseConstants.JTA_DATASOURCE_JNDI_NAME_OVERRIDE, String.class); } }
@Override public MetaData getMetaData() { return new MetaData(false, new Class[] {EjbBundleDescriptor.class}, new Class[] {Application.class}); }
/** * Returns the meta data assocated with this Deployer * * @return the meta data for this Deployer */ @Override public MetaData getMetaData() { return new MetaData(false, null, new Class[] {Application.class}); }
/** * Returns the meta data assocated with this Deployer * * @return the meta data for this Deployer */ public MetaData getMetaData() { return new MetaData(false, null, new Class[]{Application.class}); }
@Override public MetaData getMetaData() { return new MetaData(true /*invalidateCL */ , null /* provides */, new Class[] {Application.class} /* requires Application from dol */); }
/** * Returns the meta data assocated with this Deployer * * @return the meta data for this Deployer */ public MetaData getMetaData() { return new MetaData(false, null, new Class[] { WebBundleDescriptor.class }); }
/** * Returns the meta data assocated with this Deployer * * @return the meta data for this Deployer */ public MetaData getMetaData() { return new MetaData(false, null, null); }