You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(39) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(19) |
Feb
(150) |
Mar
(10) |
Apr
|
May
(8) |
Jun
(11) |
Jul
(27) |
Aug
(52) |
Sep
(35) |
Oct
(30) |
Nov
(18) |
Dec
(4) |
2008 |
Jan
(76) |
Feb
(121) |
Mar
(39) |
Apr
(55) |
May
(18) |
Jun
(49) |
Jul
(32) |
Aug
(4) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(33) |
2009 |
Jan
(19) |
Feb
(87) |
Mar
(69) |
Apr
(38) |
May
(47) |
Jun
(20) |
Jul
(5) |
Aug
(76) |
Sep
(145) |
Oct
(34) |
Nov
(8) |
Dec
(68) |
2010 |
Jan
(150) |
Feb
(379) |
Mar
(191) |
Apr
(100) |
May
(525) |
Jun
(269) |
Jul
(127) |
Aug
(190) |
Sep
(190) |
Oct
(29) |
Nov
(147) |
Dec
(83) |
2011 |
Jan
(188) |
Feb
(81) |
Mar
(43) |
Apr
(97) |
May
(63) |
Jun
(129) |
Jul
(17) |
Aug
(124) |
Sep
(6) |
Oct
(20) |
Nov
(67) |
Dec
(23) |
2012 |
Jan
(6) |
Feb
(14) |
Mar
(181) |
Apr
(64) |
May
(102) |
Jun
(47) |
Jul
(26) |
Aug
(3) |
Sep
(1) |
Oct
(14) |
Nov
(13) |
Dec
(23) |
2013 |
Jan
(4) |
Feb
(14) |
Mar
(18) |
Apr
(14) |
May
(27) |
Jun
(27) |
Jul
(5) |
Aug
(2) |
Sep
(74) |
Oct
(79) |
Nov
(21) |
Dec
(97) |
2014 |
Jan
(6) |
Feb
(3) |
Mar
(8) |
Apr
|
May
(5) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(3) |
Oct
(10) |
Nov
(6) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fc...@us...> - 2007-10-17 16:49:34
|
Revision: 471 http://openutils.svn.sourceforge.net/openutils/?rev=471&view=rev Author: fcarone Date: 2007-10-17 09:49:31 -0700 (Wed, 17 Oct 2007) Log Message: ----------- delete eclipse autogenerated files Removed Paths: ------------- trunk/openutils-spring-rmibernate/.classpath trunk/openutils-spring-rmibernate/.project trunk/openutils-spring-rmibernate/.settings/ Deleted: trunk/openutils-spring-rmibernate/.classpath =================================================================== --- trunk/openutils-spring-rmibernate/.classpath 2007-10-17 16:47:09 UTC (rev 470) +++ trunk/openutils-spring-rmibernate/.classpath 2007-10-17 16:49:31 UTC (rev 471) @@ -1,31 +0,0 @@ -<classpath> - <classpathentry kind="src" path="src/main/java"/> - <classpathentry kind="src" path="src/test/java" output="target/test-classes"/> - <classpathentry kind="output" path="target/classes"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="var" path="M2_REPO/asm/asm/2.2.3/asm-2.2.3.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/2.0.6/spring-aop-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.4.ga/hibernate-3.2.4.ga.jar"/> - <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/2.0.6/spring-beans-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.4.1/slf4j-log4j12-1.4.1.jar"/> - <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/2.0.6/spring-context-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-hibernate3/2.0.6/spring-hibernate3-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar" sourcepath="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-remoting/2.0.6/spring-remoting-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl104-over-slf4j/1.4.1/jcl104-over-slf4j-1.4.1.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-jdbc/2.0.6/spring-jdbc-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/2.0.6/spring-core-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-web/2.0.6/spring-web-2.0.6.jar"/> - <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.4.1/slf4j-api-1.4.1.jar"/> - <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar" sourcepath="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/> -</classpath> \ No newline at end of file Deleted: trunk/openutils-spring-rmibernate/.project =================================================================== --- trunk/openutils-spring-rmibernate/.project 2007-10-17 16:47:09 UTC (rev 470) +++ trunk/openutils-spring-rmibernate/.project 2007-10-17 16:49:31 UTC (rev 471) @@ -1,26 +0,0 @@ -<projectDescription> - <name>openutils-spring-rmibernate</name> - <comment>openutils base Spring-Hibernate RMI remote lazy loading support</comment> - <projects/> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - </buildCommand> - <buildCommand> - <name>org.eclipse.wst.common.project.facet.core.builder</name> - </buildCommand> - <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - </buildCommand> - <buildCommand> - <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> - <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature> - </natures> -</projectDescription> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-10-17 16:47:08
|
Revision: 470 http://openutils.svn.sourceforge.net/openutils/?rev=470&view=rev Author: fcarone Date: 2007-10-17 09:47:09 -0700 (Wed, 17 Oct 2007) Log Message: ----------- ignore eclipse generated files Property Changed: ---------------- trunk/openutils-spring-rmibernate/ Property changes on: trunk/openutils-spring-rmibernate ___________________________________________________________________ Name: svn:ignore - .project .classpath .checkstyle + .project .classpath .checkstyle target .settings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2007-10-16 13:46:33
|
Revision: 468 http://openutils.svn.sourceforge.net/openutils/?rev=468&view=rev Author: molaschi Date: 2007-10-16 06:46:35 -0700 (Tue, 16 Oct 2007) Log Message: ----------- empty method interceptor per la cache dei proxy. in questo modo non tengo riferimenti a dataobject (tramite methodinterceptor) Added Paths: ----------- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/EmptyMethodInterceptor.java Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/EmptyMethodInterceptor.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/EmptyMethodInterceptor.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/EmptyMethodInterceptor.java 2007-10-16 13:46:35 UTC (rev 468) @@ -0,0 +1,27 @@ +package it.openutils.spring.rmibernate.server.aspects; + +import java.lang.reflect.Method; + +import net.sf.cglib.proxy.MethodInterceptor; +import net.sf.cglib.proxy.MethodProxy; + + +/** + * @author mmolaschi + * @version $Id: $ + */ +public class EmptyMethodInterceptor implements MethodInterceptor +{ + + public static final MethodInterceptor INSTANCE = new EmptyMethodInterceptor(); + + /** + * {@inheritDoc} + */ + public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable + { + // TODO Auto-generated method stub + return proxy.invokeSuper(obj, args); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2007-10-16 13:45:38
|
Revision: 467 http://openutils.svn.sourceforge.net/openutils/?rev=467&view=rev Author: molaschi Date: 2007-10-16 06:45:42 -0700 (Tue, 16 Oct 2007) Log Message: ----------- - cache dei proxy per classe - correzione baco paginazione Modified Paths: -------------- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java Modified: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java 2007-10-16 11:00:26 UTC (rev 466) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java 2007-10-16 13:45:42 UTC (rev 467) @@ -40,6 +40,7 @@ { Object retVal = invocation.proceed(); + SerializationInterceptor.clean(); // Proxy class for serialization work return SerializationInterceptor.getEnhancedObject(retVal, sessionFactory); } Modified: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java 2007-10-16 11:00:26 UTC (rev 466) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java 2007-10-16 13:45:42 UTC (rev 467) @@ -23,7 +23,6 @@ return lazyReference; } - public void setLazyReference(LazyReference lazyReference) { this.lazyReference = lazyReference; Modified: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java 2007-10-16 11:00:26 UTC (rev 466) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java 2007-10-16 13:45:42 UTC (rev 467) @@ -6,13 +6,18 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +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.Set; import net.sf.cglib.proxy.Callback; import net.sf.cglib.proxy.CallbackFilter; import net.sf.cglib.proxy.Enhancer; +import net.sf.cglib.proxy.Factory; import net.sf.cglib.proxy.MethodInterceptor; import net.sf.cglib.proxy.MethodProxy; import net.sf.cglib.proxy.NoOp; @@ -24,6 +29,7 @@ import org.hibernate.EntityMode; import org.hibernate.SessionFactory; import org.hibernate.collection.PersistentCollection; +import org.hibernate.collection.PersistentSet; import org.hibernate.proxy.HibernateProxy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,6 +44,10 @@ public class SerializationInterceptor implements MethodInterceptor { + private static ThreadLocal<List<Object>> processed = new ThreadLocal<List<Object>>(); + + private static Map<Class, Object> proxies = Collections.synchronizedMap(new HashMap<Class, Object>()); + /** * log */ @@ -64,6 +74,11 @@ this.sessionFactory = sessionFactory; } + public static void clean() + { + processed.set(null); + } + /** * Get proxy object intercepting writeReplace calls * @param o object to be proxied @@ -89,6 +104,14 @@ return null; } + if (!(o instanceof HibernateProxy) + && !(o instanceof PersistentSet) + && processed.get() != null + && processed.get().contains(o)) + { + return o; + } + // check if there is an empty constructor try { @@ -135,8 +158,16 @@ callback = new SerializationInterceptor(o, sessionFactory); } + synchronized (proxies) + { + if (proxies.containsKey(clazz)) + { + Factory proxy = (Factory)proxies.get(clazz); + return proxy.newInstance(new Callback[]{callback, NoOp.INSTANCE }); + } + } // create proxy to listen on writeReplace method calls - return Enhancer.create(clazz, new Class[]{EntitySerializer.class }, new CallbackFilter() + Object proxy = Enhancer.create(clazz, new Class[]{EntitySerializer.class }, new CallbackFilter() { public int accept(Method method) @@ -152,6 +183,10 @@ } }, new Callback[]{callback, NoOp.INSTANCE }); + + // store proxy + proxies.put(clazz, ((Factory)proxy).newInstance(new Callback[]{EmptyMethodInterceptor.INSTANCE, NoOp.INSTANCE })); + return proxy; } catch (Throwable t) { @@ -161,7 +196,6 @@ } /** - * * {@inheritDoc} */ @SuppressWarnings("unchecked") @@ -174,8 +208,17 @@ { return null; } - else if (original.getClass().isPrimitive()) + + if (processed.get() == null) { + processed.set(new ArrayList<Object>()); + } + + // add to processed objects + processed.get().add(original); + + if (original.getClass().isPrimitive()) + { return original; } else if (original.getClass().isArray()) @@ -214,8 +257,8 @@ // cycle on bean fields ReflectionUtils.doWithFields(original.getClass(), new ReflectionUtils.FieldCallback() { + /** - * * {@inheritDoc} */ public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException @@ -229,10 +272,7 @@ // get new value Object newValue = null; - if ((oldValue instanceof HibernateProxy && ((HibernateProxy) oldValue) - .getHibernateLazyInitializer() - .isUninitialized()) - || oldValue instanceof PersistentCollection) + if (oldValue instanceof HibernateProxy || oldValue instanceof PersistentCollection) { // if this field is a hibernate proxy or a persistent collection store reference LazyReference lazyRef = new LazyReference(); @@ -240,7 +280,9 @@ lazyRef.setClassName(original.getClass().getName()); lazyRef.setFieldName(field.getName()); // load id - lazyRef.setId(sessionFactory.getClassMetadata(original.getClass()).getIdentifier(original, EntityMode.POJO)); + lazyRef.setId(sessionFactory.getClassMetadata(original.getClass()).getIdentifier( + original, + EntityMode.POJO)); // get proxy for lazy newValue = SerializationInterceptor.getEnhancedObject(oldValue, sessionFactory, lazyRef); Modified: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java 2007-10-16 11:00:26 UTC (rev 466) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java 2007-10-16 13:45:42 UTC (rev 467) @@ -51,6 +51,12 @@ @SuppressWarnings("unchecked") public Object invoke(final String className, final String methodName, final Serializable id) throws RemoteException { + return invoke(className, methodName, id, true); + } + + private Object invoke(final String className, final String methodName, final Serializable id, final boolean init) + throws RemoteException + { try { HibernateTemplate ht = new HibernateTemplate(sessionFactory); @@ -63,7 +69,10 @@ { Object entity = sessionFactory.getCurrentSession().load(Class.forName(className), id); Object retVal = PropertyUtils.getProperty(entity, methodName); - Hibernate.initialize(retVal); + if (init) + { + return init(retVal); + } return retVal; } catch (Exception ex) @@ -80,6 +89,56 @@ } } + @SuppressWarnings("unchecked") + private Object init(Object o) + { + if (o == null) + { + return null; + } + + // get class + if (o instanceof HibernateProxy) + { + Hibernate.initialize(o); + return o; + } + + if (o instanceof List) + { + return new ArrayList((List) o); + } + + if (o instanceof SortedSet) + { + PersistentSortedSet pss = (PersistentSortedSet) o; + SortedSet ss = new TreeSet(pss.comparator()); + ss.addAll((Collection) o); + return ss; + } + + if (o instanceof Set) + { + return new HashSet((Collection) o); + } + + if (o instanceof SortedMap) + { + PersistentSortedMap psm = (PersistentSortedMap) o; + SortedMap sm = new TreeMap(psm.comparator()); + sm.putAll((Map) o); + return sm; + } + + if (o instanceof Map) + { + return new HashMap((Map) o); + } + + // it should never reach this line... + return null; + } + /** * {@inheritDoc} */ @@ -90,7 +149,7 @@ try { // get lazy prop - final Object lazy = invoke(className, propertyName, id); + final Object lazy = invoke(className, propertyName, id, false); if (lazy == null) { @@ -101,9 +160,9 @@ Class fClass = lazy.getClass(); // if is a single object proxy - if (fClass.isAssignableFrom(HibernateProxy.class)) + if (lazy instanceof HibernateProxy) { - return lazy; + return init(lazy); } else { @@ -119,38 +178,9 @@ } // the list is already right and can be processed - if (from <= 0 && size <= count) + if (from <= 0 && size >= count) { - // could be clean and returned - if (lazy instanceof List) - { - return new ArrayList((List) lazy); - } - if (lazy instanceof SortedSet) - { - PersistentSortedSet pss = (PersistentSortedSet) lazy; - SortedSet ss = new TreeSet(pss.comparator()); - ss.addAll((Collection) lazy); - return ss; - } - if (lazy instanceof Set) - { - return new HashSet((Collection) lazy); - } - if (lazy instanceof SortedMap) - { - PersistentSortedMap psm = (PersistentSortedMap) lazy; - SortedMap sm = new TreeMap(psm.comparator()); - sm.putAll((Map) lazy); - return sm; - } - if (lazy instanceof Map) - { - return new HashMap((Map) lazy); - } - - // it should never reach this line... - return null; + return init(lazy); } } @@ -176,24 +206,24 @@ return null; } - if (fClass.isAssignableFrom(PersistentCollection.class)) + if (lazy instanceof PersistentCollection) { - if (fClass.isAssignableFrom(List.class)) + if (lazy instanceof List) { return list; } - if (fClass.isAssignableFrom(SortedSet.class)) + if (lazy instanceof SortedSet) { - PersistentSortedSet pss = (PersistentSortedSet) invoke(className, propertyName, id); + PersistentSortedSet pss = (PersistentSortedSet) lazy; SortedSet ss = new TreeSet(pss.comparator()); ss.addAll(list); return ss; } - if (fClass.isAssignableFrom(Set.class)) + if (lazy instanceof Set) { return new HashSet(list); } - if (fClass.isAssignableFrom(SortedMap.class)) + if (lazy instanceof SortedMap) { PersistentSortedMap psm = (PersistentSortedMap) invoke(className, propertyName, id); SortedMap sm = new TreeMap(psm.comparator()); @@ -204,7 +234,7 @@ } return sm; } - if (fClass.isAssignableFrom(Map.class)) + if (lazy instanceof Map) { Map m = new HashMap(); for (Object o : list) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2007-10-16 11:00:27
|
Revision: 466 http://openutils.svn.sourceforge.net/openutils/?rev=466&view=rev Author: molaschi Date: 2007-10-16 04:00:26 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Adding module for rmi hibernate lazy loading in spring context Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/openutils-spring-rmibernate/ trunk/openutils-spring-rmibernate/.checkstyle trunk/openutils-spring-rmibernate/.classpath trunk/openutils-spring-rmibernate/.project trunk/openutils-spring-rmibernate/.settings/ trunk/openutils-spring-rmibernate/.settings/org.eclipse.jdt.core.prefs trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.component trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.project.facet.core.xml trunk/openutils-spring-rmibernate/pom.xml trunk/openutils-spring-rmibernate/src/ trunk/openutils-spring-rmibernate/src/main/ trunk/openutils-spring-rmibernate/src/main/java/ trunk/openutils-spring-rmibernate/src/main/java/it/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/HibernateRmiProxyFactoryBean.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/aspects/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/aspects/HibernateLazyLoaderAspect.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/pagination/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/pagination/Paginator.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/util/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/util/EntitySerializer.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/exporter/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/exporter/HibernateRmiServiceExporter.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/LazyReference.java trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/managers/ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/managers/HibernateLazyService.java trunk/openutils-spring-rmibernate/src/test/ trunk/openutils-spring-rmibernate/src/test/java/ Added: trunk/openutils-spring-rmibernate/.checkstyle =================================================================== --- trunk/openutils-spring-rmibernate/.checkstyle (rev 0) +++ trunk/openutils-spring-rmibernate/.checkstyle 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,6 @@ +<fileset-config file-format-version="1.2.0" simple-config="true"> + <fileset name="all" enabled="true" check-config-name="project" local="false"> + <file-match-pattern match-pattern="." include-pattern="true" /> + </fileset> + <filter name="NonSrcDirs" enabled="true" /> +</fileset-config> \ No newline at end of file Added: trunk/openutils-spring-rmibernate/.classpath =================================================================== --- trunk/openutils-spring-rmibernate/.classpath (rev 0) +++ trunk/openutils-spring-rmibernate/.classpath 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/asm/asm/2.2.3/asm-2.2.3.jar" sourcepath="M2_REPO/asm/asm/2.2.3/asm-2.2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar" sourcepath="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/2.0.6/spring-beans-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/2.0.6/spring-aop-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-remoting/2.0.6/spring-remoting-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-web/2.0.6/spring-web-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.4.1/slf4j-api-1.4.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.4.1/slf4j-api-1.4.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-hibernate3/2.0.6/spring-hibernate3-2.0.6.jar" sourcepath="/M2_REPO/org/springframework/spring-hibernate3/2.0.1/spring-hibernate3-2.0.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar" sourcepath="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.4.ga/hibernate-3.2.4.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate/3.2.4.ga/hibernate-3.2.4.ga-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-jdbc/2.0.6/spring-jdbc-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar" sourcepath="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/2.0.6/spring-core-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl104-over-slf4j/1.4.1/jcl104-over-slf4j-1.4.1.jar" sourcepath="M2_REPO/org/slf4j/jcl104-over-slf4j/1.4.1/jcl104-over-slf4j-1.4.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/2.0.6/spring-context-2.0.6.jar"/> + <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.4.1/slf4j-log4j12-1.4.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.4.1/slf4j-log4j12-1.4.1-sources.jar"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Added: trunk/openutils-spring-rmibernate/.project =================================================================== --- trunk/openutils-spring-rmibernate/.project (rev 0) +++ trunk/openutils-spring-rmibernate/.project 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,26 @@ +<projectDescription> + <name>openutils-spring-rmibernate</name> + <comment>openutils base Spring-Hibernate RMI remote lazy loading support</comment> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + </buildCommand> + <buildCommand> + <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature> + </natures> +</projectDescription> \ No newline at end of file Added: trunk/openutils-spring-rmibernate/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/openutils-spring-rmibernate/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/openutils-spring-rmibernate/.settings/org.eclipse.jdt.core.prefs 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,5 @@ +#Tue Oct 16 10:42:53 CEST 2007 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 Added: trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.component =================================================================== --- trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.component (rev 0) +++ trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.component 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,5 @@ +<project-modules id="moduleCoreId" project-version="1.5.0"> + <wb-module deploy-name="openutils-spring-rmibernate"> + <wb-resource deploy-path="/" source-path="src/main/java"/> + </wb-module> +</project-modules> \ No newline at end of file Added: trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.project.facet.core.xml =================================================================== --- trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0) +++ trunk/openutils-spring-rmibernate/.settings/org.eclipse.wst.common.project.facet.core.xml 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,6 @@ +<faceted-project> + <fixed facet="jst.java"/> + <fixed facet="jst.utility"/> + <installed facet="jst.utility" version="1.0"/> + <installed facet="jst.java" version="5.0"/> +</faceted-project> \ No newline at end of file Added: trunk/openutils-spring-rmibernate/pom.xml =================================================================== --- trunk/openutils-spring-rmibernate/pom.xml (rev 0) +++ trunk/openutils-spring-rmibernate/pom.xml 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,122 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-spring-rmibernate</artifactId> + <name>openutils base Spring-Hibernate RMI remote lazy loading support</name> + <version>1.0.0-SNAPSHOT</version> + <description>openutils base Spring-Hibernate RMI remote lazy loading support</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <!-- replaces commons-logging --> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-remoting</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + <version>3.2.4.ga</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>cglib</groupId> + <artifactId>cglib</artifactId> + </exclusion> + <exclusion> + <groupId>asm</groupId> + <artifactId>asm</artifactId> + </exclusion> + <exclusion> + <groupId>asm</groupId> + <artifactId>asm-attrs</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.1</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib-nodep</artifactId> + <version>2.1_3</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm</artifactId> + <version>2.2.3</version> + </dependency> + </dependencies> +</project> \ No newline at end of file Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/HibernateRmiProxyFactoryBean.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/HibernateRmiProxyFactoryBean.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/HibernateRmiProxyFactoryBean.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,54 @@ +package it.openutils.spring.rmibernate.client; + +import it.openutils.spring.rmibernate.shared.managers.HibernateLazyService; + +import org.aopalliance.intercept.MethodInvocation; +import org.springframework.remoting.rmi.RmiProxyFactoryBean; + + +/** + * ProxyFactoryBean for automatic injection of remote lazy loading proxies + * @author mmolaschi + * @version $Id: $ + */ +public class HibernateRmiProxyFactoryBean extends RmiProxyFactoryBean +{ + + /** + * Store the hibernate lazy service to be used by remote lazy loading + */ + public static ThreadLocal<HibernateLazyService> hibernateLazyServiceTL = new ThreadLocal<HibernateLazyService>(); + + private HibernateLazyService hibernateLazyService; + + /** + * {@inheritDoc} + */ + @Override + public Object invoke(MethodInvocation invocation) throws Throwable + { + // store the lazy service for this thread + if (hibernateLazyService == null) + { + // if hibernateLazyService is null this means that this service IS hibernateLazyService + hibernateLazyServiceTL.set((HibernateLazyService)this.getObject()); + } + else + { + hibernateLazyServiceTL.set(hibernateLazyService); + } + + // proceed with rmi call + return super.invoke(invocation); + } + + /** + * Sets the hibernateLazyService. + * @param hibernateLazyService the hibernateLazyService to set + */ + public void setHibernateLazyService(HibernateLazyService hibernateLazyService) + { + this.hibernateLazyService = hibernateLazyService; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/aspects/HibernateLazyLoaderAspect.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/aspects/HibernateLazyLoaderAspect.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/aspects/HibernateLazyLoaderAspect.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,75 @@ +package it.openutils.spring.rmibernate.client.aspects; + +import it.openutils.spring.rmibernate.client.HibernateRmiProxyFactoryBean; +import it.openutils.spring.rmibernate.client.pagination.Paginator; +import it.openutils.spring.rmibernate.shared.managers.HibernateLazyService; + +import java.io.Serializable; + +import net.sf.cglib.proxy.LazyLoader; + + +/** + * Aspect that does remote lazy loading on cglib proxy + * @author mmolaschi + * @version $Id: $ + */ +public class HibernateLazyLoaderAspect implements LazyLoader, Serializable +{ + + private static ThreadLocal<Paginator> paginator = new ThreadLocal<Paginator>(); + + private String className; + + private String fieldName; + + private Serializable id; + + /** + * Constructor + * @param className parent class name + * @param fieldName field to be lazy loaded + * @param id id of current entity + */ + public HibernateLazyLoaderAspect(String className, String fieldName, Serializable id) + { + this.className = className; + this.fieldName = fieldName; + this.id = id; + } + + /** + * Set pagination for next calls in current thread + * @param from starting row number + * @param size max number of rows + */ + public static void setPagination(int from, int size) + { + paginator.set(new Paginator(from, size)); + } + + /** + * Disable pagination for next calls in current thread + */ + public static void resetPagination() + { + paginator.set(null); + } + + /** + * {@inheritDoc} + */ + public Object loadObject() throws Exception + { + // Load from remote + HibernateLazyService hls = HibernateRmiProxyFactoryBean.hibernateLazyServiceTL.get(); + + if (paginator.get() != null) + { + return hls.invoke(className, fieldName, id, paginator.get().getFrom(), paginator.get().getSize()); + } + + return hls.invoke(className, fieldName, id); + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/pagination/Paginator.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/pagination/Paginator.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/client/pagination/Paginator.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,68 @@ +package it.openutils.spring.rmibernate.client.pagination; + +/** + * @author mmolaschi + * @version $Id: $ + */ +public class Paginator +{ + + private int from; + + private int size; + + /** + * + */ + public Paginator() + { + + } + + /** + * @param from starting row number + * @param size max rows + */ + public Paginator(int from, int size) + { + this.from = from; + this.size = size; + } + + /** + * Get starting row number + * @return starting row number + */ + public int getFrom() + { + return from; + } + + /** + * Set starting row number + * @param from starting row number + */ + public void setFrom(int from) + { + this.from = from; + } + + /** + * Get max number of rows + * @return max number of rows + */ + public int getSize() + { + return size; + } + + /** + * Set max number of rows + * @param size max number of rows + */ + public void setSize(int size) + { + this.size = size; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/HibernateLazyRmiInterceptor.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,57 @@ +package it.openutils.spring.rmibernate.server.aspects; + +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.hibernate.SessionFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Main server interceptor on rmi calls + * @author mmolaschi + * @version $Id: $ + */ +public class HibernateLazyRmiInterceptor implements MethodInterceptor +{ + + /** + * log + */ + protected static final Logger logger = LoggerFactory.getLogger(HibernateLazyRmiInterceptor.class); + + private SessionFactory sessionFactory; + + /** + * Contructor + * @param sessionFactory hibernate session factory + */ + public HibernateLazyRmiInterceptor(SessionFactory sessionFactory) + { + this.sessionFactory = sessionFactory; + } + + /** + * {@inheritDoc} + */ + public Object invoke(MethodInvocation invocation) throws Throwable + { + try + { + Object retVal = invocation.proceed(); + + // Proxy class for serialization work + return SerializationInterceptor.getEnhancedObject(retVal, sessionFactory); + } + catch (Throwable ex) + { + if (logger.isInfoEnabled()) + { + logger.info("Processing of " + " remote call resulted in exception: ", ex); + } + + throw ex; + } + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/LazyReferenceAspect.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,41 @@ +package it.openutils.spring.rmibernate.server.aspects; + +import it.openutils.spring.rmibernate.shared.LazyReference; + +import java.lang.reflect.Method; + +import net.sf.cglib.proxy.MethodInterceptor; +import net.sf.cglib.proxy.MethodProxy; + + +/** + * Aspect on lazy fields to intercept writeReplace + * @author mmolaschi + * @version $Id: $ + */ +public class LazyReferenceAspect implements MethodInterceptor +{ + + private LazyReference lazyReference; + + public LazyReference getLazyReference() + { + return lazyReference; + } + + + public void setLazyReference(LazyReference lazyReference) + { + this.lazyReference = lazyReference; + } + + /** + * {@inheritDoc} + */ + public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable + { + // TODO Auto-generated method stub + return lazyReference; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,292 @@ +package it.openutils.spring.rmibernate.server.aspects; + +import it.openutils.spring.rmibernate.server.aspects.util.EntitySerializer; +import it.openutils.spring.rmibernate.shared.LazyReference; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +import net.sf.cglib.proxy.Callback; +import net.sf.cglib.proxy.CallbackFilter; +import net.sf.cglib.proxy.Enhancer; +import net.sf.cglib.proxy.MethodInterceptor; +import net.sf.cglib.proxy.MethodProxy; +import net.sf.cglib.proxy.NoOp; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.collections.SetUtils; +import org.apache.commons.collections.Transformer; +import org.hibernate.EntityMode; +import org.hibernate.SessionFactory; +import org.hibernate.collection.PersistentCollection; +import org.hibernate.proxy.HibernateProxy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.ReflectionUtils; + + +/** + * Proxy object with {@link EntitySerializer} and Intercept writeReplace calls + * @author mmolaschi + * @version $Id: $ + */ +public class SerializationInterceptor implements MethodInterceptor +{ + + /** + * log + */ + private static Logger log = LoggerFactory.getLogger(SerializationInterceptor.class); + + /** + * non proxied object + */ + private Object original; + + /** + * hibernate sessionfactory + */ + private SessionFactory sessionFactory; + + /** + * Constructor + * @param o object to be proxied + * @param sessionFactory hibernate sessionfactory + */ + private SerializationInterceptor(Object o, SessionFactory sessionFactory) + { + this.original = o; + this.sessionFactory = sessionFactory; + } + + /** + * Get proxy object intercepting writeReplace calls + * @param o object to be proxied + * @param sessionFactory hibernate sessionfactory + * @return proxied object + */ + public static Object getEnhancedObject(Object o, SessionFactory sessionFactory) + { + return getEnhancedObject(o, sessionFactory, null); + } + + /** + * Get proxy object intercepting writeReplace calls + * @param o object to be proxied + * @param sessionFactory hibernate sessionfactory + * @param lazyRef reference to a lazy field + * @return proxied object + */ + public static Object getEnhancedObject(Object o, SessionFactory sessionFactory, LazyReference lazyRef) + { + if (o == null) + { + return null; + } + + // check if there is an empty constructor + try + { + o.getClass().getConstructor(new Class[]{}); + } + catch (NoSuchMethodException ex) + { + return o; + } + + // check if object can be subclassed + if (Modifier.isFinal(o.getClass().getModifiers())) + { + return o; + } + + try + { + // get class + Class clazz = o.getClass(); + + // if it is an hibernateproxy get superclass + if (o instanceof HibernateProxy) + { + clazz = o.getClass().getSuperclass(); + if (clazz == null) + { + clazz = o.getClass().getInterfaces()[0]; + } + } + + Callback callback = null; + + // if this is a lazy field user lazyreferenceaspect + if (lazyRef != null) + { + LazyReferenceAspect lra = new LazyReferenceAspect(); + lra.setLazyReference(lazyRef); + callback = lra; + } + else + { + // user default interceptor + callback = new SerializationInterceptor(o, sessionFactory); + } + + // create proxy to listen on writeReplace method calls + return Enhancer.create(clazz, new Class[]{EntitySerializer.class }, new CallbackFilter() + { + + public int accept(Method method) + { + if (method.getName().equals("writeReplace")) + { + return 0; + } + else + { + return 1; + } + } + + }, new Callback[]{callback, NoOp.INSTANCE }); + } + catch (Throwable t) + { + log.warn(t.getMessage(), t); + return o; + } + } + + /** + * + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable + { + + try + { + if (original == null) + { + return null; + } + else if (original.getClass().isPrimitive()) + { + return original; + } + else if (original.getClass().isArray()) + { + // replace array entries with proxied ones + Object[] array = (Object[]) original; + for (int i = 0; i < array.length; i++) + { + array[i] = SerializationInterceptor.getEnhancedObject(array[i], sessionFactory); + } + return array; + } + else if (original instanceof Collection) + { + // replace collection entries with proxied ones + Collection collection = (Collection) original; + CollectionUtils.transform(collection, transformer(sessionFactory)); + return collection; + } + else if (original instanceof Map) + { + // replace map entries with proxied ones + Map map = (Map) original; + MapUtils.transformedMap(map, transformer(sessionFactory), transformer(sessionFactory)); + return map; + } + else if (original instanceof Set) + { + // replace set entries with proxied ones + Set set = (Set) original; + SetUtils.transformedSet(set, transformer(sessionFactory)); + return set; + } + else + { + // cycle on bean fields + ReflectionUtils.doWithFields(original.getClass(), new ReflectionUtils.FieldCallback() + { + /** + * + * {@inheritDoc} + */ + public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException + { + // set field accessible + field.setAccessible(true); + + // get original value + Object oldValue = field.get(original); + + // get new value + Object newValue = null; + + if ((oldValue instanceof HibernateProxy && ((HibernateProxy) oldValue) + .getHibernateLazyInitializer() + .isUninitialized()) + || oldValue instanceof PersistentCollection) + { + // if this field is a hibernate proxy or a persistent collection store reference + LazyReference lazyRef = new LazyReference(); + lazyRef.setFieldClassName(field.getType().getName()); + lazyRef.setClassName(original.getClass().getName()); + lazyRef.setFieldName(field.getName()); + // load id + lazyRef.setId(sessionFactory.getClassMetadata(original.getClass()).getIdentifier(original, EntityMode.POJO)); + + // get proxy for lazy + newValue = SerializationInterceptor.getEnhancedObject(oldValue, sessionFactory, lazyRef); + } + else + { + // get default proxy + newValue = SerializationInterceptor.getEnhancedObject(oldValue, sessionFactory); + } + + // if there is a variation store it + if (newValue != oldValue) + { + field.set(original, newValue); + } + } + + }); + } + + return original; + + } + catch (Throwable t) + { + log.error(t.getMessage(), t); + return original; + } + } + + /** + * Get transformer for collection, map or set injection of proxied objects + * @param factory hibernate session factory + * @return transformer + */ + private Transformer transformer(SessionFactory factory) + { + return new Transformer() + { + + public Object transform(Object input) + { + return SerializationInterceptor.getEnhancedObject(input, sessionFactory); + } + + }; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/util/EntitySerializer.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/util/EntitySerializer.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/util/EntitySerializer.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,19 @@ +package it.openutils.spring.rmibernate.server.aspects.util; + +import java.io.ObjectStreamException; + +/** + * Interface for intercepting writeReplace method calls + * @author mmolaschi + * @version $Id: $ + */ +public interface EntitySerializer +{ + /** + * Write alternative object on serialization + * @return alternative object + * @throws ObjectStreamException error writing + */ + Object writeReplace() throws ObjectStreamException; + +} \ No newline at end of file Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/exporter/HibernateRmiServiceExporter.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/exporter/HibernateRmiServiceExporter.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/exporter/HibernateRmiServiceExporter.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,54 @@ +package it.openutils.spring.rmibernate.server.exporter; + +import it.openutils.spring.rmibernate.server.aspects.HibernateLazyRmiInterceptor; + +import org.hibernate.SessionFactory; +import org.springframework.aop.framework.ProxyFactory; +import org.springframework.remoting.rmi.RmiServiceExporter; +import org.springframework.remoting.support.RemoteInvocationTraceInterceptor; +import org.springframework.util.ClassUtils; + + +/** + * Rmi exporter that checks laziness of bean fields in all object graph + * @author mmolaschi + * @version $Id: $ + */ +public class HibernateRmiServiceExporter extends RmiServiceExporter +{ + + /** + * hibernate sessionfactory + */ + private SessionFactory sessionFactory; + + /** + * {@inheritDoc} + */ + @Override + protected Object getProxyForService() + { + checkService(); + checkServiceInterface(); + ProxyFactory proxyFactory = new ProxyFactory(); + proxyFactory.addInterface(getServiceInterface()); + if (isRegisterTraceInterceptor()) + { + proxyFactory.addAdvice(new RemoteInvocationTraceInterceptor(getExporterName())); + } + // add interceptor for lazy work + proxyFactory.addAdvice(new HibernateLazyRmiInterceptor(sessionFactory)); + proxyFactory.setTarget(getService()); + return proxyFactory.getProxy(ClassUtils.getDefaultClassLoader()); + } + + /** + * Set hibernate session factory + * @param sessionFactory hibernate sessionfactory + */ + public void setSessionFactory(SessionFactory sessionFactory) + { + this.sessionFactory = sessionFactory; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/managers/HibernateLazyServiceImpl.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,287 @@ +package it.openutils.spring.rmibernate.server.managers; + +import it.openutils.spring.rmibernate.shared.managers.HibernateLazyService; + +import java.io.Serializable; +import java.rmi.RemoteException; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedMap; +import java.util.SortedSet; +import java.util.TreeMap; +import java.util.TreeSet; + +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.lang.StringUtils; +import org.hibernate.Hibernate; +import org.hibernate.HibernateException; +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.collection.PersistentCollection; +import org.hibernate.collection.PersistentSortedMap; +import org.hibernate.collection.PersistentSortedSet; +import org.hibernate.proxy.HibernateProxy; +import org.springframework.orm.hibernate3.HibernateCallback; +import org.springframework.orm.hibernate3.HibernateTemplate; + + +/** + * Server side implementation of remote lazy loading calls + * @author mmolaschi + * @version $Id: $ + */ +public class HibernateLazyServiceImpl implements HibernateLazyService +{ + + /** + * hibernate sessionfactory + */ + private SessionFactory sessionFactory; + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public Object invoke(final String className, final String methodName, final Serializable id) throws RemoteException + { + try + { + HibernateTemplate ht = new HibernateTemplate(sessionFactory); + return ht.execute(new HibernateCallback() + { + + public Object doInHibernate(Session session) throws HibernateException, SQLException + { + try + { + Object entity = sessionFactory.getCurrentSession().load(Class.forName(className), id); + Object retVal = PropertyUtils.getProperty(entity, methodName); + Hibernate.initialize(retVal); + return retVal; + } + catch (Exception ex) + { + throw new HibernateException(ex); + } + } + + }); + } + catch (HibernateException ex) + { + throw new RemoteException(ex.getMessage(), ex); + } + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public Object invoke(final String className, final String propertyName, final Serializable id, final int from, + final int size) throws RemoteException + { + try + { + // get lazy prop + final Object lazy = invoke(className, propertyName, id); + + if (lazy == null) + { + return null; + } + + // get class + Class fClass = lazy.getClass(); + + // if is a single object proxy + if (fClass.isAssignableFrom(HibernateProxy.class)) + { + return lazy; + } + else + { + // it's a list + + // calculate list size + long count = this.count(className, propertyName, id); + + // no row at desired rownum + if (from > count) + { + return null; + } + + // the list is already right and can be processed + if (from <= 0 && size <= count) + { + // could be clean and returned + if (lazy instanceof List) + { + return new ArrayList((List) lazy); + } + if (lazy instanceof SortedSet) + { + PersistentSortedSet pss = (PersistentSortedSet) lazy; + SortedSet ss = new TreeSet(pss.comparator()); + ss.addAll((Collection) lazy); + return ss; + } + if (lazy instanceof Set) + { + return new HashSet((Collection) lazy); + } + if (lazy instanceof SortedMap) + { + PersistentSortedMap psm = (PersistentSortedMap) lazy; + SortedMap sm = new TreeMap(psm.comparator()); + sm.putAll((Map) lazy); + return sm; + } + if (lazy instanceof Map) + { + return new HashMap((Map) lazy); + } + + // it should never reach this line... + return null; + } + } + + // filter collection + HibernateTemplate ht = new HibernateTemplate(sessionFactory); + List list = ht.executeFind(new HibernateCallback() + { + + public Object doInHibernate(Session session) throws HibernateException, SQLException + { + Query q = session.createFilter(lazy, ""); + q.setMaxResults(size); + q.setFirstResult(from); + + return q.list(); + } + + }); + + // process list + if (list == null || list.size() == 0) + { + return null; + } + + if (fClass.isAssignableFrom(PersistentCollection.class)) + { + if (fClass.isAssignableFrom(List.class)) + { + return list; + } + if (fClass.isAssignableFrom(SortedSet.class)) + { + PersistentSortedSet pss = (PersistentSortedSet) invoke(className, propertyName, id); + SortedSet ss = new TreeSet(pss.comparator()); + ss.addAll(list); + return ss; + } + if (fClass.isAssignableFrom(Set.class)) + { + return new HashSet(list); + } + if (fClass.isAssignableFrom(SortedMap.class)) + { + PersistentSortedMap psm = (PersistentSortedMap) invoke(className, propertyName, id); + SortedMap sm = new TreeMap(psm.comparator()); + for (Object o : list) + { + Object[] array = (Object[]) o; + sm.put(array[0], array[1]); + } + return sm; + } + if (fClass.isAssignableFrom(Map.class)) + { + Map m = new HashMap(); + for (Object o : list) + { + Object[] array = (Object[]) o; + m.put(array[0], array[1]); + } + return m; + } + } + + // it should never reach this point ?!?! + return null; + } + catch (Exception ex) + { + throw new RemoteException("Error lazy loading", ex); + } + } + + /** + * {@inheritDoc} + */ + public long count(final String className, final String propertyName, final Serializable id) throws RemoteException + { + HibernateTemplate ht = new HibernateTemplate(sessionFactory); + return ((Number) ht.execute(new HibernateCallback() + { + + public Object doInHibernate(Session session) throws HibernateException, SQLException + { + StringBuilder query = getBaseQuery(className, propertyName, true); + Query q = session.createQuery(query.toString()); + q.setParameter(0, id); + + return q.uniqueResult(); + } + + })).longValue(); + } + + private StringBuilder getBaseQuery(String className, String propertyName, boolean count) + { + String entityName = StringUtils.substringAfterLast(className, "."); + + String propertyId = sessionFactory.getClassMetadata(className).getIdentifierPropertyName(); + + StringBuilder query = new StringBuilder("select "); + if (count) + { + query.append("count("); + } + query.append("el"); + if (count) + { + query.append(")"); + } + query + .append(" from ") + .append(entityName) + .append(" cl inner join cl.") + .append(propertyName) + .append(" el ") + .append(" where cl.") + .append(propertyId) + .append(" = ?"); + + return query; + } + + /** + * Sets the factory. + * @param factory the factory to set + */ + public void setSessionFactory(SessionFactory factory) + { + this.sessionFactory = factory; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/LazyReference.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/LazyReference.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/LazyReference.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,117 @@ +package it.openutils.spring.rmibernate.shared; + +import it.openutils.spring.rmibernate.client.aspects.HibernateLazyLoaderAspect; + +import java.io.ObjectStreamException; +import java.io.Serializable; + +import net.sf.cglib.proxy.Enhancer; + + +/** + * Store lazy reference + * @author mmolaschi + * @version $Id: $ + */ +public class LazyReference implements Serializable +{ + + private Serializable id; + + private String fieldName; + + private String className; + + private String fieldClassName; + + /** + * default constructor + */ + public LazyReference() + { + + } + + /** + * Constructor + * @param className className + * @param fieldName fieldName + * @param fieldClassName fieldClassName + * @param id id of current entity + */ + public LazyReference(String className, String fieldName, String fieldClassName, Serializable id) + { + this.className = className; + this.fieldName = fieldName; + this.fieldClassName = fieldClassName; + this.id = id; + } + + /** + * Called on deserialization, creates proxy for remote lazy loading + * @return proxy for remote lazy loading + * @throws ObjectStreamException exception reading + * @throws ClassNotFoundException class not found + */ + @SuppressWarnings("unchecked") + Object readResolve() throws ObjectStreamException, ClassNotFoundException + { + // get proxy superclass + Class superclass = Class.forName(fieldClassName); + Class[] interfaces = null; + // if superclass is an interface add it to interfaces + if (superclass.isInterface()) + { + interfaces = new Class[]{superclass}; + } + // return proxy + return Enhancer.create( + superclass, + interfaces, + new HibernateLazyLoaderAspect(className, fieldName, id)); + + } + + public String getClassName() + { + return className; + } + + public void setClassName(String className) + { + this.className = className; + } + + public Serializable getId() + { + return id; + } + + public void setId(Serializable id) + { + this.id = id; + } + + public String getFieldName() + { + return fieldName; + } + + public void setFieldName(String fieldName) + { + this.fieldName = fieldName; + } + + + public String getFieldClassName() + { + return fieldClassName; + } + + + public void setFieldClassName(String fieldClassName) + { + this.fieldClassName = fieldClassName; + } + +} Added: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/managers/HibernateLazyService.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/managers/HibernateLazyService.java (rev 0) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/shared/managers/HibernateLazyService.java 2007-10-16 11:00:26 UTC (rev 466) @@ -0,0 +1,45 @@ +package it.openutils.spring.rmibernate.shared.managers; + +import java.io.Serializable; +import java.rmi.RemoteException; + + +/** + * Interface for server-side remote lazy loading calls + * @author mmolaschi + * @version $Id: $ + */ +public interface HibernateLazyService +{ + /** + * Invoke remote lazy loading + * @param className name of parent class + * @param propertyName name of property to load + * @param id current entity id + * @return loaded object / collection + * @throws RemoteException error + */ + Object invoke(String className, String propertyName, Serializable id) throws RemoteException; + + /** + * Invoke remote lazy loading + * @param className name of parent class + * @param propertyName name of property to load + * @param id current entity id + * @param from starting row number + * @param size max rows to return + * @return loaded object / collection + * @throws RemoteException error + */ + Object invoke(String className, String propertyName, Serializable id, int from, int size) throws RemoteException; + + /** + * Get collection size + * @param className name of parent class + * @param propertyName name of property to load + * @param id current entity id + * @return loaded object / collection + * @throws RemoteException error + */ + long count(String className, String propertyName, Serializable id) throws RemoteException; +} Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-10-11 22:39:15 UTC (rev 465) +++ trunk/pom.xml 2007-10-16 11:00:26 UTC (rev 466) @@ -214,5 +214,6 @@ <module>openutils-hibernate-security</module> <module>openutils-mgnlspring</module> <module>openutils-mgnlstripes</module> + <module>openutils-spring-rmibernate</module> </modules> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-10-11 22:39:11
|
Revision: 465 http://openutils.svn.sourceforge.net/openutils/?rev=465&view=rev Author: fgiust Date: 2007-10-11 15:39:15 -0700 (Thu, 11 Oct 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-deployment/pom.xml Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-10-11 22:39:05 UTC (rev 464) +++ trunk/openutils-deployment/pom.xml 2007-10-11 22:39:15 UTC (rev 465) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-deployment</artifactId> <name>openutils deployment tools</name> - <version>1.0.10</version> + <version>1.0.11-SNAPSHOT</version> <description /> <properties> <spring.version>2.0.6</spring.version> @@ -68,10 +68,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.10</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.10</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-deployment-1.0.10</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-10-11 22:39:04
|
Revision: 464 http://openutils.svn.sourceforge.net/openutils/?rev=464&view=rev Author: fgiust Date: 2007-10-11 15:39:05 -0700 (Thu, 11 Oct 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-deployment-1.0.10 Added Paths: ----------- tags/openutils-deployment-1.0.10/ tags/openutils-deployment-1.0.10/pom.xml Removed Paths: ------------- tags/openutils-deployment-1.0.10/pom.xml Copied: tags/openutils-deployment-1.0.10 (from rev 462, trunk/openutils-deployment) Deleted: tags/openutils-deployment-1.0.10/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-10-11 22:37:47 UTC (rev 462) +++ tags/openutils-deployment-1.0.10/pom.xml 2007-10-11 22:39:05 UTC (rev 464) @@ -1,72 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-deployment</artifactId> - <name>openutils deployment tools</name> - <version>1.0.10-SNAPSHOT</version> - <description /> - <properties> - <spring.version>2.0.6</spring.version> - </properties> - <dependencies> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring.version}</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.4.1</version> - </dependency> - <dependency> - <!-- replaces commons-logging --> - <groupId>org.slf4j</groupId> - <artifactId>jcl104-over-slf4j</artifactId> - <version>1.4.1</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.0</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-deployment-1.0.10/pom.xml (from rev 463, trunk/openutils-deployment/pom.xml) =================================================================== --- tags/openutils-deployment-1.0.10/pom.xml (rev 0) +++ tags/openutils-deployment-1.0.10/pom.xml 2007-10-11 22:39:05 UTC (rev 464) @@ -0,0 +1,77 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-deployment</artifactId> + <name>openutils deployment tools</name> + <version>1.0.10</version> + <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>${spring.version}</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <!-- replaces commons-logging --> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.10</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.10</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-deployment-1.0.10</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-10-11 22:38:49
|
Revision: 463 http://openutils.svn.sourceforge.net/openutils/?rev=463&view=rev Author: fgiust Date: 2007-10-11 15:38:54 -0700 (Thu, 11 Oct 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-deployment-1.0.10 Modified Paths: -------------- trunk/openutils-deployment/pom.xml Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-10-11 22:37:47 UTC (rev 462) +++ trunk/openutils-deployment/pom.xml 2007-10-11 22:38:54 UTC (rev 463) @@ -1,5 +1,4 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -9,7 +8,7 @@ </parent> <artifactId>openutils-deployment</artifactId> <name>openutils deployment tools</name> - <version>1.0.10-SNAPSHOT</version> + <version>1.0.10</version> <description /> <properties> <spring.version>2.0.6</spring.version> @@ -69,4 +68,10 @@ <scope>test</scope> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.10</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.10</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-deployment-1.0.10</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-10-11 22:37:44
|
Revision: 462 http://openutils.svn.sourceforge.net/openutils/?rev=462&view=rev Author: fgiust Date: 2007-10-11 15:37:47 -0700 (Thu, 11 Oct 2007) Log Message: ----------- use "server" instead of "server.name" for compatibiliy with maven property filtering Modified Paths: -------------- trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/EnvironmentLog4jConfigListener.java 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 2007-09-26 12:20:58 UTC (rev 461) +++ trunk/openutils-deployment/src/main/java/it/openutils/deployment/log4j/EnvironmentLog4jConfigListener.java 2007-10-11 22:37:47 UTC (rev 462) @@ -46,6 +46,7 @@ if (servername != null) { System.setProperty("server.name", servername); + System.setProperty("server", servername); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-26 12:20:54
|
Revision: 461 http://openutils.svn.sourceforge.net/openutils/?rev=461&view=rev Author: fgiust Date: 2007-09-26 05:20:58 -0700 (Wed, 26 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-26 12:20:52 UTC (rev 460) +++ trunk/openutils-dbmigration/pom.xml 2007-09-26 12:20:58 UTC (rev 461) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-dbmigration</artifactId> <name>openutils db migration framework</name> - <version>0.7.3</version> + <version>0.7.4-SNAPSHOT</version> <description /> <properties> <spring.version>2.0.6</spring.version> @@ -86,10 +86,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.3</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.3</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-0.7.3</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-26 12:20:51
|
Revision: 460 http://openutils.svn.sourceforge.net/openutils/?rev=460&view=rev Author: fgiust Date: 2007-09-26 05:20:52 -0700 (Wed, 26 Sep 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-dbmigration-0.7.3 Added Paths: ----------- tags/openutils-dbmigration-0.7.3/ tags/openutils-dbmigration-0.7.3/pom.xml Removed Paths: ------------- tags/openutils-dbmigration-0.7.3/pom.xml Copied: tags/openutils-dbmigration-0.7.3 (from rev 457, trunk/openutils-dbmigration) Deleted: tags/openutils-dbmigration-0.7.3/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-26 12:13:36 UTC (rev 457) +++ tags/openutils-dbmigration-0.7.3/pom.xml 2007-09-26 12:20:52 UTC (rev 460) @@ -1,90 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-dbmigration</artifactId> - <name>openutils db migration framework</name> - <version>0.7.3-SNAPSHOT</version> - <description /> - <properties> - <spring.version>2.0.6</spring.version> - </properties> - <dependencies> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>1.3</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>poi</groupId> - <artifactId>poi</artifactId> - <version>2.5.1-final-20040804</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.0</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-dbmigration-0.7.3/pom.xml (from rev 459, trunk/openutils-dbmigration/pom.xml) =================================================================== --- tags/openutils-dbmigration-0.7.3/pom.xml (rev 0) +++ tags/openutils-dbmigration-0.7.3/pom.xml 2007-09-26 12:20:52 UTC (rev 460) @@ -0,0 +1,95 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-dbmigration</artifactId> + <name>openutils db migration framework</name> + <version>0.7.3</version> + <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.3</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi</artifactId> + <version>3.0-FINAL</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-0.7.3</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-26 12:20:39
|
Revision: 459 http://openutils.svn.sourceforge.net/openutils/?rev=459&view=rev Author: fgiust Date: 2007-09-26 05:20:43 -0700 (Wed, 26 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-dbmigration-0.7.3 Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-26 12:20:26 UTC (rev 458) +++ trunk/openutils-dbmigration/pom.xml 2007-09-26 12:20:43 UTC (rev 459) @@ -1,5 +1,4 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -9,7 +8,7 @@ </parent> <artifactId>openutils-dbmigration</artifactId> <name>openutils db migration framework</name> - <version>0.7.3-SNAPSHOT</version> + <version>0.7.3</version> <description /> <properties> <spring.version>2.0.6</spring.version> @@ -87,4 +86,10 @@ <scope>test</scope> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-0.7.3</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-26 12:20:22
|
Revision: 458 http://openutils.svn.sourceforge.net/openutils/?rev=458&view=rev Author: fgiust Date: 2007-09-26 05:20:26 -0700 (Wed, 26 Sep 2007) Log Message: ----------- cleaned up commons-logging dependencies Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-26 12:13:36 UTC (rev 457) +++ trunk/openutils-dbmigration/pom.xml 2007-09-26 12:20:26 UTC (rev 458) @@ -1,4 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -30,13 +31,9 @@ <version>${spring.version}</version> <exclusions> <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> </exclusions> </dependency> <dependency> @@ -45,13 +42,9 @@ <version>${spring.version}</version> <exclusions> <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> </exclusions> </dependency> <dependency> @@ -60,25 +53,32 @@ <version>${spring.version}</version> <exclusions> <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> </exclusions> </dependency> <dependency> <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> + <artifactId>slf4j-api</artifactId> + <version>1.4.1</version> </dependency> <dependency> - <groupId>poi</groupId> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> - <version>2.5.1-final-20040804</version> + <version>3.0-FINAL</version> <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>junit</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-26 12:13:32
|
Revision: 457 http://openutils.svn.sourceforge.net/openutils/?rev=457&view=rev Author: fgiust Date: 2007-09-26 05:13:36 -0700 (Wed, 26 Sep 2007) Log Message: ----------- automatically replaces tabs with spaces (tabs are converted by sqlserver) Modified Paths: -------------- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java 2007-09-26 12:12:12 UTC (rev 456) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java 2007-09-26 12:13:36 UTC (rev 457) @@ -63,6 +63,7 @@ int result = jdbcTemplate.queryForInt(checkQuery, viewName); String scriptContent = readFully(script); + scriptContent = StringUtils.replace(scriptContent, "\t", " "); if (scriptContent == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-26 12:12:09
|
Revision: 456 http://openutils.svn.sourceforge.net/openutils/?rev=456&view=rev Author: fgiust Date: 2007-09-26 05:12:12 -0700 (Wed, 26 Sep 2007) Log Message: ----------- added a new "name" property Modified Paths: -------------- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/DbSetupManagerImpl.java Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/DbSetupManagerImpl.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/DbSetupManagerImpl.java 2007-09-24 20:10:32 UTC (rev 455) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/DbSetupManagerImpl.java 2007-09-26 12:12:12 UTC (rev 456) @@ -13,6 +13,7 @@ import javax.sql.DataSource; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.dao.DataAccessException; @@ -46,7 +47,18 @@ private boolean enabled = true; + private String name; + /** + * Sets the name (outputted in logs, just for reference) + * @param name the name to set + */ + public void setName(String name) + { + this.name = name; + } + + /** * Sets the enabled. * @param enabled the enabled to set */ @@ -136,7 +148,8 @@ */ private void executeSetupTasks() { - log.info("Preparing db, checking {} setup tasks.", setupTasks.size()); + log.info("Preparing {}, checking {} setup tasks.", StringUtils.defaultIfEmpty(this.name, "db"), setupTasks + .size()); for (DbTask task : setupTasks) { log.debug(task.getDescription()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-24 20:10:30
|
Revision: 455 http://openutils.svn.sourceforge.net/openutils/?rev=455&view=rev Author: fgiust Date: 2007-09-24 13:10:32 -0700 (Mon, 24 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-24 20:10:24 UTC (rev 454) +++ trunk/openutils-dbmigration/pom.xml 2007-09-24 20:10:32 UTC (rev 455) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-dbmigration</artifactId> <name>openutils db migration framework</name> - <version>0.7.2</version> + <version>0.7.3-SNAPSHOT</version> <description /> <properties> <spring.version>2.0.6</spring.version> @@ -87,10 +87,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.2</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.2</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-0.7.2</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-24 20:10:21
|
Revision: 454 http://openutils.svn.sourceforge.net/openutils/?rev=454&view=rev Author: fgiust Date: 2007-09-24 13:10:24 -0700 (Mon, 24 Sep 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-dbmigration-0.7.2 Added Paths: ----------- tags/openutils-dbmigration-0.7.2/ tags/openutils-dbmigration-0.7.2/pom.xml Removed Paths: ------------- tags/openutils-dbmigration-0.7.2/pom.xml Copied: tags/openutils-dbmigration-0.7.2 (from rev 452, trunk/openutils-dbmigration) Deleted: tags/openutils-dbmigration-0.7.2/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-24 20:09:22 UTC (rev 452) +++ tags/openutils-dbmigration-0.7.2/pom.xml 2007-09-24 20:10:24 UTC (rev 454) @@ -1,90 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-dbmigration</artifactId> - <name>openutils db migration framework</name> - <version>0.7.2-SNAPSHOT</version> - <description /> - <properties> - <spring.version>2.0.6</spring.version> - </properties> - <dependencies> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>1.3</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>poi</groupId> - <artifactId>poi</artifactId> - <version>2.5.1-final-20040804</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.0</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-dbmigration-0.7.2/pom.xml (from rev 453, trunk/openutils-dbmigration/pom.xml) =================================================================== --- tags/openutils-dbmigration-0.7.2/pom.xml (rev 0) +++ tags/openutils-dbmigration-0.7.2/pom.xml 2007-09-24 20:10:24 UTC (rev 454) @@ -0,0 +1,96 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-dbmigration</artifactId> + <name>openutils db migration framework</name> + <version>0.7.2</version> + <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.3</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>poi</groupId> + <artifactId>poi</artifactId> + <version>2.5.1-final-20040804</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-0.7.2</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-24 20:10:11
|
Revision: 453 http://openutils.svn.sourceforge.net/openutils/?rev=453&view=rev Author: fgiust Date: 2007-09-24 13:10:15 -0700 (Mon, 24 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-dbmigration-0.7.2 Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-09-24 20:09:22 UTC (rev 452) +++ trunk/openutils-dbmigration/pom.xml 2007-09-24 20:10:15 UTC (rev 453) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-dbmigration</artifactId> <name>openutils db migration framework</name> - <version>0.7.2-SNAPSHOT</version> + <version>0.7.2</version> <description /> <properties> <spring.version>2.0.6</spring.version> @@ -87,4 +87,10 @@ <scope>test</scope> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-0.7.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-0.7.2</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-24 20:09:23
|
Revision: 452 http://openutils.svn.sourceforge.net/openutils/?rev=452&view=rev Author: fgiust Date: 2007-09-24 13:09:22 -0700 (Mon, 24 Sep 2007) Log Message: ----------- sqlserver specific tasks Added Paths: ----------- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerFunctionCreationTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerGenericAlterTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerObjCreationTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerScriptBasedUnconditionalTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerSynonymCreationTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTableCreationTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTriggerCreationTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreationTask.java Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerFunctionCreationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerFunctionCreationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerFunctionCreationTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,26 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import javax.sql.DataSource; + + +/** + * @author Danilo Ghirardelli + * @version $Id:SqlServerFunctionCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerFunctionCreationTask extends SqlServerObjCreationTask +{ + + /** + * {@inheritDoc} + */ + @Override + public void execute(DataSource dataSource) + { + setQualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and xtype in (N'FN', N'IF', N'TF')"); + setUnqualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and xtype in (N'FN', N'IF', N'TF')"); + super.execute(dataSource); + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerGenericAlterTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerGenericAlterTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerGenericAlterTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,240 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import it.openutils.migration.task.setup.GenericConditionalTask; + +import java.io.IOException; +import java.io.InputStream; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * This class is used for any alter task needed. The triggerValue is the value (only numeric) of result query that + * activates the alter script. Default is zero. Both the condition query and the alter query can be script or embedded + * in the xml. + * @author Danilo Ghirardelli + * @version $Id:SqlServerGenericAlterTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerGenericAlterTask extends GenericConditionalTask +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(SqlServerGenericAlterTask.class); + + /** + * The condition can be in a string or in a script file. + */ + private Resource checkScript; + + /** + * Override of the corresponding string. + */ + private String ddl; + + /** + * The alter script can be embedded in the xml file or in a script file. + */ + private Resource ddlScript; + + /** + * The value that will let the ddl script start. Default is zero. + */ + private Integer triggerValue = 0; + + /** + * The db with the objects, synonyms will point to this db. + */ + private String sourceDb; + + /** + * Sets the checkScript. + * @param checkScript the checkScript to set + */ + public void setCheckScript(Resource checkScript) + { + this.checkScript = checkScript; + } + + /** + * Sets the ddl. + * @param ddl the ddl to set + */ + @Override + public void setDdl(String ddl) + { + this.ddl = ddl; + } + + /** + * Sets the ddlScript. + * @param ddlScript the ddlScript to set + */ + public void setDdlScript(Resource ddlScript) + { + this.ddlScript = ddlScript; + } + + /** + * Sets the triggerValue. + * @param triggerValue the triggerValue to set + */ + public void setTriggerValue(Integer triggerValue) + { + this.triggerValue = triggerValue; + } + + /** + * Sets the sourceDb. + * @param sourceDb the sourceDb to set + */ + public void setSourceDb(String sourceDb) + { + this.sourceDb = sourceDb; + } + + /** + * {@inheritDoc} + */ + @Override + public String getDescription() + { + + if (StringUtils.isNotEmpty(super.getDescription())) + { + return super.getDescription(); + } + + StringBuffer result = new StringBuffer(); + if (StringUtils.isNotBlank(getCheck())) + { + result.append("Checking alter task condition:\n" + getCheck()); + } + else + { + result.append("Checking alter task condition in script:\n" + checkScript); + } + return result.toString(); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute(DataSource dataSource) + { + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + + String resultQuery; + if (StringUtils.isNotBlank(getCheck())) + { + // Simple query embedded in xml. + resultQuery = getCheck(); + resultQuery = StringUtils.isNotBlank(this.sourceDb) ? StringUtils.replace( + resultQuery, + "${sourceDb}", + this.sourceDb) : resultQuery; + } + else + { + // Check query in a script file. + if (checkScript == null || !checkScript.exists()) + { + log.error("Unable to execute db task \"{}\", script \"{}\" not found.", getDescription(), checkScript); + return; + } + InputStream is = null; + String scriptContent; + try + { + is = checkScript.getInputStream(); + scriptContent = IOUtils.toString(is, "UTF8"); + } + catch (IOException e) + { + log.error( + "Unable to execute db task \"{}\", script \"{}\" can't be read.", + getDescription(), + checkScript); + return; + } + finally + { + IOUtils.closeQuietly(is); + } + resultQuery = scriptContent; + resultQuery = StringUtils.isNotBlank(this.sourceDb) ? StringUtils.replace( + resultQuery, + "${sourceDb}", + this.sourceDb) : resultQuery; + } + + if ((triggerValue != null) && (jdbcTemplate.queryForInt(resultQuery) == triggerValue)) + { + log.info("Executing Alter Task: {}", getDescription()); + String scriptContent; + + if (StringUtils.isNotBlank(ddl)) + { + scriptContent = ddl; + } + else + { + if (ddlScript == null || !ddlScript.exists()) + { + log + .error( + "Unable to execute db task \"{}\", script \"{}\" not found.", + getDescription(), + ddlScript); + return; + } + InputStream is = null; + try + { + is = ddlScript.getInputStream(); + scriptContent = IOUtils.toString(is, "UTF8"); + } + catch (IOException e) + { + log.error( + "Unable to execute db task \"{}\", script \"{}\" can't be read.", + getDescription(), + ddlScript); + return; + } + finally + { + IOUtils.closeQuietly(is); + } + } + + String[] ddls = StringUtils.split(scriptContent, ";"); + + for (String ddl : ddls) + { + if (StringUtils.isNotBlank(ddl)) + { + String ddlReplaced = ddl; + ddlReplaced = StringUtils.isNotBlank(this.sourceDb) ? StringUtils.replace( + ddlReplaced, + "${sourceDb}", + this.sourceDb) : ddlReplaced; + log.debug("Executing:\n{}", ddlReplaced); + jdbcTemplate.update(ddlReplaced); + } + } + } + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerObjCreationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerObjCreationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerObjCreationTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,162 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import it.openutils.migration.task.setup.GenericScriptBasedConditionalTask; + +import java.io.IOException; +import java.io.InputStream; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * @author fgiust + * @version $Id:SqlServerObjCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerObjCreationTask extends GenericScriptBasedConditionalTask +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(SqlServerObjCreationTask.class); + + /** + * Query to check with standard objects' name. + */ + private String unqualifiedObjQuery; + + /** + * Query to check with full database objects' hierarchy. + */ + private String qualifiedObjQuery; + + /** + * The db with the objects, synonyms will point to this db. + */ + private String sourceDb; + + /** + * Returns the qualifiedObjQuery. + * @return the qualifiedObjQuery + */ + public String getQualifiedObjQuery() + { + return qualifiedObjQuery; + } + + /** + * Sets the qualifiedObjQuery. + * @param qualifiedObjQuery the qualifiedObjQuery to set + */ + public void setQualifiedObjQuery(String qualifiedObjQuery) + { + this.qualifiedObjQuery = qualifiedObjQuery; + } + + /** + * Sets the sourceDb. + * @param sourceDb the sourceDb to set + */ + public void setSourceDb(String sourceDb) + { + this.sourceDb = sourceDb; + } + + /** + * Returns the unqualifiedObjQuery. + * @return the unqualifiedObjQuery + */ + public String getUnqualifiedObjQuery() + { + return unqualifiedObjQuery; + } + + /** + * Sets the unqualifiedObjQuery. + * @param unqualifiedObjQuery the unqualifiedObjQuery to set + */ + public void setUnqualifiedObjQuery(String unqualifiedObjQuery) + { + this.unqualifiedObjQuery = unqualifiedObjQuery; + } + + /** + * {@inheritDoc} + */ + @Override + public void execute(DataSource dataSource) + { + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + for (Resource script : scripts) + { + String fqTableName = this.objectNameFromFileName(script); + + int result = 0; + if (StringUtils.contains(fqTableName, ".")) + { + String[] tokens = StringUtils.split(fqTableName, "."); + result = jdbcTemplate.queryForInt(qualifiedObjQuery, new Object[]{tokens[1], tokens[0] }); + } + else + { + result = jdbcTemplate.queryForInt(unqualifiedObjQuery, fqTableName); + } + + if (result == 0) + { + if (script == null || !script.exists()) + { + log.error("Unable to execute db task \"{}\", script \"{}\" not found.", getDescription(), script); + return; + } + + String scriptContent; + InputStream is = null; + + try + { + is = script.getInputStream(); + scriptContent = IOUtils.toString(is, "UTF8"); + } + catch (IOException e) + { + log.error( + "Unable to execute db task \"{}\", script \"{}\" can't be read.", + getDescription(), + script); + return; + } + finally + { + IOUtils.closeQuietly(is); + } + + String[] ddls = StringUtils.split(scriptContent, ";"); + + for (String ddl : ddls) + { + if (StringUtils.isNotBlank(ddl)) + { + String ddlReplaced = ddl; + ddlReplaced = StringUtils.isNotBlank(this.sourceDb) ? StringUtils.replace( + ddlReplaced, + "${sourceDb}", + this.sourceDb) : ddlReplaced; + log.debug("Executing:\n{}", ddlReplaced); + jdbcTemplate.update(ddlReplaced); + } + } + } + } + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerScriptBasedUnconditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerScriptBasedUnconditionalTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerScriptBasedUnconditionalTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,104 @@ +package it.openutils.migration.sqlserver; + +import it.openutils.migration.task.setup.BaseDbTask; +import it.openutils.migration.task.setup.DbTask; +import it.openutils.migration.task.setup.ScriptBasedUnconditionalTask; + +import java.io.IOException; +import java.util.List; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * @author fgiust + * @version $Id:SqlServerScriptBasedUnconditionalTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerScriptBasedUnconditionalTask extends BaseDbTask implements DbTask +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(ScriptBasedUnconditionalTask.class); + + private List<Resource> scripts; + + /** + * Sets the scripts. + * @param scripts the scripts to set + */ + public void setScripts(List<Resource> scripts) + { + this.scripts = scripts; + } + + /** + * {@inheritDoc} + */ + public void execute(DataSource dataSource) + { + + for (Resource script : scripts) + { + if (script == null || !script.exists()) + { + log.error("Unable to execute db task \"{}\", script \"{}\" not found.", getDescription(), script); + return; + } + + String scriptContent; + + try + { + // @todo we should read line by line, avoiding to cache all the script in memory + scriptContent = IOUtils.toString(script.getInputStream(), "UTF8"); + } + catch (IOException e) + { + log.error("Unable to execute db task \"{}\", script \"{}\" can't be read.", getDescription(), script); + return; + } + + String[] ddls = splitStatements(scriptContent); + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + + for (final String ddl : ddls) + { + if (StringUtils.isNotBlank(ddl)) + { + log.debug("Executing:\n{}", ddl); + + jdbcTemplate.update(ddl); + } + } + + } + + } + + /** + * @param scriptContent + * @return + */ + private String[] splitStatements(String scriptContent) + { + String[] ddls; + if (scriptContent.indexOf(';') > -1) + { + ddls = StringUtils.splitByWholeSeparator(scriptContent, ";"); + } + else + { + ddls = StringUtils.splitByWholeSeparator(scriptContent, "\nGO"); + } + return ddls; + } +} Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerSynonymCreationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerSynonymCreationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerSynonymCreationTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,78 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import it.openutils.migration.task.setup.DbTask; + +import java.util.List; + +import javax.sql.DataSource; + +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * @author Danilo Ghirardelli + * @version $Id:SqlServerSynonymCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerSynonymCreationTask implements DbTask +{ + + private String source; + + private List<String> objects; + + /** + * Sets the source. + * @param source the source to set + */ + public void setSource(String source) + { + this.source = source; + } + + /** + * Sets the objects. + * @param objects the objects to set + */ + public void setObjects(List<String> objects) + { + this.objects = objects; + } + + /** + * {@inheritDoc} + */ + public void execute(DataSource dataSource) + { + + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + + for (String objectName : objects) + { + int result = jdbcTemplate.queryForInt( + "select count(*) from dbo.sysobjects where id = object_id(?) and xtype = N'SN'", + objectName); + if (result == 0) + { + jdbcTemplate.update("CREATE SYNONYM [dbo].[" + + objectName + + "] FOR [" + + source + + "].[dbo].[" + + objectName + + "]"); + } + } + + } + + /** + * {@inheritDoc} + */ + public String getDescription() + { + return "Creating synonyms from " + source; + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTableCreationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTableCreationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTableCreationTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,26 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import javax.sql.DataSource; + + +/** + * @author fgiust + * @version $Id:SqlServerTableCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerTableCreationTask extends SqlServerObjCreationTask +{ + + /** + * {@inheritDoc} + */ + @Override + public void execute(DataSource dataSource) + { + setQualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsUserTable') = 1"); + setUnqualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsUserTable') = 1"); + super.execute(dataSource); + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTriggerCreationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTriggerCreationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerTriggerCreationTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,26 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import javax.sql.DataSource; + + +/** + * @author Danilo Ghirardelli + * @version $Id:SqlServerTriggerCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerTriggerCreationTask extends SqlServerObjCreationTask +{ + + /** + * {@inheritDoc} + */ + @Override + public void execute(DataSource dataSource) + { + setQualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsTrigger') = 1"); + setUnqualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsTrigger') = 1"); + super.execute(dataSource); + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreateOrUpdateTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,156 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import it.openutils.migration.task.setup.GenericScriptBasedConditionalTask; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * @author Danilo Ghirardelli + * @version $Id: SqlServerViewCreateOrUpdateTask.java 391 2007-07-10 17:25:42Z fgiust $ + */ +public class SqlServerViewCreateOrUpdateTask extends GenericScriptBasedConditionalTask +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(SqlServerObjCreationTask.class); + + /** + * The db with the objects, synonyms will point to this db. + */ + private String sourceDb; + + /** + * Sets the sourceDb. + * @param sourceDb the sourceDb to set + */ + public void setSourceDb(String sourceDb) + { + this.sourceDb = sourceDb; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public void execute(DataSource dataSource) + { + + String checkQuery = "select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsView') = 1"; + + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + for (Resource script : scripts) + { + String viewName = this.objectNameFromFileName(script); + + int result = jdbcTemplate.queryForInt(checkQuery, viewName); + + String scriptContent = readFully(script); + + if (scriptContent == null) + { + continue; + } + + if (result == 0) + { + log.info("View {} not existing. Creating new view", viewName); + + createView(jdbcTemplate, scriptContent); + } + else + { + + List<String> previousDDlList = jdbcTemplate.getJdbcOperations().queryForList( + "exec sp_helptext ?", + new Object[]{viewName }, + String.class); + + String previousDDl = StringUtils.join(previousDDlList.toArray(new String[previousDDlList.size()])); + + if (!StringUtils.equals(previousDDl, scriptContent)) + { + log.info( + "Previous definition of view {} differs from actual. Dropping and recreating view", + new Object[]{viewName }); + + jdbcTemplate.update("DROP VIEW [dbo].[" + viewName + "]"); + + createView(jdbcTemplate, scriptContent); + } + } + } + + } + + /** + * @param jdbcTemplate + * @param script + * @return + */ + private void createView(SimpleJdbcTemplate jdbcTemplate, String script) + { + + String[] ddls = StringUtils.split(script, ";"); + + for (String ddl : ddls) + { + if (StringUtils.isNotBlank(ddl)) + { + log.debug("Executing:\n{}", ddl); + jdbcTemplate.update(ddl); + } + } + } + + /** + * @param script + * @return + */ + private String readFully(Resource script) + { + if (script == null || !script.exists()) + { + log.error("Unable to execute db task \"{}\", script \"{}\" not found.", getDescription(), script); + return null; + } + + String scriptContent; + InputStream is = null; + + try + { + is = script.getInputStream(); + scriptContent = IOUtils.toString(is, "UTF8"); + } + catch (IOException e) + { + log.error("Unable to execute db task \"{}\", script \"{}\" can't be read.", getDescription(), script); + return null; + } + finally + { + IOUtils.closeQuietly(is); + } + return StringUtils.stripEnd( + StringUtils.trim(StringUtils.replace(scriptContent, "${sourceDb}", this.sourceDb)), + ";"); + } +} \ No newline at end of file Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/sqlserver/SqlServerViewCreationTask.java 2007-09-24 20:09:22 UTC (rev 452) @@ -0,0 +1,26 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.sqlserver; + +import javax.sql.DataSource; + + +/** + * @author Danilo Ghirardelli + * @version $Id:SqlServerViewCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public class SqlServerViewCreationTask extends SqlServerObjCreationTask +{ + + /** + * {@inheritDoc} + */ + @Override + public void execute(DataSource dataSource) + { + setQualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsView') = 1"); + setUnqualifiedObjQuery("select count(*) from dbo.sysobjects where id = object_id(?) and OBJECTPROPERTY(id, N'IsView') = 1"); + super.execute(dataSource); + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-20 10:21:04
|
Revision: 451 http://openutils.svn.sourceforge.net/openutils/?rev=451&view=rev Author: fgiust Date: 2007-09-20 03:21:07 -0700 (Thu, 20 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-09-20 10:21:01 UTC (rev 450) +++ trunk/openutils-bshd5/pom.xml 2007-09-20 10:21:07 UTC (rev 451) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-bshd5</artifactId> <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>1.0.9</version> + <version>1.0.10-SNAPSHOT</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> <properties> <spring.version>2.0.6</spring.version> @@ -81,10 +81,4 @@ <optional>true</optional> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.9</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.9</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-1.0.9</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-20 10:20:57
|
Revision: 450 http://openutils.svn.sourceforge.net/openutils/?rev=450&view=rev Author: fgiust Date: 2007-09-20 03:21:01 -0700 (Thu, 20 Sep 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-bshd5-1.0.9 Added Paths: ----------- tags/openutils-bshd5-1.0.9/ tags/openutils-bshd5-1.0.9/pom.xml Removed Paths: ------------- tags/openutils-bshd5-1.0.9/pom.xml Copied: tags/openutils-bshd5-1.0.9 (from rev 448, trunk/openutils-bshd5) Deleted: tags/openutils-bshd5-1.0.9/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-09-20 10:17:56 UTC (rev 448) +++ tags/openutils-bshd5-1.0.9/pom.xml 2007-09-20 10:21:01 UTC (rev 450) @@ -1,85 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-bshd5</artifactId> - <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>1.0.9-SNAPSHOT</version> - <description>openutils base Spring-Hibernate DAO for java 5.0</description> - <properties> - <spring.version>2.0.6</spring.version> - </properties> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.4.1</version> - </dependency> - <dependency> - <!-- replaces commons-logging --> - <groupId>org.slf4j</groupId> - <artifactId>jcl104-over-slf4j</artifactId> - <version>1.4.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-hibernate3</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aop</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - <version>3.2.1.ga</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.7.0</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <optional>true</optional> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-bshd5-1.0.9/pom.xml (from rev 449, trunk/openutils-bshd5/pom.xml) =================================================================== --- tags/openutils-bshd5-1.0.9/pom.xml (rev 0) +++ tags/openutils-bshd5-1.0.9/pom.xml 2007-09-20 10:21:01 UTC (rev 450) @@ -0,0 +1,90 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-bshd5</artifactId> + <name>openutils base Spring-Hibernate DAO for java 5.0</name> + <version>1.0.9</version> + <description>openutils base Spring-Hibernate DAO for java 5.0</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <!-- replaces commons-logging --> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + <version>3.2.1.ga</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <optional>true</optional> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.9</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.9</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-1.0.9</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-20 10:20:47
|
Revision: 449 http://openutils.svn.sourceforge.net/openutils/?rev=449&view=rev Author: fgiust Date: 2007-09-20 03:20:51 -0700 (Thu, 20 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-bshd5-1.0.9 Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-09-20 10:17:56 UTC (rev 448) +++ trunk/openutils-bshd5/pom.xml 2007-09-20 10:20:51 UTC (rev 449) @@ -1,5 +1,4 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -9,7 +8,7 @@ </parent> <artifactId>openutils-bshd5</artifactId> <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>1.0.9-SNAPSHOT</version> + <version>1.0.9</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> <properties> <spring.version>2.0.6</spring.version> @@ -82,4 +81,10 @@ <optional>true</optional> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.9</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.9</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-1.0.9</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-20 10:17:52
|
Revision: 448 http://openutils.svn.sourceforge.net/openutils/?rev=448&view=rev Author: fgiust Date: 2007-09-20 03:17:56 -0700 (Thu, 20 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-testing-testng/pom.xml Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2007-09-20 10:17:49 UTC (rev 447) +++ trunk/openutils-testing-testng/pom.xml 2007-09-20 10:17:56 UTC (rev 448) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-testing-testng</artifactId> <name>openutils test utils (testng)</name> - <version>1.1.3</version> + <version>1.1.4-SNAPSHOT</version> <description>openutils test utils</description> <properties> <spring.version>2.0.6</spring.version> @@ -83,10 +83,4 @@ <version>5.1</version> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-1.1.3</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-1.1.3</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-testng-1.1.3</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-20 10:17:45
|
Revision: 447 http://openutils.svn.sourceforge.net/openutils/?rev=447&view=rev Author: fgiust Date: 2007-09-20 03:17:49 -0700 (Thu, 20 Sep 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-testing-testng-1.1.3 Added Paths: ----------- tags/openutils-testing-testng-1.1.3/ tags/openutils-testing-testng-1.1.3/pom.xml Removed Paths: ------------- tags/openutils-testing-testng-1.1.3/pom.xml Copied: tags/openutils-testing-testng-1.1.3 (from rev 443, trunk/openutils-testing-testng) Deleted: tags/openutils-testing-testng-1.1.3/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2007-09-20 10:10:04 UTC (rev 443) +++ tags/openutils-testing-testng-1.1.3/pom.xml 2007-09-20 10:17:49 UTC (rev 447) @@ -1,63 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-testing-testng</artifactId> - <name>openutils test utils (testng)</name> - <version>1.1.3-SNAPSHOT</version> - <description>openutils test utils</description> - <properties> - <spring.version>2.0.6</spring.version> - </properties> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.13</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-hibernate3</artifactId> - <version>${spring.version}</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.1</version> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-testing-testng-1.1.3/pom.xml (from rev 446, trunk/openutils-testing-testng/pom.xml) =================================================================== --- tags/openutils-testing-testng-1.1.3/pom.xml (rev 0) +++ tags/openutils-testing-testng-1.1.3/pom.xml 2007-09-20 10:17:49 UTC (rev 447) @@ -0,0 +1,92 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing-testng</artifactId> + <name>openutils test utils (testng)</name> + <version>1.1.3</version> + <description>openutils test utils</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <!-- replaces commons-logging --> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>${spring.version}</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.2</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-1.1.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-1.1.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-testng-1.1.3</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-09-20 10:17:34
|
Revision: 446 http://openutils.svn.sourceforge.net/openutils/?rev=446&view=rev Author: fgiust Date: 2007-09-20 03:17:38 -0700 (Thu, 20 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-testing-testng-1.1.3 Modified Paths: -------------- trunk/openutils-testing-testng/pom.xml Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2007-09-20 10:16:22 UTC (rev 445) +++ trunk/openutils-testing-testng/pom.xml 2007-09-20 10:17:38 UTC (rev 446) @@ -1,5 +1,4 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -9,7 +8,7 @@ </parent> <artifactId>openutils-testing-testng</artifactId> <name>openutils test utils (testng)</name> - <version>1.1.3-SNAPSHOT</version> + <version>1.1.3</version> <description>openutils test utils</description> <properties> <spring.version>2.0.6</spring.version> @@ -84,4 +83,10 @@ <version>5.1</version> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-1.1.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-1.1.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-testng-1.1.3</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |