Author: adamw Date: 2006-04-19 17:20:01 -0400 (Wed, 19 Apr 2006) New Revision: 3813 Added: labs/shotoku/trunk/lib/taglibs/ labs/shotoku/trunk/lib/taglibs/jars/ labs/shotoku/trunk/lib/taglibs/jars/jstl.jar labs/shotoku/trunk/lib/taglibs/jars/standard.jar Removed: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/test/ Modified: labs/shotoku/trunk/project.properties labs/shotoku/trunk/shotoku-admin/project.xml labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Constants.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnContentManager.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnTools.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnRepository.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceTimer.java Log: http://jira.jboss.com/jira/browse/JBSHOTOKU-82 Added: labs/shotoku/trunk/lib/taglibs/jars/jstl.jar =================================================================== (Binary files differ) Property changes on: labs/shotoku/trunk/lib/taglibs/jars/jstl.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/shotoku/trunk/lib/taglibs/jars/standard.jar =================================================================== (Binary files differ) Property changes on: labs/shotoku/trunk/lib/taglibs/jars/standard.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: labs/shotoku/trunk/project.properties =================================================================== --- labs/shotoku/trunk/project.properties 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/project.properties 2006-04-19 21:20:01 UTC (rev 3813) @@ -23,5 +23,8 @@ maven.jar.jboss-system=${shotoku.root.dir}lib/jboss/jars/jboss-system.jar maven.jar.jboss-common=${shotoku.root.dir}lib/jboss/jars/jboss-common.jar +maven.jar.standard=${shotoku.root.dir}lib/taglibs/jars/standard.jar +maven.jar.jstl=${shotoku.root.dir}lib/taglibs/jars/jstl.jar + maven.jar.shotoku-base=${shotoku.root.dir}shotoku-base/target/shotoku-base.jar maven.jar.shotoku-aop=${shotoku.root.dir}shotoku-aop/target/shotoku-aop.jar Modified: labs/shotoku/trunk/shotoku-admin/project.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/project.xml 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-admin/project.xml 2006-04-19 21:20:01 UTC (rev 3813) @@ -25,11 +25,22 @@ <version>1.0</version> <jar>javax.servlet.jsp.jar</jar> </dependency> + + <dependency> + <groupId>taglibs</groupId> + <artifactId>jstl</artifactId> + <version>1.0</version> + <jar>jstl.jar</jar> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> <dependency> - <groupId>myfaces</groupId> - <artifactId>myfaces-all</artifactId> - <version>1.1.1</version> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.0</version> + <jar>standard.jar</jar> <properties> <war.bundle>true</war.bundle> </properties> Modified: labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -15,15 +15,14 @@ * @author Adam Warski (ad...@as...) */ public class AdminServlet extends HttpServlet { - protected void service(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) + protected void service(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { - httpServletRequest.setAttribute("now", Calendar.getInstance().getTimeInMillis()); + response.setContentType("text/html"); + request.setAttribute("now", Calendar.getInstance().getTimeInMillis()); + request.setAttribute("asgs", Tools.getService().getAdministratedServices()); - for (AdministratedServiceGetter asg : Tools.getService().getAdministratedServices()) { - httpServletRequest.setAttribute("service", asg.get()); - httpServletRequest.getRequestDispatcher("repo-access/services.jsp").include( - httpServletRequest, httpServletResponse); - } + request.getRequestDispatcher("/repo-access/services.jsp").forward( + request, response); } } Modified: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml 2006-04-19 21:20:01 UTC (rev 3813) @@ -1,20 +1,12 @@ <?xml version="1.0"?> -<!DOCTYPE web-app PUBLIC - "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd"> -<web-app> - <servlet> - <servlet-name>Admin Servlet</servlet-name> - <servlet-class>org.jboss.shotoku.web.admin</servlet-class> - </servlet> - <servlet-mapping> - <servlet-name>Admin Servlet</servlet-name> - <url-pattern>/*</url-pattern> - </servlet-mapping> - +<web-app xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee + http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" + version="2.4"> <filter> - <filter-name>filesFromRepoFilter</filter-name> - <filter-class>org.jboss.shotoku.web.FilesFromRepoFilter</filter-class> + <filter-name>filesFromRepoFilter</filter-name> + <filter-class>org.jboss.shotoku.web.FilesFromRepoFilter</filter-class> <init-param> <param-name>repoAccessDir</param-name> <param-value>repo-access</param-value> @@ -25,9 +17,20 @@ </init-param> </filter> - <filter-mapping> - <filter-name>filesFromRepoFilter</filter-name> - <url-pattern>/repo-access/*</url-pattern> - <dispatcher>INCLUDE</dispatcher> - </filter-mapping> + <filter-mapping> + <filter-name>filesFromRepoFilter</filter-name> + <url-pattern>/repo-access/*</url-pattern> + <dispatcher>INCLUDE</dispatcher> + <dispatcher>FORWARD</dispatcher> + </filter-mapping> + + <servlet> + <servlet-name>Admin Servlet</servlet-name> + <servlet-class>org.jboss.shotoku.web.admin.AdminServlet</servlet-class> + </servlet> + + <servlet-mapping> + <servlet-name>Admin Servlet</servlet-name> + <url-pattern>/admin/*</url-pattern> + </servlet-mapping> </web-app> Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -23,13 +23,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; +import java.util.*; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.PropertiesConfiguration; @@ -53,674 +47,756 @@ * @author Damon Sicore (da...@si...) */ public abstract class ContentManager { - /** - * Prefix of this content manager. - */ - private String prefix; + /** + * Prefix of this content manager. + */ + private String prefix; - /** - * Id of a corresponding repository. - */ - private String id; + /** + * Id of a corresponding repository. + */ + private String id; - /** - * A map of initialized velocity engines, The key is a string representation - * of parameters with which an engine was initialized. - */ - private static Map<String, VelocityEngine> engines; + /** + * A map of initialized velocity engines, The key is a string representation + * of parameters with which an engine was initialized. + */ + private static Map<String, VelocityEngine> engines; - /** - * Gets a root directory that is represented by this content manager. - * - * @return A directory that is the root directory of this content manager. - * @throws RepositoryException - */ - public abstract Directory getRootDirectory() throws RepositoryException; + /** + * Gets a root directory that is represented by this content manager. + * + * @return A directory that is the root directory of this content manager. + * @throws RepositoryException + */ + public abstract Directory getRootDirectory() throws RepositoryException; - /** - * Gets the most recent version of a node which can be found under the given - * path (to get nodes from subdirectories, use <code>/</code> to separate - * them). - * - * @param path - * Path for which to get the node. - * @return A node corresponding to the given path. - * @throws ResourceDoesNotExist - * @throws RepositoryException - */ - public abstract Node getNode(String path) throws ResourceDoesNotExist, - RepositoryException; + /** + * Gets the most recent version of a node which can be found under the given + * path (to get nodes from subdirectories, use <code>/</code> to separate + * them). + * + * @param path + * Path for which to get the node. + * @return A node corresponding to the given path. + * @throws ResourceDoesNotExist + * @throws RepositoryException + */ + public abstract Node getNode(String path) throws ResourceDoesNotExist, + RepositoryException; - /** - * Gets a directory which can be found under the given path (to get nodes - * from subdirectories, use <code>/</code> to separate them). - * - * @param path - * Path for which to get the directory. - * @return A directory corresponding to the given path. - * @throws ResourceDoesNotExist - * @throws RepositoryException - */ - public abstract Directory getDirectory(String path) - throws ResourceDoesNotExist, RepositoryException; + /** + * Gets a directory which can be found under the given path (to get nodes + * from subdirectories, use <code>/</code> to separate them). + * + * @param path + * Path for which to get the directory. + * @return A directory corresponding to the given path. + * @throws ResourceDoesNotExist + * @throws RepositoryException + */ + public abstract Directory getDirectory(String path) + throws ResourceDoesNotExist, RepositoryException; - /** - * Performs the given search in this content manager. - * - * @param search - * Search to perform. - * @return A node list that is the result of the search. - */ - public NodeList search(Search search) throws ResourceDoesNotExist { - return search.perform(this); - } + /** + * Performs the given search in this content manager. + * + * @param search + * Search to perform. + * @return A node list that is the result of the search. + */ + public NodeList search(Search search) throws ResourceDoesNotExist { + return search.perform(this); + } - /** - * Gets the id of this repository. - * - * @return Id of this repository. - */ - public String getId() { - return id; - } + /** + * Gets the id of this repository. + * + * @return Id of this repository. + */ + public String getId() { + return id; + } - /** - * Gets the prefix of this content manager. - * - * @return Prefix of this content manager. - */ - public String getPrefix() { - return prefix; - } + /** + * Gets the prefix of this content manager. + * + * @return Prefix of this content manager. + */ + public String getPrefix() { + return prefix; + } - /** - * Saves the given resources at one time. Recommended if you have multiple - * resources to save. - * - * @param resources - * Resources to save. - * @param logMessage - * Log message to save with. - * @throws SaveException - * @throws RepositoryException - */ - public abstract void save(Collection<Resource> resources, String logMessage) - throws SaveException, RepositoryException; + /** + * Saves the given resources at one time. Recommended if you have multiple + * resources to save. + * + * @param resources + * Resources to save. + * @param logMessage + * Log message to save with. + * @throws SaveException + * @throws RepositoryException + */ + public abstract void save(Collection<Resource> resources, String logMessage) + throws SaveException, RepositoryException; - /** - * Deletes the given resources at one time. Recommended if you have multiple - * resources to delete. - * - * @param resources - * Resources to delete. - * @throws DeleteException - * @throws RepositoryException - */ - public abstract void delete(Collection<Resource> resources) - throws DeleteException, RepositoryException; + /** + * Deletes the given resources at one time. Recommended if you have multiple + * resources to delete. + * + * @param resources + * Resources to delete. + * @throws DeleteException + * @throws RepositoryException + */ + public abstract void delete(Collection<Resource> resources) + throws DeleteException, RepositoryException; - /** - * Deletes the given resource. Equivalent to resource.delete(). - * - * @param resource - * Resources to delete. - * @throws DeleteException - * @throws RepositoryException - */ - public void delete(Resource resource) throws DeleteException, - RepositoryException { - List<Resource> toDelete = new ArrayList<Resource>(); - toDelete.add(resource); - delete(toDelete); - } + /** + * Deletes the given resource. Equivalent to resource.delete(). + * + * @param resource + * Resources to delete. + * @throws DeleteException + * @throws RepositoryException + */ + public void delete(Resource resource) throws DeleteException, + RepositoryException { + List<Resource> toDelete = new ArrayList<Resource>(); + toDelete.add(resource); + delete(toDelete); + } - /** - * Saves the given resource. Equivalent to <code>res.save(String)</code>. - * - * @param res - * First resource to save. - * @param logMessage - * Log message to save with. - * @throws SaveException - * @throws RepositoryException - */ - public void save(Resource res, String logMessage) throws SaveException, - RepositoryException { - List<Resource> toSave = new ArrayList<Resource>(); - toSave.add(res); - save(toSave, logMessage); - } + /** + * Saves the given resource. Equivalent to <code>res.save(String)</code>. + * + * @param res + * First resource to save. + * @param logMessage + * Log message to save with. + * @throws SaveException + * @throws RepositoryException + */ + public void save(Resource res, String logMessage) throws SaveException, + RepositoryException { + List<Resource> toSave = new ArrayList<Resource>(); + toSave.add(res); + save(toSave, logMessage); + } - /** - * Saves the given resources at one time. Recommended if you have multiple - * resources to save. - * - * @param logMessage - * Log message to save with. - * @param resources - * Any number of resources - * @throws RepositoryException - * @throws SaveException - */ - public void save(String logMessage, Resource... resources) - throws RepositoryException, SaveException { - List<Resource> toSave = new ArrayList<Resource>(); + /** + * Saves the given resources at one time. Recommended if you have multiple + * resources to save. + * + * @param logMessage + * Log message to save with. + * @param resources + * Any number of resources + * @throws RepositoryException + * @throws SaveException + */ + public void save(String logMessage, Resource... resources) + throws RepositoryException, SaveException { + List<Resource> toSave = new ArrayList<Resource>(); - for (Resource resource : resources) { - toSave.add(resource); - } + for (Resource resource : resources) { + toSave.add(resource); + } - save(toSave, logMessage); - } + save(toSave, logMessage); + } - /** - * Deletes the given resources at one time. Recommended if you have multiple - * resources to delete. - * - * @param resources - * Any number of resources to delete - * @throws DeleteException - * @throws RepositoryException - */ - public void delete(Resource... resources) throws DeleteException, - RepositoryException { - List<Resource> toDelete = new ArrayList<Resource>(); + /** + * Deletes the given resources at one time. Recommended if you have multiple + * resources to delete. + * + * @param resources + * Any number of resources to delete + * @throws DeleteException + * @throws RepositoryException + */ + public void delete(Resource... resources) throws DeleteException, + RepositoryException { + List<Resource> toDelete = new ArrayList<Resource>(); - for (Resource resource : resources) { - toDelete.add(resource); - } + for (Resource resource : resources) { + toDelete.add(resource); + } - delete(toDelete); - } + delete(toDelete); + } - /** - * Saves the given resources at one time. Equivalent to - * <code>save(Collection, String)</code>, where the collection is filled - * with the two given resources. - * - * @param res1 - * First resource to save. - * @param res2 - * Second resource to save. - * @param logMessage - * Log message to save with. - * @throws SaveException - * @throws RepositoryException - */ - public void save(Resource res1, Resource res2, String logMessage) - throws SaveException, RepositoryException { - List<Resource> toSave = new ArrayList<Resource>(); - toSave.add(res1); - toSave.add(res2); - save(toSave, logMessage); - } + /** + * Saves the given resources at one time. Equivalent to + * <code>save(Collection, String)</code>, where the collection is filled + * with the two given resources. + * + * @param res1 + * First resource to save. + * @param res2 + * Second resource to save. + * @param logMessage + * Log message to save with. + * @throws SaveException + * @throws RepositoryException + */ + public void save(Resource res1, Resource res2, String logMessage) + throws SaveException, RepositoryException { + List<Resource> toSave = new ArrayList<Resource>(); + toSave.add(res1); + toSave.add(res2); + save(toSave, logMessage); + } - /** - * Saves the given resources at one time. Equivalent to - * <code>save(Collection, String)</code>, where the collection is filled - * with the three given resources. - * - * @param res1 - * First resource to save. - * @param res2 - * Second resource to save. - * @param res3 - * Third resource to save. - * @param logMessage - * Log message to save with. - * @throws SaveException - * @throws RepositoryException - */ - public void save(Resource res1, Resource res2, Resource res3, - String logMessage) throws SaveException, RepositoryException { - List<Resource> toSave = new ArrayList<Resource>(); - toSave.add(res1); - toSave.add(res2); - toSave.add(res3); - save(toSave, logMessage); - } + /** + * Saves the given resources at one time. Equivalent to + * <code>save(Collection, String)</code>, where the collection is filled + * with the three given resources. + * + * @param res1 + * First resource to save. + * @param res2 + * Second resource to save. + * @param res3 + * Third resource to save. + * @param logMessage + * Log message to save with. + * @throws SaveException + * @throws RepositoryException + */ + public void save(Resource res1, Resource res2, Resource res3, + String logMessage) throws SaveException, RepositoryException { + List<Resource> toSave = new ArrayList<Resource>(); + toSave.add(res1); + toSave.add(res2); + toSave.add(res3); + save(toSave, logMessage); + } - /** - * Saves the given resources at one time. Equivalent to - * <code>save(Collection, String)</code>, where the collection is filled - * with the four given resources. - * - * @param res1 - * First resource to save. - * @param res2 - * Second resource to save. - * @param res3 - * Third resource to save. - * @param res4 - * Fourth resource to save. - * @param logMessage - * Log message to save with. - * @throws SaveException - * @throws RepositoryException - */ - public void save(Resource res1, Resource res2, Resource res3, - Resource res4, String logMessage) throws SaveException, - RepositoryException { - List<Resource> toSave = new ArrayList<Resource>(); - toSave.add(res1); - toSave.add(res2); - toSave.add(res3); - toSave.add(res4); - save(toSave, logMessage); - } + /** + * Saves the given resources at one time. Equivalent to + * <code>save(Collection, String)</code>, where the collection is filled + * with the four given resources. + * + * @param res1 + * First resource to save. + * @param res2 + * Second resource to save. + * @param res3 + * Third resource to save. + * @param res4 + * Fourth resource to save. + * @param logMessage + * Log message to save with. + * @throws SaveException + * @throws RepositoryException + */ + public void save(Resource res1, Resource res2, Resource res3, + Resource res4, String logMessage) throws SaveException, + RepositoryException { + List<Resource> toSave = new ArrayList<Resource>(); + toSave.add(res1); + toSave.add(res2); + toSave.add(res3); + toSave.add(res4); + save(toSave, logMessage); + } - /** - * Saves the given resources at one time. Equivalent to - * <code>save(Collection, String)</code>, where the collection is filled - * with the five given resources. - * - * @param res1 - * First resource to save. - * @param res2 - * Second resource to save. - * @param res3 - * Third resource to save. - * @param res4 - * Fourth resource to save. - * @param res5 - * Fifth resource to save. - * @param logMessage - * Log message to save with. - * @throws SaveException - * @throws RepositoryException - */ - public void save(Resource res1, Resource res2, Resource res3, - Resource res4, Resource res5, String logMessage) - throws SaveException, RepositoryException { - List<Resource> toSave = new ArrayList<Resource>(); - toSave.add(res1); - toSave.add(res2); - toSave.add(res3); - toSave.add(res4); - toSave.add(res5); - save(toSave, logMessage); - } + /** + * Saves the given resources at one time. Equivalent to + * <code>save(Collection, String)</code>, where the collection is filled + * with the five given resources. + * + * @param res1 + * First resource to save. + * @param res2 + * Second resource to save. + * @param res3 + * Third resource to save. + * @param res4 + * Fourth resource to save. + * @param res5 + * Fifth resource to save. + * @param logMessage + * Log message to save with. + * @throws SaveException + * @throws RepositoryException + */ + public void save(Resource res1, Resource res2, Resource res3, + Resource res4, Resource res5, String logMessage) + throws SaveException, RepositoryException { + List<Resource> toSave = new ArrayList<Resource>(); + toSave.add(res1); + toSave.add(res2); + toSave.add(res3); + toSave.add(res4); + toSave.add(res5); + save(toSave, logMessage); + } - /** - * Gets a velocity engine, initialized with default properties, as defined - * in velocity.properties in the shotoku-base jar. Additionaly, the shotoku - * resource loader will be set to read templates from this content manager - * (if shotoku resource loader is defined to be used). - * - * @return A velocity engine initialized with default properties. - * @throws Exception - * In case of a velocity exception/ properties reading - * exception. - */ - public VelocityEngine getVelocityEngine() throws Exception { - return getVelocityEngine(true); - } + /** + * Gets a velocity engine, initialized with default properties, as defined + * in velocity.properties in the shotoku-base jar. Additionaly, the shotoku + * resource loader will be set to read templates from this content manager + * (if shotoku resource loader is defined to be used). + * + * @return A velocity engine initialized with default properties. + * @throws Exception + * In case of a velocity exception/ properties reading + * exception. + */ + public VelocityEngine getVelocityEngine() throws Exception { + return getVelocityEngine(true); + } - /** - * Gets a velocity engine, initialized with default properties, as defined - * in velocity.properties in the shotoku-base jar. - * - * @param addIdPrefix - * True iff id/ prefix properties should be added to the - * properties. - * @return A velocity engine initialized with default properties. - * @throws Exception - * In case of a velocity exception/ properties reading - * exception. - */ - public VelocityEngine getVelocityEngine(boolean addIdPrefix) - throws Exception { - return getVelocityEngine(new HashMap<Object, Object>(), addIdPrefix); - } + /** + * Gets a velocity engine, initialized with default properties, as defined + * in velocity.properties in the shotoku-base jar. + * + * @param addIdPrefix + * True iff id/ prefix properties should be added to the + * properties. + * @return A velocity engine initialized with default properties. + * @throws Exception + * In case of a velocity exception/ properties reading + * exception. + */ + public VelocityEngine getVelocityEngine(boolean addIdPrefix) + throws Exception { + return getVelocityEngine(new HashMap<Object, Object>(), addIdPrefix); + } - /** - * Gets a velocity engine, initialized with default properties, overwritten - * by the given propeties. - * - * @param overProps - * Properties which will be added to velocity configuration. - * @return An initialized velocity engine. - * @throws Exception - * In case of a velocity exception/ properties reading - * exception. - */ - public VelocityEngine getVelocityEngine( - Map<? extends Object, ? extends Object> overProps, - boolean addIdPrefix) throws Exception { - String representation = ""; - for (Object key : overProps.keySet()) { - representation += key + "=" + overProps.get(key) + ","; - } + /** + * Gets a velocity engine, initialized with default properties, overwritten + * by the given propeties. + * + * @param overProps + * Properties which will be added to velocity configuration. + * @return An initialized velocity engine. + * @throws Exception + * In case of a velocity exception/ properties reading + * exception. + */ + public VelocityEngine getVelocityEngine( + Map<? extends Object, ? extends Object> overProps, + boolean addIdPrefix) throws Exception { + String representation = ""; + for (Object key : overProps.keySet()) { + representation += key + "=" + overProps.get(key) + ","; + } - representation += ";" + prefix + ";" + id + ";"; - representation += addIdPrefix; + representation += ";" + prefix + ";" + id + ";"; + representation += addIdPrefix; - VelocityEngine ve = engines.get(representation); - if (ve == null) { - ve = new VelocityEngine(); - Properties props = new Properties(); - props.load(ContentManager.class - .getResourceAsStream(Constants.VELOCITY_PROPERTIES_FILE)); - props.putAll(overProps); + VelocityEngine ve = engines.get(representation); + if (ve == null) { + ve = new VelocityEngine(); + Properties props = new Properties(); + props.load(ContentManager.class + .getResourceAsStream(Constants.VELOCITY_PROPERTIES_FILE)); + props.putAll(overProps); - if (addIdPrefix) { - props.put(Constants.VELOCITY_RL_PREFIX, prefix); - props.put(Constants.VELOCITY_RL_ID, id); - } + if (addIdPrefix) { + props.put(Constants.VELOCITY_RL_PREFIX, prefix); + props.put(Constants.VELOCITY_RL_ID, id); + } - ve.init(props); + ve.init(props); - engines.put(representation, ve); - } + engines.put(representation, ve); + } - return ve; - } + return ve; + } - /** - * Standard constructor. - * - * @param id - * Id of this content manager. - * @param prefix - * Prefix of this content manager, as stated in properties. - * @throws RepositoryException - */ - protected ContentManager(String id, String prefix) - throws RepositoryException { - this.id = id; - this.prefix = Tools.normalizeSlashes(prefix, true); - } + /** + * Standard constructor. + * + * @param id + * Id of this content manager. + * @param prefix + * Prefix of this content manager, as stated in properties. + * @throws RepositoryException + */ + protected ContentManager(String id, String prefix) + throws RepositoryException { + this.id = id; + this.prefix = Tools.normalizeSlashes(prefix, true); + } - /* - * Content manager loading. - */ + /* + * Content manager loading. + */ - private static final Logger log; + private static final Logger log; - /** - * Id of the default content manager. May be overriden by a setting in the - * xml configuration file. - */ - private static String defaultId; + /** + * Id of the default content manager. May be overriden by a setting in the + * xml configuration file. + */ + private static String defaultId; - /** - * Size of the transfer buffer. - */ - private static int transferBufferSize; + /** + * Size of the transfer buffer. + */ + private static int transferBufferSize; - /** - * Default interval of the Shotoku service. - */ - private static int defaultServiceInterval; + /** + * Default interval of the Shotoku service. + */ + private static int defaultServiceInterval; - /** - * <code>contentManagers</code> - map (content manager id -> content - * manager constructor). - */ - private static Map<String, Pair<Constructor, Configuration>> contentManagers; + /** + * <code>contentManagers</code> - map (content manager id -> content + * manager constructor). + */ + private static Map<String, Pair<Constructor, Configuration>> contentManagers; - /** - * <code>props</code> - Shotoku properties, as read from the configuration - * file. - */ - private static PropertiesConfiguration props; + /** + * A set of content manager implementation classes names, which are + * already initialized. + */ + private static Set<String> initializedContentManagers; - /** - * <code>setupDone</code> - a marker to execute setup only once, even if - * the user does it many times by mistake. - */ - private static boolean setupDone; + /** + * A set of content manager ids, which are already initialized. + */ + private static Set<String> initializedIds; - static { - // Setup was not yet executed for sure. - setupDone = false; + /** + * A map content manager implementation class name -> a set of + * ids which use the given implementation. + */ + private static Map<String, Set<String>> implementationsIds; - // When this class is loaded, always reading configuration first. - try { - props = new PropertiesConfiguration(); + /** + * <code>props</code> - Shotoku properties, as read from the configuration + * file. + */ + private static PropertiesConfiguration props; - props.load(ContentManager.class - .getResourceAsStream(Constants.PROPERTIES_FILE)); - } catch (Exception e) { - throw new RuntimeException( - "Error while loading content manager configuration: ", e); - } + /** + * <code>setupDone</code> - a marker to execute setup only once, even if + * the user does it many times by mistake. + */ + private static boolean setupDone; - // Setuping the logger. - if (isEmbedded()) { - BasicConfigurator.configure(); - } + static { + // Setup was not yet executed for sure. + setupDone = false; - log = Logger.getLogger(ContentManager.class); - } + // When this class is loaded, always reading configuration first. + try { + props = new PropertiesConfiguration(); - /** - * Checks if Shotoku is configured to run in embedded mode or not. - * - * @return True iff Shotoku is configured to run in embedded mode. - */ - public static boolean isEmbedded() { - return Tools.isTrue(getProperty(Constants.PROPERTIES_EMBEDDED)); - } + props.load(ContentManager.class + .getResourceAsStream(Constants.PROPERTIES_FILE)); + } catch (Exception e) { + throw new RuntimeException( + "Error while loading content manager configuration: ", e); + } - /** - * Setups the content managers before first used. In embedded mode, should - * be always called once, before any usage of Shotoku classes. In app server - * mode, should be never called by the user. - */ - public static void setup() { - synchronized (ContentManager.class) { - if (setupDone) - return; + // Setuping the logger. + if (isEmbedded()) { + BasicConfigurator.configure(); + } - // Preventing setup to be executed twice. - setupDone = true; - } + log = Logger.getLogger(ContentManager.class); + } - engines = Collections - .synchronizedMap(new HashMap<String, VelocityEngine>()); + /** + * Checks if Shotoku is configured to run in embedded mode or not. + * + * @return True iff Shotoku is configured to run in embedded mode. + */ + public static boolean isEmbedded() { + return Tools.isTrue(getProperty(Constants.PROPERTIES_EMBEDDED)); + } - contentManagers = new HashMap<String, Pair<Constructor, Configuration>>(); + /** + * Setups the content managers before first used. In embedded mode, should + * be always called once, before any usage of Shotoku classes. In app server + * mode, should be never called by the user. + */ + public static void setup() { + synchronized (ContentManager.class) { + if (setupDone) + return; - // Reading the default properties. - defaultId = props.getString(Constants.PROPERTIES_ID_DEFAULT, - Constants.DEFAULT_ID); - transferBufferSize = props.getInt( - Constants.PROPERTIES_TRANSFER_BUF_SIZE, - Constants.DEFAULT_TRANSFER_BUF_SIZE); - defaultServiceInterval = props.getInt( - Constants.PROPERTIES_SERVICE_INTERVAL, - Constants.DEFAULT_SERVICE_INTERVAL); + // Preventing setup to be executed twice. + setupDone = true; + } - // Getting ids of defined content managers. - String[] ids = props.getStringArray(Constants.PROPERTIES_IDS); + engines = Collections + .synchronizedMap(new HashMap<String, VelocityEngine>()); - for (String id : ids) { - try { - Configuration conf = props.subset(Tools.concatenateProperties( - Constants.PROPERTIES_PREFIX, id)); + contentManagers = new HashMap<String, Pair<Constructor, Configuration>>(); + initializedContentManagers = new HashSet<String>(); + initializedIds = new HashSet<String>(); + implementationsIds = new HashMap<String, Set<String>>(); - String implementation = conf - .getString(Constants.PROPERTIES_IMPL_SUFFIX); - Class implClass = Class.forName(implementation); + // Reading the default properties. + defaultId = props.getString(Constants.PROPERTIES_ID_DEFAULT, + Constants.DEFAULT_ID); + transferBufferSize = props.getInt( + Constants.PROPERTIES_TRANSFER_BUF_SIZE, + Constants.DEFAULT_TRANSFER_BUF_SIZE); + defaultServiceInterval = props.getInt( + Constants.PROPERTIES_SERVICE_INTERVAL, + Constants.DEFAULT_SERVICE_INTERVAL); - contentManagers.put(id, new Pair<Constructor, Configuration>( - implClass.getConstructor(String.class, String.class, - Configuration.class), conf)); + // Getting ids of defined content managers. + String[] ids = props.getStringArray(Constants.PROPERTIES_IDS); - // Executing the setup function. - try { - Method setupMethod = implClass.getMethod( - Constants.SETUP_FUNCTION, String.class, - Configuration.class); + for (String id : ids) { + try { + Configuration conf = props.subset(Tools.concatenateProperties( + Constants.PROPERTIES_PREFIX, id)); - setupMethod.invoke(implClass, id, conf); - } catch (NoSuchMethodException e) { - // No setup - doing nothing. - } + String implementation = conf + .getString(Constants.PROPERTIES_IMPL_SUFFIX); + Class implClass = Class.forName(implementation); - log - .info("Added content manager: " + id + ", " - + implementation); - } catch (Exception e) { - e.printStackTrace(); - log.warn("Error setting up content manager " + id + ".", e); - } - } + contentManagers.put(id, new Pair<Constructor, Configuration>( + implClass.getConstructor(String.class, String.class, + Configuration.class), conf)); - } + Set<String> implIds = implementationsIds.get(id); + if (implIds == null) { + implIds = new HashSet<String>(); + implementationsIds.put(id, implIds); + } - /** - * Gets a content manager with a default id and an empty prefix. - * - * @return A ""-prefixed, default content manager, or null, if a default - * content manager is not registered. - */ - public static ContentManager getContentManager() { - return getContentManager(""); - } + implIds.add(id); - /** - * Gets a content manager with a default id and the given prefix. - * - * @param prefix - * Prefix for the new content manager (all paths will have this - * prepended). - * @return A prefixed, default content manager, or null, if a default - * content manager is not registered. - */ - public static ContentManager getContentManager(String prefix) { - return getContentManager(defaultId, prefix); - } + log.info("Added content manager: " + id + ", " + + implementation); + } catch (Exception e) { + e.printStackTrace(); + log.warn("Error setting up content manager " + id + ".", e); + } + } - /** - * Gets a content manager with the given id and prefix. - * - * @param id - * Id of the content manager. - * @param prefix - * Prefix for the new content manager (all paths will have this - * prepended). - * @return A prefixed content manager with the given id or null, if a - * content manager with the given id registers. - */ - public static ContentManager getContentManager(String id, String prefix) { - if (isEmbedded()) { - // Calling setup - in case this is the first use. - setup(); - } + } - if (id == null) - id = defaultId; - if (prefix == null) - prefix = ""; - else - prefix = Tools.normalizeSlashes(prefix, true); + private synchronized static void initializeId(String id) { + if (!initializedIds.contains(id)) { + try { + Pair<Constructor, Configuration> cc = contentManagers.get(id); + Class implClass = cc.getFirst().getDeclaringClass(); - Pair<Constructor, Configuration> cmData = contentManagers.get(id); + // First initializing the whole implementation, if it hasn't + // been done yet. + initializeContentManager(implClass.getName()); - if (cmData == null) - return null; + // Executing the setup function. + try { + Method setupMethod = implClass.getMethod( + Constants.SETUP_FUNCTION, String.class, + Configuration.class); - try { - return (ContentManager) cmData.getFirst().newInstance(id, prefix, - cmData.getSecond()); - } catch (Throwable e) { - log.warn("Unable to get a content manager: (" + id + ", " + prefix - + ").", e); - return null; - } - } + setupMethod.invoke(implClass, id, cc.getSecond()); + } catch (NoSuchMethodException e) { + // No setup - doing nothing. + } - /* - * Properties accessors. - */ + log.info("Initialized content manager: " + id + ", " + + implClass.getName()); - /** - * Gets a property of this content manager, as it is written in the - * configuration file (helper method). - * - * @param name - * Name of the property to get. - * @return Value of the given property or null, if no such property exists. - */ - private static String getProperty(String name) { - return props.getString(name); - } + initializedIds.add(id); + } catch (Exception e) { + log.warn("Error initializing content manager: " + id + ".", e); + } + } + } - /** - * Gets a property of this content manager, as it is written in the - * configuration file (helper method for implementations). Only internal - * properties! (long parameter value). - * - * @param name - * Name of the property to get. - * @param defaultValue - * Value to return in case the given property is not set. - * @return Value of the given property or null, if no such property exists. - */ - public static long getProperty(String name, long defaultValue) { - if (name.startsWith(Constants.PROPERTIES_INTERNAL)) { - return props.getLong(name, defaultValue); - } else { - return defaultValue; - } - } + public synchronized static void initializeContentManager(String implementation) { + if (!initializedContentManagers.contains(implementation)) { + try { + Class implClass = Class.forName(implementation); - /** - * Gets a property of this content manager, as it is written in the - * configuration file (helper method for implementations). Only internal - * properties! (long parameter value). - * - * @param name - * Name of the property to get. - * @param defaultValue - * Value to return in case the given property is not set. - * @return Value of the given property or null, if no such property exists. - */ - public static int getProperty(String name, int defaultValue) { - if (name.startsWith(Constants.PROPERTIES_INTERNAL)) { - return props.getInt(name, defaultValue); - } else { - return defaultValue; - } - } + // Executing the setup function. + try { + Method setupMethod = implClass.getMethod(Constants.SETUP_FUNCTION); - /** - * Gets a property of this content manager, as it is written in the - * configuration file (helper method for implementations). Only internal - * properties! - * - * @param name - * Name of the property to get. - * @param defaultValue - * Value to return in case the given property is not set. - * @return Value of the given property or null, if no such property exists. - */ - public static String getProperty(String name, String defaultValue) { - if (name.startsWith(Constants.PROPERTIES_INTERNAL)) { - String ret = props.getString(name); - return ((ret == null) ? defaultValue : ret); - } else { - return defaultValue; - } - } + setupMethod.invoke(implClass); + } catch (NoSuchMethodException e) { + // No setup - doing nothing. + } - /** - * Gets the transfer buffer size. - * - * @return Transfer buffer size. - */ - public static int getTransferBufferSize() { - return transferBufferSize; - } + log.info("Initialized content manager implementation: " + implementation); - /** - * Gets the default Shotoku service interval. - * - * @return Default Shotoku service interval. - */ - public static int getDefaultServiceInterval() { - return defaultServiceInterval; - } + initializedContentManagers.add(implementation); + + // Initializing all ids. + Set<String> implIds = implementationsIds.get(implementation); + if (implIds != null) { + for (String id : implIds) { + initializeId(id); + } + } + } catch (Exception e) { + log.warn("Error initializing content manager implementation: " + + implementation + ".", e); + } + } + } + + + /** + * Gets a content manager with a default id and an empty prefix. + * + * @return A ""-prefixed, default content manager, or null, if a default + * content manager is not registered. + */ + public static ContentManager getContentManager() { + return getContentManager(""); + } + + /** + * Gets a content manager with a default id and the given prefix. + * + * @param prefix + * Prefix for the new content manager (all paths will have this + * prepended). + * @return A prefixed, default content manager, or null, if a default + * content manager is not registered. + */ + public static ContentManager getContentManager(String prefix) { + return getContentManager(defaultId, prefix); + } + + /** + * Gets a content manager with the given id and prefix. + * + * @param id + * Id of the content manager. + * @param prefix + * Prefix for the new content manager (all paths will have this + * prepended). + * @return A prefixed content manager with the given id or null, if a + * content manager with the given id registers. + */ + public static ContentManager getContentManager(String id, String prefix) { + if (isEmbedded()) { + // Calling setup - in case this is the first use. + setup(); + } + + if (id == null) + id = defaultId; + if (prefix == null) + prefix = ""; + else + prefix = Tools.normalizeSlashes(prefix, true); + + Pair<Constructor, Configuration> cmData = contentManagers.get(id); + + if (cmData == null) + return null; + + initializeId(id); + + try { + return (ContentManager) cmData.getFirst().newInstance(id, prefix, + cmData.getSecond()); + } catch (Throwable e) { + log.warn("Unable to get a content manager: (" + id + ", " + prefix + + ").", e); + return null; + } + } + + /* + * Properties accessors. + */ + + /** + * Gets a property of this content manager, as it is written in the + * configuration file (helper method). + * + * @param name + * Name of the property to get. + * @return Value of the given property or null, if no such property exists. + */ + private static String getProperty(String name) { + return props.getString(name); + } + + /** + * Gets a property of this content manager, as it is written in the + * configuration file (helper method for implementations). Only internal + * properties! (long parameter value). + * + * @param name + * Name of the property to get. + * @param defaultValue + * Value to return in case the given property is not set. + * @return Value of the given property or null, if no such property exists. + */ + public static long getProperty(String name, long defaultValue) { + if (name.startsWith(Constants.PROPERTIES_INTERNAL)) { + return props.getLong(name, defaultValue); + } else { + return defaultValue; + } + } + + /** + * Gets a property of this content manager, as it is written in the + * configuration file (helper method for implementations). Only internal + * properties! (long parameter value). + * + * @param name + * Name of the property to get. + * @param defaultValue + * Value to return in case the given property is not set. + * @return Value of the given property or null, if no such property exists. + */ + public static int getProperty(String name, int defaultValue) { + if (name.startsWith(Constants.PROPERTIES_INTERNAL)) { + return props.getInt(name, defaultValue); + } else { + return defaultValue; + } + } + + /** + * Gets a property of this content manager, as it is written in the + * configuration file (helper method for implementations). Only internal + * properties! + * + * @param name + * Name of the property to get. + * @param defaultValue + * Value to return in case the given property is not set. + * @return Value of the given property or null, if no such property exists. + */ + public static String getProperty(String name, String defaultValue) { + if (name.startsWith(Constants.PROPERTIES_INTERNAL)) { + String ret = props.getString(name); + return ((ret == null) ? defaultValue : ret); + } else { + return defaultValue; + } + } + + /** + * Gets the transfer buffer size. + * + * @return Transfer buffer size. + */ + public static int getTransferBufferSize() { + return transferBufferSize; + } + + /** + * Gets the default Shotoku service interval. + * + * @return Default Shotoku service interval. + */ + public static int getDefaultServiceInterval() { + return defaultServiceInterval; + } } Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -1,10 +1,13 @@ package org.jboss.shotoku.service; +import java.util.Date; + /** * @author Adam Warski (ad...@as...) */ public interface AdministratedService { public long getLastUpdate(); + public Date getLastUpdateDate(); public void setLastUpdate(long lastUpdate); public boolean getServiceRunnable(); Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -4,5 +4,5 @@ * @author Adam Warski (ad...@as...) */ public interface AdministratedServiceGetter { - public AdministratedService get(); + public AdministratedService getService(); } Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -2,6 +2,8 @@ import org.apache.log4j.Logger; +import java.util.Date; + /** * @author Adam Warski (ad...@as...) */ @@ -16,6 +18,10 @@ return lastUpdate; } + public Date getLastUpdateDate() { + return new Date(getLastUpdate()); + } + public void setLastUpdate(long lastUpdate) { this.lastUpdate = lastUpdate; } Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -23,7 +23,6 @@ import javax.ejb.Local; -import org.jboss.annotation.ejb.Depends; import org.jboss.annotation.ejb.Management; import org.jboss.annotation.ejb.Service; import org.jboss.shotoku.ContentManager; @@ -46,34 +45,35 @@ @Service(objectName=Constants.SHOTOKU_SERVICE_NAME) @Local(ShotokuServiceLocal.class) @Management(ShotokuService.class) -@Depends(Constants.SVN_SERVICE_NAME) -public class ShotokuServiceImpl extends AdministratedServiceImpl implements ShotokuService, ShotokuServiceLocal { +public class ShotokuServiceImpl extends AdministratedServiceImpl + implements ShotokuService, ShotokuServiceLocal { Logger log = Logger.getLogger(ShotokuServiceImpl.class); /* - * Service-handling functions. - */ + * Service-handling functions. + */ public void create() throws Exception { super.create(); // Enabling administration for this service. - Tools.getService().addAdministratedService(new AdministratedServiceGetter() { - public AdministratedService get() { + addAdministratedService(new AdministratedServiceGetter() { + public AdministratedService getService() { return Tools.getService(); } }); + /* + * Setting up content managers. + */ + ContentManager.setup(); + log.info("Shotoku service created."); } public void start() throws Exception { super.start(); - /* - * Setting up content managers. - */ - ContentManager.setup(); log.info("ContentManager setup completed. Getting the default service timer interval..."); // Setting the default timer interval. Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Constants.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Constants.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Constants.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -44,12 +44,6 @@ public static final String SETUP_FUNCTION = "setup"; - /** - * <code>SVN_SERVICE_NAME</code> - name under which the svn service is - * registered (if svn implementation is used). - */ - public final static String SVN_SERVICE_NAME = "shotoku:service=svn"; - /* * Default values */ Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnContentManager.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnContentManager.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnContentManager.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -65,7 +65,7 @@ service.registerRepository(id, conf); } - static { + public static void setup() { service = SvnTools.getService(); service.setTimerInterval(ContentManager.getProperty( SvnTools.PROPERTY_INTERVAL, SvnTools.DEFAULT_TIMER_INTERVAL)); Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnTools.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnTools.java 2006-04-19 21:14:44 UTC (rev 3812) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnTools.java 2006-04-19 21:20:01 UTC (rev 3813) @@ -67,6 +67,12 @@ public static final String INTERNAL_PROP_CREATED = INTERNAL_PROP_PREFIX + "created"; /** + * <code>SVN_SERVICE_NAME</code> - name under which the svn service is + * registered. + */ + public final static String SVN_SERVICE_NAME = "shotoku:service=svn"; + + /** * Default interval length of the * timer. */ @@ -92,7 +98,7 @@ // Application server mode - creating a proxy to a mbean. instance = (SvnService) MBeanProxyExt.create( SvnService.class, - Constants.SVN_SERVICE_NAME, + SVN_SERVICE_NAME, MBeanServerLocator.locate()); } } Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnR... [truncated message content] |