You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by we...@apache.org on 2004/07/02 16:49:25 UTC
cvs commit: jakarta-jetspeed/webapp/WEB-INF/conf/assembly jetspeed.groovy
weaver 2004/07/02 07:49:25
Modified: webapp/WEB-INF/conf/assembly jetspeed.groovy
Log:
- Changes due to refactoring of PAM.
- VFS FileSystemManager registered directly as a component. (pico rocks!)
Revision Changes Path
1.3 +73 -21 jakarta-jetspeed/webapp/WEB-INF/conf/assembly/jetspeed.groovy
Index: jetspeed.groovy
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/assembly/jetspeed.groovy,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jetspeed.groovy 27 Jun 2004 18:03:28 -0000 1.2
+++ jetspeed.groovy 2 Jul 2004 14:49:25 -0000 1.3
@@ -107,10 +107,18 @@
import org.apache.jetspeed.om.common.portlet.MutablePortletEntity
import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite
+//Commons VFS
+import org.apache.commons.vfs.impl.StandardFileSystemManager
+import org.apache.commons.vfs.FileSystemManager
+import org.apache.commons.vfs.VFS
+
// Autodeploy
-import org.apache.jetspeed.deployment.impl.CatalinaAutoDeploymentServiceImpl
-import org.apache.jetspeed.fusion.tools.pamanager.FusionCatalinaPAM
+import org.apache.jetspeed.deployment.impl.AutoDeploymentManager
+import org.apache.jetspeed.fusion.tools.pamanager.FusionAppServerPAM
+import org.apache.jetspeed.deployment.impl.DeployPortletAppEventListener
+import org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
+import org.apache.jetspeed.tools.pamanager.servletcontainer.TomcatManager
/* *********************************************************
* U T I L I T Y C L O S U R E S *
@@ -165,22 +173,20 @@
{
return cachingAdapter(constructorAdapter(key, clazz, parameters))
}
-
- /* ******************************************************* */
+
+
+/* ******************************************************* */
-ClassLoader cl = Thread.currentThread().getContextClassLoader()
+// create the root container
+container = new DefaultPicoContainer(parent)
-applicationRoot = Jetspeed.getRealPath("/")
-//
-// Resource Location Utility
-//
-FSSystemResourceUtilImpl resourceUtil = new FSSystemResourceUtilImpl(applicationRoot)
+// Make the "portal_config" configuration available
+portalConfig = container.getComponentInstance("portal_configuration")
-// create the root container
-container = new DefaultPicoContainer(parent)
+applicationRoot = portalConfig.getString("applicationRoot", "./")+"/"
/* **********************************************************
* ID Generator *
@@ -418,28 +424,74 @@
)
/* **********************************************************
+ * Commons VFS *
+ * ******************************************************** */
+vfsConfigUri = portalConfig.getString("vfs.configuration.uri", "${applicationRoot}/WEB-INF/conf/vfs-providers.xml")
+
+
+standardManager = new StandardFileSystemManager()
+standardManager.setConfiguration(vfsConfigUri)
+standardManager.init()
+container.registerComponentInstance(FileSystemManager, standardManager);
+
+
+/* **********************************************************
* Autodeployment *
* ******************************************************** */
+
+webAppDeployDirectory = portalConfig.getString("autodeployment.target.dir", "${applicationRoot}/../")
+deployHost = portalConfig.getString("autodeployment.server", "localhost")
+deployPort = portalConfig.getInt("autodeployment.port", 8080)
+deployUser = portalConfig.getString("autodeployment.user", "manager")
+deployPassword = portalConfig.getString("autodeployment.password", "manager")
+deployScanningDelay = portalConfig.getLong("autodeployment.delay", 10000)
+deployStagingDir = portalConfig.getString("autodeployment.staging.dir", "${applicationRoot}/WEB-INF/deploy")
+
+
+container.registerComponent(singletonAdapter(
+ ApplicationServerManager,
+ TomcatManager,
+ doParams([
+ cstParam(deployHost), cstParam(deployPort),
+ cstParam(deployUser), cstParam(deployPassword)
+ ]
+ )
+ )
+)
+
+
container.registerComponent(singletonAdapter(
"PAM",
- FusionCatalinaPAM,
- doParams([cmpParam(PortletRegistryComponent),
- cstParam(Locale.getDefault())
+ FusionAppServerPAM,
+ doParams([
+ cstParam(webAppDeployDirectory),
+ cmpParam(PortletRegistryComponent),
+ cmpParam(FileSystemManager),
+ cmpParam(PortletEntityAccessComponent),
+ cmpParam(PortletWindowAccessor),
+ cmpParam(ApplicationServerManager)
]
)
)
)
+portletApplicationListener = new DeployPortletAppEventListener(webAppDeployDirectory,
+ container.getComponentInstance("PAM"),
+ container.getComponentInstance(PortletRegistryComponent),
+ container.getComponentInstance(FileSystemManager));
+
container.registerComponent(singletonAdapter(
"autodeployment",
- CatalinaAutoDeploymentServiceImpl,
- doParams([cmpParam("portal_configuration"),
- cstParam(Locale.getDefault()),
- cmpParam(PortletRegistryComponent),
- cmpParam("PAM")]
+ AutoDeploymentManager,
+ doParams([cstParam(deployStagingDir),
+ cstParam(deployScanningDelay),
+ cstParam([portletApplicationListener]),
+ cmpParam(FileSystemManager)
+ ]
)
)
)
-return container
\ No newline at end of file
+
+return container
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org