donaldp 02/05/10 07:16:53
Modified: src/conf kernel.xml
src/java/org/apache/avalon/phoenix/components/deployer
DefaultDeployer.java Resources.properties
Removed: src/java/org/apache/avalon/phoenix/components/deployer
DefaultDeploymentRecorder.java
PersistentDeploymentRecorder.java
src/java/org/apache/avalon/phoenix/interfaces
DeploymentRecorder.java
Log:
Remove the concept of a DeploymentRecorder for the time being. Due to some
issuses it is required that we reinstall for each redeploy due to way JVM
caches jars.
Revision Changes Path
1.5 +0 -4 jakarta-avalon-phoenix/src/conf/kernel.xml
Index: kernel.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-phoenix/src/conf/kernel.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- kernel.xml 10 May 2002 12:18:11 -0000 1.4
+++ kernel.xml 10 May 2002 14:16:53 -0000 1.5
@@ -8,10 +8,6 @@
class="org.apache.avalon.phoenix.components.deployer.DefaultDeployer"
logger="deployer"/>
- <component
role="org.apache.avalon.phoenix.interfaces.DeploymentRecorder"
-
class="org.apache.avalon.phoenix.components.deployer.DefaultDeploymentRecorder"
- logger="recorder"/>
-
<component role="org.apache.avalon.phoenix.interfaces.LogManager"
class="org.apache.avalon.phoenix.components.logger.DefaultLogManager"
logger="logs"/>
1.24 +14 -15
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java
Index: DefaultDeployer.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- DefaultDeployer.java 10 May 2002 09:13:41 -0000 1.23
+++ DefaultDeployer.java 10 May 2002 14:16:53 -0000 1.24
@@ -10,6 +10,8 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.Map;
+import java.util.Hashtable;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.framework.activity.Initializable;
@@ -25,7 +27,6 @@
import org.apache.avalon.phoenix.interfaces.Deployer;
import org.apache.avalon.phoenix.interfaces.DeployerMBean;
import org.apache.avalon.phoenix.interfaces.DeploymentException;
-import org.apache.avalon.phoenix.interfaces.DeploymentRecorder;
import org.apache.avalon.phoenix.interfaces.Kernel;
import org.apache.avalon.phoenix.interfaces.LogManager;
import org.apache.avalon.phoenix.metadata.BlockListenerMetaData;
@@ -54,12 +55,12 @@
private final Assembler m_assembler = new Assembler();
private final SarVerifier m_verifier = new SarVerifier();
private final Installer m_installer = new Installer();
+ private final Map m_installations = new Hashtable();
private LogManager m_logManager;
private Kernel m_kernel;
private ConfigurationRepository m_repository;
private ClassLoaderManager m_classLoaderManager;
- private DeploymentRecorder m_recorder;
/**
* Retrieve relevant services needed to deploy.
@@ -74,7 +75,6 @@
m_repository = (ConfigurationRepository)serviceManager.lookup(
ConfigurationRepository.ROLE );
m_classLoaderManager = (ClassLoaderManager)serviceManager.lookup(
ClassLoaderManager.ROLE );
m_logManager = (LogManager)serviceManager.lookup( LogManager.ROLE );
- m_recorder = (DeploymentRecorder)serviceManager.lookup(
DeploymentRecorder.ROLE );
}
public void initialize()
@@ -94,6 +94,14 @@
public void undeploy( final String name )
throws DeploymentException
{
+ final Installation installation =
+ (Installation)m_installations.remove( name );
+ if( null == installation )
+ {
+ final String message =
+ REZ.getString( "deploy.no-deployment.error", name );
+ throw new DeploymentException( message );
+ }
try
{
final Application application = m_kernel.getApplication( name );
@@ -107,11 +115,7 @@
m_repository.storeConfiguration( name, blocks[ i ], null );
}
- final Installation installation = m_recorder.fetchInstallation(
name );
m_installer.uninstall( installation );
-
- //erase installation information
- m_recorder.recordInstallation( name, null );
}
catch( final Exception e )
{
@@ -151,14 +155,7 @@
{
try
{
- Installation installation = m_recorder.fetchInstallation( name );
-
- if( null == installation )
- {
- //fresh installation
- installation = m_installer.install( location );
- m_recorder.recordInstallation( name, installation );
- }
+ final Installation installation = m_installer.install( location
);
final Configuration config = getConfigurationFor(
installation.getConfig() );
final Configuration server = getConfigurationFor(
installation.getEnvironment() );
@@ -185,6 +182,8 @@
//Finally add application to kernel
m_kernel.addApplication( metaData, classLoader, hierarchy,
server );
+
+ m_installations.put( name, installation );
final String message =
REZ.getString( "deploy.notice.sar.add", name,
installation.getClassPath() );
1.11 +1 -0
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/Resources.properties,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Resources.properties 2 Nov 2001 23:31:16 -0000 1.10
+++ Resources.properties 10 May 2002 14:16:53 -0000 1.11
@@ -7,3 +7,4 @@
deploy.error.sar.add=Error adding component entry ({0}) to container.
deploy.error.deploy.failed=Failed to deploy {0} from {1}.
deploy.error.extra.config=There is no coresponding Block or Listener for
configuration data in element "{0}".
+deploy.no-deployment.error=No deployment by name of "{0}".
\ No newline at end of file
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>