From: <fg...@us...> - 2008-02-03 21:19:05
|
Revision: 598 http://openutils.svn.sourceforge.net/openutils/?rev=598&view=rev Author: fgiust Date: 2008-02-03 13:19:10 -0800 (Sun, 03 Feb 2008) Log Message: ----------- docs Modified Paths: -------------- trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/DeploymentResolver.java trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/EnvironmentLog4jConfigListener.java trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/DatabaseEnvironmentPropertyConfigurer.java trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java trunk/openutils-deployment/src/site/apt/index.apt Modified: trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/DeploymentResolver.java =================================================================== --- trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/DeploymentResolver.java 2008-02-03 21:07:58 UTC (rev 597) +++ trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/DeploymentResolver.java 2008-02-03 21:19:10 UTC (rev 598) @@ -1,3 +1,18 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package it.openutils.deployment.log4j; import java.io.File; @@ -50,7 +65,7 @@ MessageFormat .format( "No configuration found using location list {0}. [servername] is [{1}], [webapp] is [{2}] and base path is [{3}]", //$NON-NLS-1$ - new Object[]{ArrayUtils.toString(propertiesLocation), servername, webapp, rootPath })); + new Object[]{ArrayUtils.toString(propertiesLocation), servername, webapp, rootPath})); } Modified: trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/EnvironmentLog4jConfigListener.java =================================================================== --- trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/EnvironmentLog4jConfigListener.java 2008-02-03 21:07:58 UTC (rev 597) +++ trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/EnvironmentLog4jConfigListener.java 2008-02-03 21:19:10 UTC (rev 598) @@ -1,3 +1,18 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package it.openutils.deployment.log4j; import java.io.FileNotFoundException; Modified: trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/DatabaseEnvironmentPropertyConfigurer.java =================================================================== --- trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/DatabaseEnvironmentPropertyConfigurer.java 2008-02-03 21:07:58 UTC (rev 597) +++ trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/DatabaseEnvironmentPropertyConfigurer.java 2008-02-03 21:19:10 UTC (rev 598) @@ -1,3 +1,18 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package it.openutils.deployment.spring; import java.io.IOException; Modified: trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java =================================================================== --- trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java 2008-02-03 21:07:58 UTC (rev 597) +++ trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java 2008-02-03 21:19:10 UTC (rev 598) @@ -1,3 +1,18 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package it.openutils.deployment.spring; import java.io.IOException; Modified: trunk/openutils-deployment/src/site/apt/index.apt =================================================================== --- trunk/openutils-deployment/src/site/apt/index.apt 2008-02-03 21:07:58 UTC (rev 597) +++ trunk/openutils-deployment/src/site/apt/index.apt 2008-02-03 21:19:10 UTC (rev 598) @@ -6,9 +6,36 @@ openutils-deployment + Openutils-deployment contains a few utility classes that allow switching between different configurations in an application. + Openutils-deployment works by embedding configurations for different environments in the final application, and by + choosing the correct configuration at runtime dependending on: + * the server name + * the webapp name (for web projects) + + [] + + You can find a spring propertyconfigurer and a log4j servlet listener that follow this pattern. + + The following example is a configuration snippet for <<<it.openutils.deployment.spring.EnvironmentPropertyConfigurer>>>: + The ${env} variable will be replaced at runtime with the name of the current server and any existing configuration file + wil be loaded. + + ++--------------------------------------------+ + <bean id="environmentProperties" class="it.openutils.deployment.spring.EnvironmentPropertyConfigurer"> + <property name="fileLocation" + value="WEB-INF/config/${env}/environment.properties, + WEB-INF/config/default/environment.properties, + classpath:environment-${env}.properties, + classpath:environment.properties" /> + </bean> ++--------------------------------------------+ + + + Released versions Check it at {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-deployment}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-deployment}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |