r54 - in trunk: . vradi-services/src/main/java/org/chorem/vradi vradi-services/src/main/java/org/chorem/vradi/services vradi-services/src/main/resources vradi-services/src/main/resources/i18n vradi-services/src/test/java/org/chorem/vradi vradi-services-web vradi-services-web/src/main/java/org/chorem/vradi vradi-services-web/src/main/java/org/chorem/vradi/services vradi-services-web/src/main/webapp/WEB-INF vradi-services-web/src/test/java/org/chorem/vradi/services vradi-swing vradi-swing/src/
Author: sletellier Date: 2011-05-26 15:39:50 +0200 (Thu, 26 May 2011) New Revision: 54 Url: http://chorem.org/repositories/revision/vradi/54 Log: #397 Up to cajo Added: trunk/vradi-services-web/src/main/java/org/chorem/vradi/ApplicationListener.java trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceContext.java trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java Removed: trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/util/ trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceFactory.java Modified: trunk/pom.xml trunk/vradi-services-web/pom.xml trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/ClearServiceImpl.java trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceAction.java trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfigurationHelper.java trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceMigration.java trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageService.java trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java trunk/vradi-services/src/main/resources/i18n/vradi-services_fr_FR.properties trunk/vradi-services/src/main/resources/vradi-services.properties trunk/vradi-services/src/test/java/org/chorem/vradi/VradiTestAbstract.java trunk/vradi-swing/pom.xml trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfigHelper.java trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/VradiMainUIHandler.java trunk/vradi-swing/src/main/resources/vradi.properties trunk/vradi-web/pom.xml trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java trunk/vradi-web/src/main/resources/vradi-web.properties Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/pom.xml 2011-05-26 13:39:50 UTC (rev 54) @@ -277,12 +277,6 @@ </dependency> <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-hessian-client</artifactId> - <version>${wikittyVersion}</version> - </dependency> - - <dependency> <groupId>org.apache.tika</groupId> <artifactId>tika-core</artifactId> <version>0.8</version> @@ -354,13 +348,6 @@ </dependency> <dependency> - <groupId>com.caucho</groupId> - <artifactId>hessian</artifactId> - <version>4.0.6</version> - <scope>compile</scope> - </dependency> - - <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceAction.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceAction.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceAction.java 2011-05-26 13:39:50 UTC (rev 54) @@ -31,7 +31,7 @@ import org.chorem.vradi.entities.Status; import org.chorem.vradi.entities.Thesaurus; import org.chorem.vradi.entities.User; -import org.chorem.vradi.services.ServiceFactory; +import org.chorem.vradi.services.VradiServiceContext; import org.chorem.vradi.services.VradiException; import org.chorem.vradi.services.VradiStorageService; import org.nuiton.util.ApplicationConfig; @@ -85,7 +85,7 @@ long startingTime = System.nanoTime(); - ServiceFactory.getWikittyProxy().syncSearchEngine(); + VradiServiceContext.getWikittyProxy().syncSearchEngine(); if (log.isInfoEnabled()) { log.info("ReIndex solr is finished in " + StringUtil.convertTime(startingTime, System.nanoTime())); @@ -101,7 +101,7 @@ Criteria criteria = Search.query().eq(Element.ELT_EXTENSION, Thesaurus.EXT_THESAURUS).criteria(); - WikittyProxy proxy = ServiceFactory.getWikittyProxy(); + WikittyProxy proxy = VradiServiceContext.getWikittyProxy(); List<Thesaurus> thesauruses = proxy.findAllByCriteria(Thesaurus.class, criteria).getAll(); for (Thesaurus thesaurus : thesauruses) { @@ -131,7 +131,7 @@ Criteria criteria = Search.query().eq(Element.ELT_EXTENSION, Status.EXT_STATUS).criteria(); - WikittyProxy proxy = ServiceFactory.getWikittyProxy(); + WikittyProxy proxy = VradiServiceContext.getWikittyProxy(); List<Status> statuses = proxy.findAllByCriteria(Status.class, criteria).getAll(); List<String> statusesIds = new ArrayList<String>(); @@ -143,7 +143,7 @@ proxy.delete(statusesIds); try { - ServiceFactory.getVradiStorageService().createDefaultStatuses(); + VradiServiceContext.getVradiStorageService().createDefaultStatuses(); } catch (VradiException eee) { log.error(eee); } @@ -160,7 +160,7 @@ Criteria criteria = Search.query().eq(Element.ELT_EXTENSION, User.EXT_USER).criteria(); - WikittyProxy proxy = ServiceFactory.getWikittyProxy(); + WikittyProxy proxy = VradiServiceContext.getWikittyProxy(); List<User> users = proxy.findAllByCriteria(User.class, criteria).getAll(); for (User user : users) { @@ -190,7 +190,7 @@ Criteria criteria = Search.query().eq(Element.ELT_EXTENSION, User.EXT_USER).criteria(); - WikittyProxy proxy = ServiceFactory.getWikittyProxy(); + WikittyProxy proxy = VradiServiceContext.getWikittyProxy(); List<User> users = proxy.findAllByCriteria(User.class, criteria).getAll(); for (User user : users) { @@ -242,7 +242,7 @@ String uri = f.toURI().toString(); try { log.info("Start import file " + uri); - ServiceFactory.getVradiStorageService().importAsCSV(uri); + VradiServiceContext.getVradiStorageService().importAsCSV(uri); } catch (VradiException eee) { log.error("failled to import file : " + uri, eee); } @@ -265,7 +265,7 @@ } // export - VradiStorageService vradiStorageService = ServiceFactory.getVradiStorageService(); + VradiStorageService vradiStorageService = VradiServiceContext.getVradiStorageService(); String vscContent = null; try { vscContent = vradiStorageService.exportClientDB(); @@ -305,7 +305,7 @@ Criteria criteria = search.criteria(); // export - VradiStorageService vradiStorageService = ServiceFactory.getVradiStorageService(); + VradiStorageService vradiStorageService = VradiServiceContext.getVradiStorageService(); String vscContent = null; try { vscContent = vradiStorageService.exportAsCSV(criteria); Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java 2011-05-26 13:39:50 UTC (rev 54) @@ -169,6 +169,22 @@ _("vradi.service.config.version.description"), null, String.class, false, false), + // achitecture client serveur + REMOTE_ENDPOINT( + "vradi.remote.endpoint", + _("vradi.config.remote.endpoint.description"), + "", String.class, false, false), + + SERVLET_PORT( + "vradi.remote.servlet.port", + _("vradi.config.remote.servlet.port.description"), + "0", Integer.class, false, false), + + SERVICE_PORT( + "vradi.remote.service.port", + _("vradi.config.remote.service.port.description"), + "0", Integer.class, false, false), + DATA_DIR( "vradi.data.dir", _("vradi.service.config.data.dir.description"), Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfigurationHelper.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfigurationHelper.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfigurationHelper.java 2011-05-26 13:39:50 UTC (rev 54) @@ -239,4 +239,50 @@ public static String getWikittyEventTransporterXMPPRoom(ApplicationConfig config) { return config.getOption(WikittyConfigOption.WIKITTY_EVENT_TRANSPORTER_XMPP_ROOM.key); } + + /** + * Get remote endpoint base url. + * <p/> + * If not valid url, embedded mode is used. + * + * @param config vradi swing configuration + * @return remote endpoint base url + */ + public static String getRemoteEndpoint(ApplicationConfig config) { + String endpoint = config.getOption(VradiServiceOption.REMOTE_ENDPOINT.key); + return endpoint; + } + + + /** + * Change remote endpoint url. + * + * @param config vradi swing configuration + * @param newEndpoint new base url + */ + public static void setRemoteEndPoint(ApplicationConfig config, String newEndpoint) { + config.setOption(VradiServiceOption.REMOTE_ENDPOINT.key, newEndpoint); + } + + /** + * Get remote servlet port. + * + * @param config vradi swing configuration + * @return remote servlet port + */ + public static int getServletPort(ApplicationConfig config) { + int servletPort = config.getOptionAsInt(VradiServiceOption.SERVLET_PORT.key); + return servletPort; + } + + /** + * Get remote service port. + * + * @param config vradi swing configuration + * @return remote service port + */ + public static int getServicePort(ApplicationConfig config) { + int endpoint = config.getOptionAsInt(VradiServiceOption.SERVICE_PORT.key); + return endpoint; + } } Deleted: trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceFactory.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceFactory.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceFactory.java 2011-05-26 13:39:50 UTC (rev 54) @@ -1,244 +0,0 @@ -/* - * #%L - * Vradi :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2009 - 2010 Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.vradi.services; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.vradi.VradiServiceConfiguration; -import org.chorem.vradi.VradiServiceConfigurationHelper; -import org.chorem.vradi.entities.ClientImpl; -import org.chorem.vradi.entities.FormImpl; -import org.chorem.vradi.entities.GroupFormsImpl; -import org.chorem.vradi.entities.GroupImpl; -import org.chorem.vradi.entities.InfogeneImpl; -import org.chorem.vradi.entities.ModificationTagImpl; -import org.chorem.vradi.entities.QueryMakerImpl; -import org.chorem.vradi.entities.RootThesaurusImpl; -import org.chorem.vradi.entities.SendingImpl; -import org.chorem.vradi.entities.SessionImpl; -import org.chorem.vradi.entities.StatusImpl; -import org.chorem.vradi.entities.ThesaurusImpl; -import org.chorem.vradi.entities.UserImpl; -import org.chorem.vradi.entities.VradiUserImpl; -import org.chorem.vradi.entities.WebHarvestStreamImpl; -import org.chorem.vradi.entities.XmlFieldBindingImpl; -import org.chorem.vradi.entities.XmlStreamImpl; -import org.nuiton.i18n.I18n; -import org.nuiton.util.ApplicationConfig; -import org.nuiton.util.converter.ConverterUtil; -import org.nuiton.wikitty.WikittyProxy; -import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyServiceFactory; -import org.nuiton.wikitty.entities.WikittyExtension; -import org.nuiton.wikitty.entities.WikittyTreeNodeImpl; -import org.nuiton.wikitty.entities.WikittyUserImpl; - -import java.util.Arrays; -import java.util.List; - -/** - * ServiceFactory. - * - * @author $Author$ - * @version $Revision$ $Date$ - * @since 24 févr. 2010 22:18:17 - */ -public class ServiceFactory { - - /** Log. */ - private static final Log log = LogFactory.getLog(ServiceFactory.class); - - /** Wikitty service (cached version) for remote access. */ - protected static WikittyService vradiWikittyService; - - /** Single instance of storage service. */ - protected static VradiStorageService vradiStorageService; - - /** Single instance of wikitty proxy. */ - protected static WikittyProxy wikittyProxy; - - protected static ApplicationConfig config; - - - static { - // Dans un block static pour definition des variables - // d'environnement solr et jbossts - // A voir pourquoi, les converters s'initialise mal durant les tests - try { - - ConverterUtil.initConverters(); - config = VradiServiceConfiguration.getConfig(); - I18n.setDefaultLocale(VradiServiceConfigurationHelper.getLocale(config)); - } catch (Exception eee) { - log.error("Cant initialize Service factory : ", eee); - } - } - - public static synchronized VradiStorageService getVradiStorageService() { - if (vradiStorageService == null) { - vradiStorageService = new VradiStorageServiceImpl(); - } - return vradiStorageService; - } - - /** - * Creates wikitty service (cached). - * <p/> - * Getter for service, with default service configuration. - * - * @return a unique instance of WikittyService - */ - public static synchronized WikittyService getWikittyService() { - if (vradiWikittyService == null) { - getWikittyService(config); - } - - return vradiWikittyService; - } - - /** - * Creates wikitty service (cached). - * <p/> - * Constructor added for UI embedded mode, with custom configuration. - * - * @param config configuration of vradi service - * @return a unique instance of WikittyService - */ - public static synchronized WikittyService getWikittyService(ApplicationConfig config) { - if (vradiWikittyService == null) { - - vradiWikittyService = WikittyServiceFactory.buildWikittyService(config); - } - - return vradiWikittyService; - } - - /** - * Creates wikitty proxy. - * - * @return a unique instance of WikittyProxy. - */ - public static synchronized WikittyProxy getWikittyProxy() { - if (wikittyProxy == null) { - WikittyService wikittyService = getWikittyService(); - - // init proxy on cached service - wikittyProxy = new WikittyProxy(wikittyService); - - // post operation : register extensions - updateExtensions(wikittyProxy); - - // post operation : reindex data if necessary - reindexData(wikittyProxy); - } - - return wikittyProxy; - } - - /** - * Register all extensions. - * <p/> - * Already existing extensions with same version are skipped, - * new extension are created and stored. - * - * @param localWikittyProxy wikitty proxy - */ - static void updateExtensions(WikittyProxy localWikittyProxy) { - - // easier if ordered - // TODO EC20100616 don't work with required extensions :( - List<WikittyExtension> extensions = Arrays.asList( - ClientImpl.extensionClient, - FormImpl.extensionForm, - GroupImpl.extensionGroup, - InfogeneImpl.extensionInfogene, - ModificationTagImpl.extensionModificationTag, - QueryMakerImpl.extensionQueryMaker, - RootThesaurusImpl.extensionRootThesaurus, - SendingImpl.extensionSending, - SessionImpl.extensionSession, - StatusImpl.extensionStatus, - ThesaurusImpl.extensionThesaurus, - WikittyTreeNodeImpl.extensionWikittyTreeNode, - UserImpl.extensionUser, - VradiUserImpl.extensionVradiUser, - WebHarvestStreamImpl.extensionWebHarvestStream, - WikittyUserImpl.extensionWikittyUser, - XmlFieldBindingImpl.extensionXmlFieldBinding, - XmlStreamImpl.extensionXmlStream, - GroupFormsImpl.extensionGroupForms); - - localWikittyProxy.storeExtension(extensions); - } - - /** - * Check if version has changed and launch wikitty service reindex. - * - * @param localWikittyProxy local proxy - */ - protected static void reindexData(WikittyProxy localWikittyProxy) { - try { - - String currentVersion = VradiServiceConfigurationHelper.getApplicationVersion(config); - String lastVersion = VradiServiceConfigurationHelper.getServiceVersion(config); - - // different is enougth to reindex - // currentVersion is never null, lastVersion could be - if (!currentVersion.equals(lastVersion)) { - - // do version change migration - ServiceMigration.versionChangeMigration(lastVersion, currentVersion, localWikittyProxy); - - // Dont reindex data on version change -// if (log.isInfoEnabled()) { -// log.info(_("Version change detected : %s. Reindexing data...", lastVersion)); -// } -// long timeBefore = System.currentTimeMillis(); -// -// // call syncEngin -// localWikittyProxy.syncEngin(); -// -// long timeAfter = System.currentTimeMillis(); -// -// if (log.isInfoEnabled()) { -// log.info("Reindexing completed in " + (timeAfter - timeBefore) + " ms"); -// } - - // save new version - VradiServiceConfigurationHelper.setServiceVersion(config, currentVersion); - config.saveForUser(); - } else { - if (log.isInfoEnabled()) { - log.info("No version change, skipping reindexing."); - } - } - - // post operation : register migration classes - ServiceMigration.configureMigration(); - - } catch (Exception eee) { - log.error("Failled to reindex data : ", eee); - } - } -} Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceMigration.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceMigration.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceMigration.java 2011-05-26 13:39:50 UTC (rev 54) @@ -26,14 +26,31 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.vradi.VradiServiceConfigurationHelper; +import org.chorem.vradi.entities.ClientImpl; +import org.chorem.vradi.entities.FormImpl; import org.chorem.vradi.entities.GroupForms; import org.chorem.vradi.entities.GroupFormsImpl; +import org.chorem.vradi.entities.GroupImpl; +import org.chorem.vradi.entities.InfogeneImpl; +import org.chorem.vradi.entities.ModificationTagImpl; +import org.chorem.vradi.entities.QueryMakerImpl; import org.chorem.vradi.entities.RootThesaurusImpl; import org.chorem.vradi.entities.Sending; +import org.chorem.vradi.entities.SendingImpl; +import org.chorem.vradi.entities.SessionImpl; import org.chorem.vradi.entities.Status; +import org.chorem.vradi.entities.StatusImpl; import org.chorem.vradi.entities.Thesaurus; +import org.chorem.vradi.entities.ThesaurusImpl; import org.chorem.vradi.entities.User; +import org.chorem.vradi.entities.UserImpl; import org.chorem.vradi.entities.VradiUser; +import org.chorem.vradi.entities.VradiUserImpl; +import org.chorem.vradi.entities.WebHarvestStreamImpl; +import org.chorem.vradi.entities.XmlFieldBindingImpl; +import org.chorem.vradi.entities.XmlStreamImpl; +import org.nuiton.util.ApplicationConfig; import org.nuiton.util.Version; import org.nuiton.util.VersionUtil; import org.nuiton.wikitty.WikittyProxy; @@ -43,6 +60,7 @@ import org.nuiton.wikitty.entities.WikittyImpl; import org.nuiton.wikitty.entities.WikittyTreeNode; import org.nuiton.wikitty.entities.WikittyTreeNodeImpl; +import org.nuiton.wikitty.entities.WikittyUserImpl; import org.nuiton.wikitty.search.Criteria; import org.nuiton.wikitty.search.Search; import org.nuiton.wikitty.search.operators.Element; @@ -50,6 +68,7 @@ import org.nuiton.wikitty.services.WikittyExtensionMigrationRename; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Set; @@ -485,4 +504,91 @@ (currentVersion.equals(migrationVersion) || currentVersion.after(migrationVersion)); } + + /** + * Register all extensions. + * <p/> + * Already existing extensions with same version are skipped, + * new extension are created and stored. + * + * @param localWikittyProxy wikitty proxy + */ + static void updateExtensions(WikittyProxy localWikittyProxy) { + + // easier if ordered + // TODO EC20100616 don't work with required extensions :( + List<WikittyExtension> extensions = Arrays.asList( + ClientImpl.extensionClient, + FormImpl.extensionForm, + GroupImpl.extensionGroup, + InfogeneImpl.extensionInfogene, + ModificationTagImpl.extensionModificationTag, + QueryMakerImpl.extensionQueryMaker, + RootThesaurusImpl.extensionRootThesaurus, + SendingImpl.extensionSending, + SessionImpl.extensionSession, + StatusImpl.extensionStatus, + ThesaurusImpl.extensionThesaurus, + WikittyTreeNodeImpl.extensionWikittyTreeNode, + UserImpl.extensionUser, + VradiUserImpl.extensionVradiUser, + WebHarvestStreamImpl.extensionWebHarvestStream, + WikittyUserImpl.extensionWikittyUser, + XmlFieldBindingImpl.extensionXmlFieldBinding, + XmlStreamImpl.extensionXmlStream, + GroupFormsImpl.extensionGroupForms); + + localWikittyProxy.storeExtension(extensions); + } + + /** + * Check if version has changed and launch wikitty service reindex. + * + * @param config app configuration + * @param localWikittyProxy local proxy + */ + protected static void reindexData(ApplicationConfig config, WikittyProxy localWikittyProxy) { + try { + + String currentVersion = VradiServiceConfigurationHelper.getApplicationVersion(config); + String lastVersion = VradiServiceConfigurationHelper.getServiceVersion(config); + + // different is enougth to reindex + // currentVersion is never null, lastVersion could be + if (!currentVersion.equals(lastVersion)) { + + // do version change migration + ServiceMigration.versionChangeMigration(lastVersion, currentVersion, localWikittyProxy); + + // Dont reindex data on version change +// if (log.isInfoEnabled()) { +// log.info(_("Version change detected : %s. Reindexing data...", lastVersion)); +// } +// long timeBefore = System.currentTimeMillis(); +// +// // call syncEngin +// localWikittyProxy.syncEngin(); +// +// long timeAfter = System.currentTimeMillis(); +// +// if (log.isInfoEnabled()) { +// log.info("Reindexing completed in " + (timeAfter - timeBefore) + " ms"); +// } + + // save new version + VradiServiceConfigurationHelper.setServiceVersion(config, currentVersion); + config.saveForUser(); + } else { + if (log.isInfoEnabled()) { + log.info("No version change, skipping reindexing."); + } + } + + // post operation : register migration classes + ServiceMigration.configureMigration(); + + } catch (Exception eee) { + log.error("Failled to reindex data : ", eee); + } + } } Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java 2011-05-26 13:39:50 UTC (rev 54) @@ -106,17 +106,6 @@ * <p/> * Make sure that wikitty proxy doesn't access remote service. * - * @param wikittyProxy wikitty proxy - */ - public VradiDataServiceImpl(WikittyProxy wikittyProxy) { - this(VradiServiceConfiguration.getConfig(), wikittyProxy); - } - - /** - * Constructor with a wikitty proxy. - * <p/> - * Make sure that wikitty proxy doesn't access remote service. - * * @param config vradi configuration * @param wikittyProxy wikitty proxy */ Added: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceContext.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceContext.java (rev 0) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceContext.java 2011-05-26 13:39:50 UTC (rev 54) @@ -0,0 +1,113 @@ +package org.chorem.vradi.services; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.vradi.VradiServiceConfiguration; +import org.chorem.vradi.VradiServiceConfigurationHelper; +import org.nuiton.i18n.I18n; +import org.nuiton.util.ApplicationConfig; +import org.nuiton.util.converter.ConverterUtil; +import org.nuiton.wikitty.WikittyProxy; +import org.nuiton.wikitty.WikittyService; +import org.nuiton.wikitty.WikittyServiceFactory; + +/** + * Context to keep all instanciate service + * + * Must be used only for vradi service, for clients, please use {@link VradiServiceFactory} + * + * @author sletellier + */ +public class VradiServiceContext { + + /** Log. */ + private static final Log log = LogFactory.getLog(VradiServiceFactory.class); + + /** Wikitty service (cached version) for remote access. */ + protected static WikittyService vradiWikittyService; + + /** Single instance of storage service. */ + protected static VradiStorageService vradiStorageService; + + /** Single instance of wikitty proxy. */ + protected static WikittyProxy wikittyProxy; + + protected static ApplicationConfig config; + + static { + // Dans un block static pour definition des variables + // d'environnement solr et jbossts + // A voir pourquoi, les converters s'initialise mal durant les tests + try { + + ConverterUtil.initConverters(); + config = VradiServiceConfiguration.getConfig(); + I18n.setDefaultLocale(VradiServiceConfigurationHelper.getLocale(config)); + } catch (Exception eee) { + log.error("Cant initialize Service factory : ", eee); + } + } + + public static synchronized VradiStorageService getVradiStorageService() { + if (vradiStorageService == null) { + vradiStorageService = new VradiStorageServiceImpl(); + } + return vradiStorageService; + } + + /** + * Creates wikitty service (cached). + * <p/> + * Getter for service, with default service configuration. + * + * @return a unique instance of WikittyService + */ + public static synchronized WikittyService getWikittyService() { + if (vradiWikittyService == null) { + getWikittyService(config); + } + + return vradiWikittyService; + } + + /** + * Creates wikitty service (cached). + * <p/> + * Constructor added for UI embedded mode, with custom configuration. + * + * @param config configuration of vradi service + * @return a unique instance of WikittyService + */ + public static synchronized WikittyService getWikittyService(ApplicationConfig config) { + if (vradiWikittyService == null) { + + synchronized (VradiServiceContext.class) { + vradiWikittyService = WikittyServiceFactory.buildWikittyService(config); + } + } + + return vradiWikittyService; + } + + /** + * Creates wikitty proxy. + * + * @return a unique instance of WikittyProxy. + */ + public static synchronized WikittyProxy getWikittyProxy() { + if (wikittyProxy == null) { + WikittyService wikittyService = getWikittyService(); + + // init proxy on cached service + wikittyProxy = new WikittyProxy(wikittyService); + + // post operation : register extensions + ServiceMigration.updateExtensions(wikittyProxy); + + // post operation : reindex data if necessary + ServiceMigration.reindexData(config, wikittyProxy); + } + + return wikittyProxy; + } +} Copied: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java (from rev 53, trunk/vradi-services/src/main/java/org/chorem/vradi/services/ServiceFactory.java) =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java (rev 0) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java 2011-05-26 13:39:50 UTC (rev 54) @@ -0,0 +1,165 @@ +/* + * #%L + * Vradi :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2010 Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package org.chorem.vradi.services; + +import gnu.cajo.utils.extra.TransparentItemProxy; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.vradi.VradiServiceConfigurationHelper; +import org.nuiton.util.ApplicationConfig; +import org.nuiton.wikitty.WikittyProxy; +import org.nuiton.wikitty.WikittyService; + +/** + * VradiServiceFactory. + * + * @author $Author$ + * @version $Revision$ $Date$ + * @since 24 févr. 2010 22:18:17 + */ +public class VradiServiceFactory { + + /** Log. */ + private static final Log log = LogFactory.getLog(VradiServiceFactory.class); + + /** + * Build {@link VradiStorageService} instance with on remote mode + * if {@link org.chorem.vradi.VradiServiceConfiguration.VradiServiceOption#REMOTE_ENDPOINT} + * is filled in config pass in param. + * + * @param config config of application + * @return instance of vradiServiceStorage + */ + public static VradiStorageService getVradiServiceStorage(ApplicationConfig config) { + + synchronized(VradiServiceFactory.class) { + String serviceEndpoint = VradiServiceConfigurationHelper.getRemoteEndpoint(config); + + VradiStorageService result = null; + // check is it's valid url + if (isValidUrl(serviceEndpoint)) { + + try { + + String cajoEndPoint = serviceEndpoint; + // cajo url is not http or other protocol, url must start with // + // example: //localhost:1198/ws + // remove protocol + int i = cajoEndPoint.indexOf("://"); + if (i >= 0) { + cajoEndPoint = serviceEndpoint.substring(i+1); + } + int servicePort = VradiServiceConfigurationHelper.getServicePort(config); + serviceEndpoint = getServiceURL(cajoEndPoint, servicePort, VradiStorageService.VRADI_SERVICE); + + if (log.isInfoEnabled()) { + log.info("Use remote mode with url : " + serviceEndpoint); + } + result = (VradiStorageService) TransparentItemProxy.getItem( + serviceEndpoint, new Class[]{VradiStorageService.class}); + + } catch (Exception eee) { + if (log.isErrorEnabled()) { + log.error("Can't init remote proxy", eee); + } + } + } else { + if (log.isWarnEnabled()) { + log.warn("Can't parse remote serveur endpoint as valid url (" + serviceEndpoint + ")"); + log.warn("Use local embedded mode"); + } + + result = new VradiStorageServiceImpl(); + } + return result; + } + } + + public static VradiDataService getVradiDataService(ApplicationConfig config, WikittyProxy proxy) { + return new VradiDataServiceImpl(config, proxy); + } + + /** + * Get wikittyService instanciate by vradiService + * + * @param vradiService of application + * @return wikittyService instanciate + */ + public static WikittyService getWikittyService(VradiStorageService vradiService) { + return vradiService.getWikittyService(); + } + + /** + * Get proxy instanciate with wikittyService + * + * @param wikittyService of application + * @return wikittyProxy + */ + public static WikittyProxy getProxy(WikittyService wikittyService) { + return new WikittyProxy(wikittyService); + } + + public static FileService getFileService(ApplicationConfig config) { + + FileService fileService; + String serviceEndpoint = VradiServiceConfigurationHelper.getRemoteEndpoint(config); + if (isValidUrl(serviceEndpoint)) { + int servletPort = VradiServiceConfigurationHelper.getServletPort(config); + // file service + String fileServiceUrl = getServiceURL(serviceEndpoint, servletPort, "file"); + log.info("File service url : " + fileServiceUrl); + fileService = new FileServiceProxy(fileServiceUrl); + } else { + fileService = new FileServiceImpl(); + } + return fileService; + } + + protected static boolean isValidUrl(String serviceEndpoint) { + return serviceEndpoint != null && serviceEndpoint.startsWith("http://"); + } + + /** + * Get service full url. + * + * @param serviceEndpoint end point (can't be null) + * @param serviceEndUrl service small name + * @return service full url + */ + protected static String getServiceURL(String serviceEndpoint, int port, String serviceEndUrl) { + String fullUrl = serviceEndpoint; + + // Add port if != 0 + if (port != 0) { + fullUrl += ":" + port; + } + + // Warn hessian won't work with double / + if (!fullUrl.endsWith("/")) { + fullUrl += "/"; + } + fullUrl += serviceEndUrl; + return fullUrl; + } +} Property changes on: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageService.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageService.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageService.java 2011-05-26 13:39:50 UTC (rev 54) @@ -34,6 +34,7 @@ import org.chorem.vradi.entities.VradiUser; import org.chorem.vradi.entities.WebHarvestStream; import org.chorem.vradi.entities.XmlStream; +import org.nuiton.wikitty.WikittyService; import org.nuiton.wikitty.entities.WikittyExtension; import org.nuiton.wikitty.search.Criteria; @@ -58,7 +59,10 @@ */ public interface VradiStorageService { + public static final String VRADI_SERVICE = "vradiservice"; + WikittyService getWikittyService(); + /** * Create all default status. * @@ -402,4 +406,5 @@ * @throws VradiException if exception occured */ Form updateForms(Form form, List<String> thesaurusIdsToAttach) throws VradiException; + } Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java =================================================================== --- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java 2011-05-26 13:39:50 UTC (rev 54) @@ -23,18 +23,14 @@ */ package org.chorem.vradi.services; -import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.chorem.vradi.VradiConstants; import org.chorem.vradi.VradiServiceConfiguration; import org.chorem.vradi.VradiServiceConfigurationHelper; -import org.chorem.vradi.beans.SendingHelper; import org.chorem.vradi.beans.XmlStreamImportResult; import org.chorem.vradi.entities.Client; import org.chorem.vradi.entities.Form; import org.chorem.vradi.entities.Group; -import org.chorem.vradi.entities.Infogene; import org.chorem.vradi.entities.QueryMaker; import org.chorem.vradi.entities.Sending; import org.chorem.vradi.entities.Session; @@ -53,7 +49,6 @@ import org.chorem.vradi.services.managers.ThesaurusManager; import org.chorem.vradi.services.tasks.TasksManager; import org.nuiton.util.ApplicationConfig; -import org.nuiton.util.DateUtil; import org.nuiton.wikitty.WikittyException; import org.nuiton.wikitty.WikittyProxy; import org.nuiton.wikitty.WikittyService; @@ -66,18 +61,11 @@ import org.nuiton.wikitty.search.operators.Element; import java.io.File; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; -import static org.chorem.vradi.VradiConstants.SendingStatus; import static org.chorem.vradi.VradiConstants.SessionStatus; -import static org.nuiton.i18n.I18n._; /** * Vradi storage implementation. @@ -114,9 +102,11 @@ protected FileService fileService; - /** Remote instantiation and empty constructor for hessian. */ - public VradiStorageServiceImpl() { - this(VradiServiceConfiguration.getConfig(), ServiceFactory.getWikittyProxy()); + /** + * Must be instanciate using {@link VradiServiceFactory} + */ + protected VradiStorageServiceImpl() { + this(VradiServiceConfiguration.getConfig(), VradiServiceContext.getWikittyProxy()); } /** @@ -163,6 +153,11 @@ return importExportService; } + @Override + public WikittyService getWikittyService() { + return wikittyProxy.getWikittyService(); + } + /** * Create all default status. * Modified: trunk/vradi-services/src/main/resources/i18n/vradi-services_fr_FR.properties =================================================================== --- trunk/vradi-services/src/main/resources/i18n/vradi-services_fr_FR.properties 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/resources/i18n/vradi-services_fr_FR.properties 2011-05-26 13:39:50 UTC (rev 54) @@ -9,6 +9,9 @@ vradi.adminXmlStream.config.interval.hours=heures vradi.adminXmlStream.config.interval.minutes=minutes vradi.autoSend.hour.description= +vradi.config.remote.endpoint.description= +vradi.config.remote.service.port.description= +vradi.config.remote.servlet.port.description= vradi.email.status.deleted=Supprimée vradi.email.status.error=Erreur vradi.email.status.received=Reçu Modified: trunk/vradi-services/src/main/resources/vradi-services.properties =================================================================== --- trunk/vradi-services/src/main/resources/vradi-services.properties 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/main/resources/vradi-services.properties 2011-05-26 13:39:50 UTC (rev 54) @@ -68,4 +68,4 @@ #wikitty.service.cache.priority.extensions=Thesaurus jcs.default= jcs.default.cacheattributes.MaxObjects=10000 -#jcs.priority.cacheattributes.MaxObjects=10000 +#jcs.priority.cacheattributes.MaxObjects=10000 \ No newline at end of file Modified: trunk/vradi-services/src/test/java/org/chorem/vradi/VradiTestAbstract.java =================================================================== --- trunk/vradi-services/src/test/java/org/chorem/vradi/VradiTestAbstract.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services/src/test/java/org/chorem/vradi/VradiTestAbstract.java 2011-05-26 13:39:50 UTC (rev 54) @@ -48,7 +48,7 @@ import org.chorem.vradi.entities.XmlStreamImpl; import org.chorem.vradi.services.FileService; import org.chorem.vradi.services.FileServiceImpl; -import org.chorem.vradi.services.ServiceFactory; +import org.chorem.vradi.services.VradiServiceContext; import org.chorem.vradi.services.VradiDataService; import org.chorem.vradi.services.VradiDataServiceImpl; import org.chorem.vradi.services.VradiException; @@ -59,7 +59,6 @@ import org.nuiton.util.ApplicationConfig; import org.nuiton.util.Resource; import org.nuiton.util.converter.ConverterUtil; -import org.nuiton.wikitty.WikittyConfig; import org.nuiton.wikitty.WikittyConfigOption; import org.nuiton.wikitty.WikittyProxy; import org.nuiton.wikitty.entities.BusinessEntity; @@ -140,8 +139,8 @@ config = VradiTestConfiguration.getConfig(); - storageService = ServiceFactory.getVradiStorageService(); - wikittyProxy = ServiceFactory.getWikittyProxy(); + storageService = VradiServiceContext.getVradiStorageService(); + wikittyProxy = VradiServiceContext.getWikittyProxy(); wikittyProxy.clear(); dataService = new VradiDataServiceImpl(config, wikittyProxy); fileService = new FileServiceImpl(config); Modified: trunk/vradi-services-web/pom.xml =================================================================== --- trunk/vradi-services-web/pom.xml 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services-web/pom.xml 2011-05-26 13:39:50 UTC (rev 54) @@ -47,11 +47,6 @@ </dependency> <dependency> - <groupId>com.caucho</groupId> - <artifactId>hessian</artifactId> - </dependency> - - <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <scope>provided</scope> Added: trunk/vradi-services-web/src/main/java/org/chorem/vradi/ApplicationListener.java =================================================================== --- trunk/vradi-services-web/src/main/java/org/chorem/vradi/ApplicationListener.java (rev 0) +++ trunk/vradi-services-web/src/main/java/org/chorem/vradi/ApplicationListener.java 2011-05-26 13:39:50 UTC (rev 54) @@ -0,0 +1,51 @@ +package org.chorem.vradi; + +import gnu.cajo.invoke.Remote; +import gnu.cajo.utils.ItemServer; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.vradi.services.VradiServiceFactory; +import org.chorem.vradi.services.VradiStorageService; +import org.nuiton.util.ApplicationConfig; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import java.io.IOException; + +/** + * For init cajo services + * + * @author sletellier + */ +public class ApplicationListener implements ServletContextListener { + + protected static final Log log = + LogFactory.getLog(ApplicationListener.class); + + @Override + public void contextInitialized(ServletContextEvent sce) { + if (log.isInfoEnabled()) { + log.info("Vradi starting..."); + } + // Init wikitty service + ApplicationConfig config = VradiServiceConfiguration.getConfig(); + + // get port and path part of server url, only that is used for cajo + try { + VradiStorageService storageService = VradiServiceFactory.getVradiServiceStorage(config); + + int port = VradiServiceConfigurationHelper.getServicePort(config); + + Remote.config(null, port, null, 0); + ItemServer.bind(storageService, VradiStorageService.VRADI_SERVICE); + log.info(String.format("The vradi server is running on %s:%s/%s", + Remote.getDefaultServerHost(), Remote.getDefaultServerPort(), VradiStorageService.VRADI_SERVICE)); + } catch (IOException eee) { + log.error("Error ocurred binding service, abording", eee); + } + } + + @Override + public void contextDestroyed(ServletContextEvent sce) { + } +} Deleted: trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java =================================================================== --- trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java 2011-05-26 13:39:50 UTC (rev 54) @@ -1,47 +0,0 @@ -/* - * #%L - * Vradi :: Services Web - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2009 - 2010 Codelutin, Chatellier Eric - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -package org.chorem.vradi.services; - -import org.nuiton.wikitty.services.WikittyServiceDelegator; - -/** - * Wikitty proxy delegator. - * <p/> - * This delegator exist only because we cannot put instance as hessian service. - * <p/> - * This delegator just delegate everything to a static real wikitty service. - * - * @author chatellier - * @version $Revision$ - * <p/> - * Last update : $Date$ - * By : $Author$ - */ -public class VradiWikittyServiceDelegator extends WikittyServiceDelegator { - - public VradiWikittyServiceDelegator() { - super(ServiceFactory.getWikittyService()); - } -} Modified: trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml 2011-05-26 13:39:50 UTC (rev 54) @@ -29,48 +29,53 @@ <display-name>Vradi</display-name> + <!--<servlet>--> + <!--<servlet-name>vradiStorageServlet</servlet-name>--> + <!--<servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>--> + <!--<init-param>--> + <!--<param-name>home-api</param-name>--> + <!--<param-value>org.chorem.vradi.services.VradiStorageService</param-value>--> + <!--</init-param>--> + <!--<init-param>--> + <!--<param-name>home-class</param-name>--> + <!--<param-value>org.chorem.vradi.services.VradiStorageServiceImpl--> + <!--</param-value>--> + <!--</init-param>--> + <!--<load-on-startup>1</load-on-startup>--> + <!--</servlet>--> + <!--<servlet>--> + <!--<servlet-name>wikittyServiceServlet</servlet-name>--> + <!--<servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>--> + <!--<init-param>--> + <!--<param-name>home-api</param-name>--> + <!--<param-value>org.nuiton.wikitty.WikittyService</param-value>--> + <!--</init-param>--> + <!--<init-param>--> + <!--<param-name>home-class</param-name>--> + <!--<param-value>org.chorem.vradi.services.VradiWikittyServiceDelegator--> + <!--</param-value>--> + <!--</init-param>--> + <!--<load-on-startup>2</load-on-startup>--> + <!--</servlet>--> <servlet> - <servlet-name>vradiStorageServlet</servlet-name> - <servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class> - <init-param> - <param-name>home-api</param-name> - <param-value>org.chorem.vradi.services.VradiStorageService</param-value> - </init-param> - <init-param> - <param-name>home-class</param-name> - <param-value>org.chorem.vradi.services.VradiStorageServiceImpl - </param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet> - <servlet-name>wikittyServiceServlet</servlet-name> - <servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class> - <init-param> - <param-name>home-api</param-name> - <param-value>org.nuiton.wikitty.WikittyService</param-value> - </init-param> - <init-param> - <param-name>home-class</param-name> - <param-value>org.chorem.vradi.services.VradiWikittyServiceDelegator - </param-value> - </init-param> - <load-on-startup>2</load-on-startup> - </servlet> - <servlet> <servlet-name>fileServlet</servlet-name> <servlet-class>org.chorem.vradi.services.FileServlet</servlet-class> </servlet> + <!--<servlet-mapping>--> + <!--<servlet-name>vradiStorageServlet</servlet-name>--> + <!--<url-pattern>/vradiservice</url-pattern>--> + <!--</servlet-mapping>--> + <!--<servlet-mapping>--> + <!--<servlet-name>wikittyServiceServlet</servlet-name>--> + <!--<url-pattern>/wikittyservice</url-pattern>--> + <!--</servlet-mapping>--> + <listener> + <description>Init</description> + <listener-class>org.chorem.vradi.ApplicationListener</listener-class> + </listener> + <servlet-mapping> - <servlet-name>vradiStorageServlet</servlet-name> - <url-pattern>/vradiservice</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>wikittyServiceServlet</servlet-name> - <url-pattern>/wikittyservice</url-pattern> - </servlet-mapping> - <servlet-mapping> <servlet-name>fileServlet</servlet-name> <url-pattern>/file/*</url-pattern> </servlet-mapping> Modified: trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/ClearServiceImpl.java =================================================================== --- trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/ClearServiceImpl.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/ClearServiceImpl.java 2011-05-26 13:39:50 UTC (rev 54) @@ -43,7 +43,7 @@ @Override public void clear() { - WikittyProxy proxy = ServiceFactory.getWikittyProxy(); + WikittyProxy proxy = VradiServiceContext.getWikittyProxy(); proxy.clear(); } Deleted: trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java =================================================================== --- trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java 2011-05-26 13:39:50 UTC (rev 54) @@ -1,199 +0,0 @@ -/* - * #%L - * Vradi :: Services Web - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2009 - 2010 Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.vradi.services; - -import com.caucho.hessian.client.HessianProxyFactory; -import org.apache.commons.lang.time.DateUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.vradi.VradiConstants; -import org.chorem.vradi.beans.XmlStreamImportResult; -import org.chorem.vradi.entities.Session; -import org.chorem.vradi.entities.SessionImpl; -import org.chorem.vradi.entities.XmlFieldBinding; -import org.chorem.vradi.entities.XmlStream; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.mortbay.jetty.runner.Runner; -import org.nuiton.util.Resource; -import org.nuiton.util.converter.ConverterUtil; -import org.nuiton.wikitty.WikittyProxy; -import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyUtil; -import org.nuiton.wikitty.entities.WikittyExtension; - -import java.net.URL; -import java.util.Date; -import java.util.List; - -/** - * VradiHessianStorageTest. - * - * @author $Author$ - * @version $Revision$ $Date$ - * @since 21 févr. 2010 02:13:16 - */ -public class VradiHessianStorageTest extends VradiStorageServiceTest { - static final Log log = LogFactory.getLog(VradiHessianStorageTest.class); - - static final String port = "9000"; - - static final String clearUrl = "http://localhost:" + port + "/clearservice"; - - static final String storageUrl = "http://localhost:" + port + "/vradiservice"; - - static final String wikittyUrl = "http://localhost:" + port + "/wikittyservice"; - - static final String fileUrl = "http://localhost:" + port + "/file"; - - static VradiJettyRunner runner; - - public static class VradiJettyRunner extends Runner { - @Override - public void run() throws Exception { - _server.start(); - // Skip join - } - - public void stop() throws Exception { - _server.stop(); - } - } - - @BeforeClass - public static void startServer() throws Exception { - runner = new VradiJettyRunner(); - - // This is the file to find to get the path of vradi-services-web module - String placeHolder = "/vradi_services_web.place_holder"; - - // Find the file - URL url = Resource.getURL(placeHolder); - - // Remove the file name and folder 'target/test-classes' - String contextPath = url.toString(); - String target = "/target/test-classes"; - contextPath = contextPath.substring(0, contextPath.length() - (placeHolder.length() + target.length())); - - // Add webapp context - contextPath += "/src/test/webapp"; - String[] args = {"--port", port, contextPath}; - runner.configure(args); - - runner.run(); - } - - @AfterClass - public static void stopServer() throws Exception { - runner.stop(); - } - - @Override - @Before - public void clear() throws Exception { - ConverterUtil.initConverters(); - - HessianProxyFactory factory = new HessianProxyFactory(); - factory.setHessian2Request(true); - factory.setOverloadEnabled(true); - - log.debug("--clear-----------------------------------------"); - ClearService clearService = (ClearService) factory.create(ClearService.class, clearUrl); - clearService.clear(); - storageService = (VradiStorageService) factory.create(VradiStorageService.class, storageUrl); - WikittyService wikittyService = (WikittyService) factory.create(WikittyService.class, wikittyUrl); - wikittyProxy = new WikittyProxy(wikittyService); - dataService = new VradiDataServiceImpl(wikittyProxy); - - // fait avec le proxy > servlet pour tester - fileService = new FileServiceProxy(fileUrl); - } - - @Override - protected XmlStreamImportResult initData(WikittyExtension extension) - throws Exception { - List<XmlFieldBinding> bindings = createXmlBindings(extension); - XmlStream xmlStream = createXmlStream(extension, bindings); - return storageService.importFormsFromXmlStream(xmlStream); - } - - /* - * TODO add doc about this test !!! - * - */ - @Test - public void testPropagation() throws Exception { - - Session session = new SessionImpl(); - - session.setNum(7); - wikittyProxy.getWikitty(session).addExtension( - new WikittyExtension("ouaf", "2.0", null, - WikittyUtil.buildFieldMapExtension( - "Numeric a", - "Numeric b", - "String c"))); - session.setSessionDate(new Date()); - - session.setStatus(VradiConstants.SessionStatus.ACTIVE.getValue()); - - session = wikittyProxy.store(session); - - session.setField("ouaf", "a", 1); - session.setField("ouaf", "b", 1.0); - session.setField("ouaf", "c", "Ouaf"); - session.setNum(1); - session.setSessionDate(DateUtils.addMinutes(new Date(), 15)); - Session sessionService = wikittyProxy.store(session); - - if (session.getWikittyId().equals(sessionService.getWikittyId())) { - int scInt = wikittyProxy.getWikitty(sessionService).getFieldAsInt("ouaf", "a"); - int lcInt = wikittyProxy.getWikitty(session).getFieldAsInt("ouaf", "a"); - - Float scFloat = wikittyProxy.getWikitty(sessionService).getFieldAsFloat("ouaf", "b"); - Float lcFloat = wikittyProxy.getWikitty(session).getFieldAsFloat("ouaf", "b"); - - String scString = wikittyProxy.getWikitty(sessionService).getFieldAsString("ouaf", "c"); - String lcString = wikittyProxy.getWikitty(session).getFieldAsString("ouaf", "c"); - - log.info("testPropagation result, local : " + session.getNum() + " serveur : " + sessionService.getNum()); - log.info("testPropagation result as int, local : " + lcInt + " serveur : " + scInt); - log.info("testPropagation result as float, local : " + lcFloat + " serveur : " + scFloat); - log.info("testPropagation result as String, local : " + lcString + " serveur : " + scString); - log.info("testPropagation result, local : " + session.getSessionDate() + " serveur : " + sessionService.getSessionDate()); - - Assert.assertEquals(session.getNum(), sessionService.getNum()); - Assert.assertEquals(lcInt, scInt); - Assert.assertEquals(lcFloat, scFloat); - Assert.assertEquals(lcString, scString); - Assert.assertEquals(session.getSessionDate(), sessionService.getSessionDate()); - } - - wikittyProxy.delete(session.getWikittyId()); - } - -} Modified: trunk/vradi-swing/pom.xml =================================================================== --- trunk/vradi-swing/pom.xml 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-swing/pom.xml 2011-05-26 13:39:50 UTC (rev 54) @@ -86,12 +86,6 @@ </dependency> <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-hessian-client</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> @@ -112,11 +106,6 @@ </dependency> <dependency> - <groupId>com.caucho</groupId> - <artifactId>hessian</artifactId> - </dependency> - - <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-webapp</artifactId> <scope>runtime</scope> Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java =================================================================== --- trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java 2011-05-26 13:39:50 UTC (rev 54) @@ -170,12 +170,6 @@ _("vradi.config.password"), "", String.class, true, true), - // achitecture client serveur - REMOTE_ENDPOINT( - "vradi.remote.endpoint", - _("vradi.config.remote.endpoint.description"), - "", String.class, false, false), - // user datas QUERIES( "vradi.queries", Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfigHelper.java =================================================================== --- trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfigHelper.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfigHelper.java 2011-05-26 13:39:50 UTC (rev 54) @@ -165,19 +165,6 @@ } /** - * Get remote endpoint base url. - * <p/> - * If not valid url, embedded mode is used. - * - * @param config vradi swing configuration - * @return remote endpoint base url - */ - public static String getRemoteEndpoint(ApplicationConfig config) { - String endpoint = config.getOption(VradiConfig.VradiSwingOption.REMOTE_ENDPOINT.key); - return endpoint; - } - - /** * Get user queries (comma separated). * <p/> * Warning to inner comma in queries, use {@link StringUtil#split(String, String)} @@ -372,15 +359,4 @@ config.setOption(VradiConfig.VradiSwingOption.THESAURUS_EXPANDED.key, String.valueOf(state)); config.saveForUser(); } - - /** - * Change remote endpoint url. - * - * @param config vradi swing configuration - * @param newEndpoint new base url - */ - public static void setRemoteEndPoint(ApplicationConfig config, String newEndpoint) { - config.setOption(VradiConfig.VradiSwingOption.REMOTE_ENDPOINT.key, newEndpoint); - } - } Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java =================================================================== --- trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-05-26 13:39:50 UTC (rev 54) @@ -23,23 +23,14 @@ */ package org.chorem.vradi.services; -import com.caucho.hessian.client.HessianProxyFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.chorem.vradi.VradiConfigHelper; import org.nuiton.util.ApplicationConfig; -import org.nuiton.wikitty.WikittyConfig; -import org.nuiton.wikitty.WikittyConfigOption; import org.nuiton.wikitty.WikittyProxy; import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyServiceFactory; -import java.net.MalformedURLException; - /** * Vradi service management. - * <p/> - * Can handle embedded server or remote hessian service. * * @author $Author$ * @version $Revision$ $Date$ @@ -72,91 +63,18 @@ */ public static void initServiceProxies(ApplicationConfig configuration) { - String serviceEndpoint = VradiConfigHelper.getRemoteEndpoint(configuration); + vradiStorageService = VradiServiceFactory.getVradiServiceStorage(configuration); - // check is it's valid url - if (serviceEndpoint != null && serviceEndpoint.startsWith("http://")) { - if (log.isInfoEnabled()) { - log.info("Use remote mode with url : " + serviceEndpoint); - } + wikittyService = VradiServiceFactory.getWikittyService(vradiStorageService); - HessianProxyFactory factory = new HessianProxyFactory(); - // Fix : com.caucho.hessian.io.HessianProtocolException: '���' is an unknown code - factory.setHessian2Request(true); - // pour que les méthodes aux noms dupliquées fonctionnent (arguments different) - factory.setOverloadEnabled(true); + fileService = VradiServiceFactory.getFileService(configuration); - try { + wikittyProxy = VradiServiceFactory.getProxy(wikittyService); - // vradi service - vradiStorageService = (VradiStorageService) factory.create(VradiStorageService.class, - getServiceURL(serviceEndpoint, "vradiservice")); - - wikittyService = initLocalWikittyService(configuration); - - // file service - fileService = new FileServiceProxy(getServiceURL(serviceEndpoint, "file")); - - } catch (MalformedURLException eee) { - if (log.isErrorEnabled()) { - log.error("Can't init remote proxy", eee); - } - } - } else { - if (log.isWarnEnabled()) { - log.warn("Can't parse remote serveur endpoint as valid url (" + serviceEndpoint + ")"); - log.warn("Use local embedded mode"); - } - - vradiStorageService = new VradiStorageServiceImpl(); - wikittyService = ServiceFactory.getWikittyService(configuration); - fileService = new FileServiceImpl(); - } - - // wrap service local/remote to a proxy - wikittyProxy = new WikittyProxy(); - wikittyProxy.setWikittyService(wikittyService); - - // init data service on local cached wikitty proxy - vradiDataService = new VradiDataServiceImpl(wikittyProxy); + vradiDataService = VradiServiceFactory.getVradiDataService(configuration, wikittyProxy); } /** - * Create a new wikitty service with cache support that use - * provided WikittyService for non cached data. - * - * @param configuration vradi server configuration - * @return local wikitty service - */ - protected static WikittyService initLocalWikittyService(ApplicationConfig configuration) { - - log.info("Propagation event is set to : " + VradiConfigHelper.getWikittyEventPropagate(configuration)); - log.info("XMPP server is set to : " + VradiConfigHelper.getWikittyEventTransporterXMPPServer(configuration)); - log.info("XMPP room is set to : " + VradiConfigHelper.getWikittyEventTransporterXMPPRoom(configuration)); - - WikittyService wikittyServiceLocal = WikittyServiceFactory.buildWikittyService(configuration); - return wikittyServiceLocal; - } - - /** - * Get service full url. - * - * @param serviceEndpoint end point (can't be null) - * @param serviceEndUrl service small name - * @return service full url - */ - protected static String getServiceURL(String serviceEndpoint, String serviceEndUrl) { - String fullUrl = serviceEndpoint; - - // Warn hessian won't work with double / - if (!fullUrl.endsWith("/")) { - fullUrl += "/"; - } - fullUrl += serviceEndUrl; - return fullUrl; - } - - /** * Get remote vradi service (execute code on server).s * * @return vradi storage service proxy Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/VradiMainUIHandler.java =================================================================== --- trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/VradiMainUIHandler.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/VradiMainUIHandler.java 2011-05-26 13:39:50 UTC (rev 54) @@ -386,9 +386,9 @@ modelBuilder.addOption(VradiConfig.VradiSwingOption.LOCALE); // category 3 - modelBuilder.addCategory(n_("vradi.config.category.remote"), - n_("vradi.config.category.remote.description")); - modelBuilder.addOption(VradiConfig.VradiSwingOption.REMOTE_ENDPOINT); +// modelBuilder.addCategory(n_("vradi.config.category.remote"), +// n_("vradi.config.category.remote.description")); +// modelBuilder.addOption(VradiConfig.VradiSwingOption.REMOTE_ENDPOINT); modelBuilder.buildUI(context, "vradi.config.category.directories"); Modified: trunk/vradi-swing/src/main/resources/vradi.properties =================================================================== --- trunk/vradi-swing/src/main/resources/vradi.properties 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-swing/src/main/resources/vradi.properties 2011-05-26 13:39:50 UTC (rev 54) @@ -31,8 +31,7 @@ application.organisation.url=${project.organization.url} # Wikitty -wikitty.WikittyService.components=org.nuiton.wikitty.services.WikittyServiceHessianClient,\ -org.nuiton.wikitty.services.WikittyServiceNotifier,\ +wikitty.WikittyService.components=org.nuiton.wikitty.services.WikittyServiceNotifier,\ org.nuiton.wikitty.services.WikittyServiceCached,\ org.nuiton.wikitty.services.WikittyServiceSecurity wikitty.service.cache.allwaysRestoreCopies=false Modified: trunk/vradi-web/pom.xml =================================================================== --- trunk/vradi-web/pom.xml 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-web/pom.xml 2011-05-26 13:39:50 UTC (rev 54) @@ -186,12 +186,6 @@ </dependency> <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-hessian-client</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <scope>runtime</scope> Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java =================================================================== --- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java 2011-05-26 13:39:50 UTC (rev 54) @@ -4,10 +4,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.vradi.entities.Attachment; +import org.chorem.vradi.services.VradiServiceFactory; +import org.chorem.vradi.services.VradiStorageService; import org.nuiton.util.ApplicationConfig; import org.nuiton.wikitty.WikittyProxy; import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyServiceFactory; import org.nuiton.wikitty.search.Criteria; import org.nuiton.wikitty.search.PagedResult; import org.nuiton.wikitty.search.Search; @@ -37,9 +38,11 @@ * @param token * @return */ - static public VradiProxy getInstance(String token) { + static public VradiProxy getInstance(VradiStorageService vradiStorageService, String token) { ApplicationConfig config = VradiWebConfig.getConfig(); - WikittyService ws = getWikittyService(config); + if (ws == null) { + ws = VradiServiceFactory.getWikittyService(vradiStorageService); + } VradiProxy result = new VradiProxy(config, ws); result.setSecurityToken(token); @@ -47,35 +50,17 @@ } /** - * Returns WikittyService to use. This WikittyService is singleton. - * - * @param config - * @return WikittyService instance - */ - static protected WikittyService getWikittyService(ApplicationConfig config) { - if (ws == null) { - synchronized(VradiProxy.class) { - if (ws == null) { - ws = WikittyServiceFactory.buildWikittyService(config); - } - } - } - return ws; - } - - /** * Returns the attachments linked with a wikitty id ordered descending * by date * * @param formNoteId * @return the list of attachments */ - static public List<Attachment> getAttachments(String formNoteId) { + public List<Attachment> getAttachments(String formNoteId) { Criteria criteria = Search.query(). eq(Attachment.FQ_FIELD_ATTACHMENT_FORMNOTE, formNoteId) .criteria().addSortDescending(Attachment.FQ_FIELD_ATTACHMENT_DATE); - PagedResult<Attachment> result = getInstance(null). - findAllByCriteria(Attachment.class, criteria); + PagedResult<Attachment> result = findAllByCriteria(Attachment.class, criteria); List<Attachment> attachments = result.getAll(); return attachments; } Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java =================================================================== --- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-26 13:39:50 UTC (rev 54) @@ -1,6 +1,5 @@ package org.chorem.vradi; -import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; @@ -8,15 +7,11 @@ import org.apache.commons.logging.LogFactory; import org.chorem.vradi.entities.VradiUser; import org.chorem.vradi.services.VradiDataService; -import org.chorem.vradi.services.VradiDataServiceImpl; +import org.chorem.vradi.services.VradiServiceFactory; +import org.chorem.vradi.services.VradiStorageService; import org.nuiton.i18n.I18n; import org.nuiton.i18n.init.DefaultI18nInitializer; import org.nuiton.util.ApplicationConfig; -import org.nuiton.wikitty.WikittyConfigOption; -import org.nuiton.wikitty.WikittyProxy; -import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyServiceFactory; -import org.nuiton.wikitty.entities.WikittyUser; /** * Classe utilisee pour stocker les objets utils en session utilisateur @@ -39,6 +34,7 @@ transient protected VradiProxy proxy = null; transient protected VradiDataService dataService; + transient protected VradiStorageService vradiServiceStorage; public VradiSession() { // FIXME poussin 20110521 ? @@ -64,7 +60,7 @@ public VradiProxy getProxy() { if (proxy == null) { - proxy = VradiProxy.getInstance(securityToken); + proxy = VradiProxy.getInstance(getVradiStorageService(), securityToken); } return proxy; } @@ -101,13 +97,25 @@ return result; } + public VradiStorageService getVradiStorageService() { + if (vradiServiceStorage == null) { + synchronized(VradiSession.class) { + if (vradiServiceStorage == null) { + ApplicationConfig config = VradiWebConfig.getConfig(); + vradiServiceStorage = VradiServiceFactory.getVradiServiceStorage(config); + } + } + } + return vradiServiceStorage; + } + public VradiDataService getDataService() { if (dataService == null) { synchronized(VradiSession.class) { if (dataService == null) { ApplicationConfig config = VradiWebConfig.getConfig(); VradiProxy proxy = getProxy(); - dataService = new VradiDataServiceImpl(config, proxy); + dataService = VradiServiceFactory.getVradiDataService(config, proxy); } } } Modified: trunk/vradi-web/src/main/resources/vradi-web.properties =================================================================== --- trunk/vradi-web/src/main/resources/vradi-web.properties 2011-05-26 09:47:13 UTC (rev 53) +++ trunk/vradi-web/src/main/resources/vradi-web.properties 2011-05-26 13:39:50 UTC (rev 54) @@ -37,7 +37,6 @@ wikitty.service.event.listen=true wikitty.service.event.propagate.transporter=org.nuiton.wikitty.services.XMPPNotifierTransporter wikitty.WikittyServiceCached.components=org.nuiton.wikitty.services.WikittyCacheJCS -wikitty.service.server.url=${vradi.remote.endpoint}/wikittyservice wikitty.service.cache.priority.extensions=Thesaurus, User, Status, XmlStream jcs.default= jcs.default.cacheattributes.MaxObjects=1000
participants (1)
-
sletellier@users.chorem.org