hammant 02/01/09 06:54:25
Modified: apps/bay build.xml
apps/bay/src/conf avalon-bay-assembly.xml
apps/bay/src/java/org/apache/avalon/bay/blocks BayImpl.java
BayImpl.xinfo
Added: apps/bay/src/java/org/apache/avalon/bay/blocks
CatalinaServiceWrapper.java
apps/bay/src/java/org/apache/avalon/bay/service
Catalina.java
Removed: apps/bay/src/java/org/apache/avalon/bay/blocks
TomcatExamples.java TomcatExamples.xinfo
Log:
Catalina one stage further to working in Phoenix
Revision Changes Path
1.17 +10 -7 jakarta-avalon-cornerstone/apps/bay/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/bay/build.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- build.xml 30 Dec 2001 16:23:37 -0000 1.16
+++ build.xml 9 Jan 2002 14:54:25 -0000 1.17
@@ -55,6 +55,7 @@
<pathelement location="xerces.jar2"/>
<pathelement path="${build.classes}" />
<pathelement path="../../build/classes" />
+ <pathelement path="jakarta-tomcat-4.0.2-b1/server/lib/catalina.jar"/>
<fileset dir="../../lib">
<include name="*.jar" />
@@ -197,10 +198,16 @@
<include name="*.jar"/>
</lib>
<lib dir="${tomcat.dir}/lib">
- <include name="jasper-*.jar"/>
+ <include name="*.jar"/>
</lib>
<lib dir="${tomcat.dir}/common/lib">
- <include name="servlet.jar"/>
+ <include name="*.jar"/>
+ </lib>
+ <lib dir="${tomcat.dir}/server/lib">
+ <include name="*.jar"/>
+ </lib>
+ <lib dir="${tomcat.dir}/bin">
+ <include name="*.jar"/>
</lib>
<lib dir="${java.home}/lib">
<include name="tools.jar"/>
@@ -209,11 +216,7 @@
<lib dir="lib/">
<include name="tools.jar"/>
</lib>
- -->
-
- <zipfileset dir="${tomcat.dir}" prefix="${tomcat.dir}">
- <include name="**"/>
- </zipfileset>
+ -->
</sar>
1.3 +1 -1
jakarta-avalon-cornerstone/apps/bay/src/conf/avalon-bay-assembly.xml
Index: avalon-bay-assembly.xml
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/bay/src/conf/avalon-bay-assembly.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- avalon-bay-assembly.xml 10 Nov 2001 21:43:02 -0000 1.2
+++ avalon-bay-assembly.xml 9 Jan 2002 14:54:25 -0000 1.3
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<assembly>
- <block class="org.apache.avalon.bay.blocks.TomcatExamples"
+ <block class="org.apache.avalon.bay.blocks.BayImpl"
name="http-server" >
</block>
</assembly>
1.7 +81 -90
jakarta-avalon-cornerstone/apps/bay/src/java/org/apache/avalon/bay/blocks/BayImpl.java
Index: BayImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/bay/src/java/org/apache/avalon/bay/blocks/BayImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BayImpl.java 24 Nov 2001 12:08:00 -0000 1.6
+++ BayImpl.java 9 Jan 2002 14:54:25 -0000 1.7
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
@@ -7,6 +8,8 @@
*/
package org.apache.avalon.bay.blocks;
+
+
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.activity.Startable;
import org.apache.avalon.framework.activity.Initializable;
@@ -20,12 +23,8 @@
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.phoenix.Block;
import org.apache.avalon.phoenix.BlockContext;
-import org.apache.avalon.bay.services.Bay;
-import org.apache.avalon.bay.delegate.Embedded;
-import org.apache.avalon.bay.delegate.Engine;
-import org.apache.avalon.bay.delegate.CatalinaClassLoader;
-import org.apache.avalon.bay.delegate.Connector;
-import org.apache.avalon.bay.Constants;
+import org.apache.avalon.bay.service.Catalina;
+import org.apache.catalina.startup.CatalinaService;
import java.io.File;
@@ -34,93 +33,85 @@
* @author Paul Hammant <[EMAIL PROTECTED]>
* @version 1.0
*/
-public class BayImpl
- extends AbstractLogEnabled
- implements Block, Bay, Startable, Contextualizable, Composable,
Configurable, Initializable
-{
-
- protected BlockContext m_context;
-
- protected Embedded m_EmbeddedCatalina;
- protected Engine m_Engine;
-
-
- protected String m_CatalinaHome;
-
-
- protected CatalinaClassLoader mCatalinaClassLoader;
-
-
- //protected String m_DefaultWebappPath = m_HomePath + File.separator +
"Default_Webapp";
- protected File m_Home, m_DefaultWebapp;
-
- public BayImpl()
- {
-
- }
-
-
- public void contextualize( final Context context )
- {
- m_context = (BlockContext)context;
- File baseDirectory = m_context.getBaseDirectory();
- m_CatalinaHome = baseDirectory.getAbsolutePath() + File.separator +
Constants.JAKARTATOMCAT4;
- System.setProperty("catalina.home",m_CatalinaHome);
- System.setProperty("catalina.base",m_CatalinaHome);
- mCatalinaClassLoader =
CatalinaClassLoader.createCatalinaClassLoader(baseDirectory);
- }
-
- public void configure( final Configuration configuration )
- throws ConfigurationException
- {
-
-
-
-
- }
-
- public void compose( final ComponentManager componentManager )
- throws ComponentException
- {
- getLogger().info("Bay.compose()");
-
- }
-
- public void initialize()
- throws Exception
- {
- m_EmbeddedCatalina = new Embedded(mCatalinaClassLoader);
- m_Engine = m_EmbeddedCatalina.createEngine();
-
- System.out.println( "JAVA_HOME = " +
System.getProperty("JAVA_HOME"));
-
- }
-
+public class BayImpl extends AbstractLogEnabled
+ implements Block, Catalina, Startable, Contextualizable, Composable,
Configurable,
+ Initializable {
+
+ protected BlockContext m_context;
+ protected CatalinaServiceWrapper m_CatalinaService;
+
+ /**
+ * Constructor BayImpl
+ *
+ *
+ */
+ public BayImpl() {}
+
+ /**
+ * Method contextualize
+ *
+ *
+ * @param context
+ *
+ */
+ public void contextualize(final Context context) {
+ m_context = (BlockContext) context;
+ }
+
+ /**
+ * Method configure
+ *
+ *
+ * @param configuration
+ *
+ * @throws ConfigurationException
+ *
+ */
+ public void configure(final Configuration configuration) throws
ConfigurationException {}
+
+ /**
+ * Method compose
+ *
+ *
+ * @param componentManager
+ *
+ * @throws ComponentException
+ *
+ */
+ public void compose(final ComponentManager componentManager) throws
ComponentException {
+ getLogger().info("Catalina.compose()");
+ }
+
+ /**
+ * Method initialize
+ *
+ *
+ * @throws Exception
+ *
+ */
+ public void initialize() throws Exception {
+ m_CatalinaService = new CatalinaServiceWrapper();
+ }
+
+ /**
+ * Method start
+ *
+ *
+ * @throws Exception
+ *
+ */
public final void start() throws Exception {
-
- m_EmbeddedCatalina.start();
-
- setupSites();
- addEngineAndConnectors();
-
- }
-
- protected void setupSites() {
- }
-
- protected void addEngineAndConnectors() {
-
- m_EmbeddedCatalina.addEngine(m_Engine);
-
- Connector connector = m_EmbeddedCatalina.createConnector(null, 8080,
false);
- m_EmbeddedCatalina.addConnector(connector);
-
+ m_CatalinaService.start();
}
+ /**
+ * Method stop
+ *
+ *
+ * @throws Exception
+ *
+ */
public void stop() throws Exception {
-
- m_EmbeddedCatalina.removeEngine(m_Engine);
- m_EmbeddedCatalina.stop();
+ m_CatalinaService.stop();
}
-
}
1.4 +1 -1
jakarta-avalon-cornerstone/apps/bay/src/java/org/apache/avalon/bay/blocks/BayImpl.xinfo
Index: BayImpl.xinfo
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/bay/src/java/org/apache/avalon/bay/blocks/BayImpl.xinfo,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BayImpl.xinfo 26 Sep 2001 12:26:26 -0000 1.3
+++ BayImpl.xinfo 9 Jan 2002 14:54:25 -0000 1.4
@@ -8,7 +8,7 @@
<!-- services that are offered by this block -->
<services>
- <service name="org.apache.avalon.bay.services.Bay"
+ <service name="org.apache.avalon.bay.service.Catalina"
version="1.0" />
</services>
1.1
jakarta-avalon-cornerstone/apps/bay/src/java/org/apache/avalon/bay/blocks/CatalinaServiceWrapper.java
Index: CatalinaServiceWrapper.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.bay.blocks;
import org.apache.catalina.startup.CatalinaService;
public class CatalinaServiceWrapper extends CatalinaService {
}
1.1
jakarta-avalon-cornerstone/apps/bay/src/java/org/apache/avalon/bay/service/Catalina.java
Index: Catalina.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.bay.service;
/**
* Interface Catalina
*
*
* @author Paul Hammant <a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>
* @version * $Revision: 1.1 $
*/
public interface Catalina {
public static final String ROLE =
"org.apache.avalon.bay.service.Catalina";
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>