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: <fg...@us...> - 2008-04-27 13:14:18
|
Revision: 772 http://openutils.svn.sourceforge.net/openutils/?rev=772&view=rev Author: fgiust Date: 2008-04-27 06:14:25 -0700 (Sun, 27 Apr 2008) Log Message: ----------- minor changes Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java trunk/openutils-bshd5/src/site/changes/changes.xml Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-04-27 12:47:09 UTC (rev 771) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-04-27 13:14:25 UTC (rev 772) @@ -84,7 +84,7 @@ * @param obj Object */ void evict(T obj); - + /** * Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent * instance currently associated with the session, it will be loaded. Return the persistent instance. If the given @@ -141,9 +141,10 @@ */ List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, final int maxResults, final int page, List<Criterion> additionalCriteria); - + /** - * Return properties from all objects related to the implementation of this DAO filtered using properties of the provided instance. + * Return properties from all objects related to the implementation of this DAO filtered using properties of the + * provided instance. * @param filter an instance of the object with the properties you whish to filter on. * @param customOrder order criterias * @param metadata filter metadata @@ -152,11 +153,11 @@ * @param additionalCriteria additional criteria * @param properties properties to be returned * @return list of properties from all objects - */ - List<?> findFilteredProperties(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, - final int maxResults,final int page, List<Criterion> additionalCriteria, List<String> properties); + */ + List< ? > findFilteredProperties(final T filter, final Order[] customOrder, + final Map<String, FilterMetadata> metadata, final int maxResults, final int page, + List<Criterion> additionalCriteria, List<String> properties); - /** * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. * @param filter an instance of the object with the properties you whish to filter on. @@ -207,7 +208,7 @@ boolean delete(final K key); /** - * Load object matching the given key and return it. Lazy object will be initialized. + * Load object matching the given key and return it. Throw an exception if not found. * @param key serializable key * @return Object */ @@ -221,6 +222,13 @@ T loadIfAvailable(K key); /** + * Load object matching the given key and return it. Lazy object will be initialized. + * @param key serializable key + * @return Object + */ + T get(K key); + + /** * Used by the base DAO classes but here for your modification Either save() or update() the given instance, * depending upon the value of its identifier property. * @param obj Object Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-04-27 12:47:09 UTC (rev 771) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-04-27 13:14:25 UTC (rev 772) @@ -26,7 +26,6 @@ import org.hibernate.type.Type; import org.springframework.aop.framework.AopContext; import org.springframework.orm.hibernate3.HibernateCallback; -import org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; @@ -168,29 +167,32 @@ T result; try { - result = (T) getHibernateTemplate().load(getReferenceClass(), key); - Hibernate.initialize(result); + result = (T) getHibernateTemplate().get(getReferenceClass(), key); + if (result != null) + { + Hibernate.initialize(result); + } } catch (ObjectNotFoundException e) { // during lazy initialization return null; } - catch (HibernateObjectRetrievalFailureException e) - { - // during load - if (e.getCause() instanceof ObjectNotFoundException) - { - return null; - } - throw e; - } return result; } /** * {@inheritDoc} */ + @SuppressWarnings("unchecked") + public T get(K key) + { + return (T) getHibernateTemplate().get(getReferenceClass(), key); + } + + /** + * {@inheritDoc} + */ public void saveOrUpdate(final T obj) { getHibernateTemplate().saveOrUpdate(obj); @@ -334,7 +336,7 @@ /** * {@inheritDoc} */ - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public List<T> findFiltered(T filter, Order[] customOrder, Map<String, FilterMetadata> metadata, int maxResults, int page, List<Criterion> additionalCriteria) { @@ -353,11 +355,10 @@ } /** - * * {@inheritDoc} */ - @SuppressWarnings("unchecked") - public List<?> findFilteredProperties(final T filter, final Order[] customOrder, + @SuppressWarnings("unchecked") + public List< ? > findFilteredProperties(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, final int maxResults, final int page, List<Criterion> additionalCriteria, List<String> properties) { @@ -399,44 +400,26 @@ } /** - * Obtain an instance of Query for a named query string defined in the mapping file. - * @param name the name of a query defined externally - * @param maxResults max number of results - * @return Query - */ - protected List< ? > getNamedQuery(final String name, final int maxResults) - { - return (List< ? >) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - Query q = ses.getNamedQuery(name); - q.setMaxResults(maxResults); - return q.list(); - } - }); - } - - /** * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. * @param name the name of a query defined externally * @param params the parameter array * @param maxResults max number of results * @return Query */ - protected List< ? > getNamedQuery(final String name, final Serializable[] params, final int maxResults) + protected List< ? > findByNamedQuery(final String name, final Serializable[] params, final Integer maxResults) { - return (List< ? >) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session ses) throws HibernateException { Query q = ses.getNamedQuery(name); - q.setMaxResults(maxResults); - if (null != params) + if (maxResults != null) { + q.setMaxResults(maxResults); + } + if (params != null) + { for (int i = 0; i < params.length; i++) { q.setParameter(i, params[i]); @@ -454,7 +437,7 @@ * @param maxResults max number of results * @return Query */ - protected List< ? > getNamedQuery(final String name, final Map<String, Object> params, final int maxResults) + protected List< ? > findByNamedQuery(final String name, final Map<String, Object> params, final Integer maxResults) { return (List< ? >) getHibernateTemplate().execute(new HibernateCallback() { @@ -462,7 +445,11 @@ public Object doInHibernate(Session ses) throws HibernateException { Query q = ses.getNamedQuery(name); - q.setMaxResults(maxResults); + if (maxResults != null) + { + q.setMaxResults(maxResults); + } + if (params != null) { for (Map.Entry<String, Object> entry : params.entrySet()) @@ -476,6 +463,34 @@ } /** + * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. + * @param name the name of a query defined externally + * @param params the parameter array + * @param maxResults max number of results + * @return Query + * @deprecated use the better named <code>findByNamedQuery</code> method + */ + @Deprecated + protected List< ? > getNamedQuery(final String name, final Serializable[] params, int maxResults) + { + return findByNamedQuery(name, params, maxResults > 0 ? maxResults : Integer.MAX_VALUE); + } + + /** + * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. + * @param name the name of a query defined externally + * @param params the parameter Map + * @param maxResults max number of results + * @return Query + * @deprecated use the better named <code>findByNamedQuery</code> method + */ + @Deprecated + protected List< ? > getNamedQuery(final String name, final Map<String, Object> params, int maxResults) + { + return findByNamedQuery(name, params, maxResults > 0 ? maxResults : Integer.MAX_VALUE); + } + + /** * Convenience method to set paramers in the query given based on the actual object type in passed in as the value. * You may need to add more functionaly to this as desired (or not use this at all). * @param query the Query to set @@ -583,7 +598,7 @@ private final Map<String, FilterMetadata> metadata; /** - * + * */ private final List<String> properties; Modified: trunk/openutils-bshd5/src/site/changes/changes.xml =================================================================== --- trunk/openutils-bshd5/src/site/changes/changes.xml 2008-04-27 12:47:09 UTC (rev 771) +++ trunk/openutils-bshd5/src/site/changes/changes.xml 2008-04-27 13:14:25 UTC (rev 772) @@ -10,6 +10,10 @@ <body> <release version="2.0.3" date="in svn" description="2.0.3"> <action type="update" dev="fgiust">Updated spring and slf4j versions</action> + <action type="update" dev="fgiust">getNamedQuery() methods deprecated and replaced by better named + findByNamedQuery()</action> + <action type="add" dev="fgiust">New get(id) public method that calls session.get(id) (same as loadIfAvailable, + without initialization of lazy objects)</action> </release> </body> </document> \ 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...> - 2008-04-27 12:47:03
|
Revision: 771 http://openutils.svn.sourceforge.net/openutils/?rev=771&view=rev Author: fgiust Date: 2008-04-27 05:47:09 -0700 (Sun, 27 Apr 2008) Log Message: ----------- setup changelog Added Paths: ----------- trunk/openutils-bshd5/src/site/changes/ trunk/openutils-bshd5/src/site/changes/changes.xml Added: trunk/openutils-bshd5/src/site/changes/changes.xml =================================================================== --- trunk/openutils-bshd5/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-bshd5/src/site/changes/changes.xml 2008-04-27 12:47:09 UTC (rev 771) @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="2.0.3" date="in svn" description="2.0.3"> + <action type="update" dev="fgiust">Updated spring and slf4j versions</action> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-bshd5/src/site/changes/changes.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 12:44:23
|
Revision: 770 http://openutils.svn.sourceforge.net/openutils/?rev=770&view=rev Author: fgiust Date: 2008-04-27 05:44:26 -0700 (Sun, 27 Apr 2008) Log Message: ----------- update poms Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2008-04-27 12:41:06 UTC (rev 769) +++ trunk/openutils-bshd5/pom.xml 2008-04-27 12:44:26 UTC (rev 770) @@ -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> @@ -14,12 +15,12 @@ <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>1.4.3</version> + <version>1.5.0</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl104-over-slf4j</artifactId> - <version>1.4.3</version> + <version>1.5.0</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -99,10 +100,10 @@ <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> - <version>2.3</version> + <version>2.4</version> </dependency> </dependencies> <properties> - <spring.version>2.5.1</spring.version> + <spring.version>2.5.3</spring.version> </properties> </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...> - 2008-04-27 12:41:05
|
Revision: 769 http://openutils.svn.sourceforge.net/openutils/?rev=769&view=rev Author: fgiust Date: 2008-04-27 05:41:06 -0700 (Sun, 27 Apr 2008) Log Message: ----------- update module poms Modified Paths: -------------- trunk/openutils-backup/pom.xml trunk/openutils-bshd5/pom.xml trunk/openutils-configuration-dataobjects/pom.xml trunk/openutils-configuration-services/pom.xml trunk/openutils-dbmigration/pom.xml trunk/openutils-deployment/pom.xml trunk/openutils-hibernate-security/pom.xml trunk/openutils-log4j/pom.xml trunk/openutils-maven-skin/pom.xml trunk/openutils-mgnlspring/pom.xml trunk/openutils-mgnlstripes/pom.xml trunk/openutils-spring/pom.xml trunk/openutils-spring-rmibernate/pom.xml trunk/openutils-tags-spring/pom.xml trunk/openutils-testing/pom.xml trunk/openutils-testing-junit/pom.xml trunk/openutils-testing-junit-dwr/pom.xml trunk/openutils-testing-testng/pom.xml trunk/openutils-testing-testng-dwr/pom.xml trunk/openutils-usermanagement/pom.xml trunk/openutils-usermanagement-dataobjects/pom.xml trunk/openutils-web/pom.xml Added Paths: ----------- trunk/openutils-testing4dwr/ trunk/openutils-testing4dwr/pom.xml trunk/openutils-testing4dwr/src/ trunk/openutils-testing4dwr/src/main/ trunk/openutils-testing4dwr/src/main/java/ trunk/openutils-testing4dwr/src/main/resources/ trunk/openutils-testing4web/ trunk/openutils-testing4web/pom.xml trunk/openutils-testing4web/src/ trunk/openutils-testing4web/src/main/ trunk/openutils-testing4web/src/main/java/ trunk/openutils-testing4web/src/main/resources/ Property Changed: ---------------- trunk/ trunk/openutils-dbmigration/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore - openutils-springjsp target eclipse.log + openutils-springjsp target eclipse.log release.properties Modified: trunk/openutils-backup/pom.xml =================================================================== --- trunk/openutils-backup/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-backup/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-backup</artifactId> Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-bshd5/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-bshd5</artifactId> Modified: trunk/openutils-configuration-dataobjects/pom.xml =================================================================== --- trunk/openutils-configuration-dataobjects/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-configuration-dataobjects/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <groupId>net.sourceforge.openutils</groupId> Modified: trunk/openutils-configuration-services/pom.xml =================================================================== --- trunk/openutils-configuration-services/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-configuration-services/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <groupId>net.sourceforge.openutils</groupId> Property changes on: trunk/openutils-dbmigration ___________________________________________________________________ Name: svn:ignore - target .checkstyle .settings .classpath .project + target .checkstyle .settings .classpath .project pom.xml.releaseBackup release.properties Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-dbmigration/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-dbmigration</artifactId> Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-deployment/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-deployment</artifactId> Modified: trunk/openutils-hibernate-security/pom.xml =================================================================== --- trunk/openutils-hibernate-security/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-hibernate-security/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -2,7 +2,7 @@ <parent> <artifactId>openutils</artifactId> <groupId>net.sourceforge.openutils</groupId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <modelVersion>4.0.0</modelVersion> Modified: trunk/openutils-log4j/pom.xml =================================================================== --- trunk/openutils-log4j/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-log4j/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-log4j</artifactId> Modified: trunk/openutils-maven-skin/pom.xml =================================================================== --- trunk/openutils-maven-skin/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-maven-skin/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-maven-skin</artifactId> Modified: trunk/openutils-mgnlspring/pom.xml =================================================================== --- trunk/openutils-mgnlspring/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-mgnlspring/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <modelVersion>4.0.0</modelVersion> Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-mgnlstripes/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <modelVersion>4.0.0</modelVersion> Modified: trunk/openutils-spring/pom.xml =================================================================== --- trunk/openutils-spring/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-spring/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-spring</artifactId> Modified: trunk/openutils-spring-rmibernate/pom.xml =================================================================== --- trunk/openutils-spring-rmibernate/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-spring-rmibernate/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-spring-rmibernate</artifactId> Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-tags-spring/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-tags-spring</artifactId> Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-testing/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-testing</artifactId> Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-testing-junit/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-testing-junit</artifactId> Modified: trunk/openutils-testing-junit-dwr/pom.xml =================================================================== --- trunk/openutils-testing-junit-dwr/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-testing-junit-dwr/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-testing-junit-dwr</artifactId> Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-testing-testng/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-testing-testng</artifactId> Modified: trunk/openutils-testing-testng-dwr/pom.xml =================================================================== --- trunk/openutils-testing-testng-dwr/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-testing-testng-dwr/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-testing-testng-dwr</artifactId> Added: trunk/openutils-testing4dwr/pom.xml =================================================================== --- trunk/openutils-testing4dwr/pom.xml (rev 0) +++ trunk/openutils-testing4dwr/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -0,0 +1,143 @@ +<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>7</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing4dwr</artifactId> + <name>openutils dwr test utils</name> + <version>2.0-SNAPSHOT</version> + <description>openutils test utils for dwr</description> + <dependencies> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing</artifactId> + <version>2.0.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + </dependency> + <dependency> + <groupId>httpunit</groupId> + <artifactId>httpunit</artifactId> + <version>1.6.2</version> + <exclusions> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xmlParserAPIs</artifactId> + </exclusion> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </exclusion> + <exclusion> + <groupId>nekohtml</groupId> + <artifactId>nekohtml</artifactId> + </exclusion> + <exclusion> + <groupId>rhino</groupId> + <artifactId>js</artifactId> + </exclusion> + <exclusion> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-compiler-jdt</artifactId> + <version>5.5.12</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>naming-resources</artifactId> + <version>5.5.15</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-runtime</artifactId> + <version>5.5.12</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-compiler</artifactId> + <version>5.5.12</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>naming-factory</artifactId> + <version>5.5.15</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jstl</artifactId> + <version>1.1.2</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-el</groupId> + <artifactId>commons-el</artifactId> + <version>1.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>rhino</groupId> + <artifactId>js</artifactId> + <version>1.6R6-candidate2</version> + </dependency> + </dependencies> + <properties> + <spring.version>2.5.1</spring.version> + </properties> +</project> Property changes on: trunk/openutils-testing4dwr/pom.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-testing4web/pom.xml =================================================================== --- trunk/openutils-testing4web/pom.xml (rev 0) +++ trunk/openutils-testing4web/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -0,0 +1,143 @@ +<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>7</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing4web</artifactId> + <name>openutils web test utils</name> + <version>2.0-SNAPSHOT</version> + <description>openutils test utils for webapps</description> + <dependencies> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing</artifactId> + <version>2.0.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + </dependency> + <dependency> + <groupId>httpunit</groupId> + <artifactId>httpunit</artifactId> + <version>1.6.2</version> + <exclusions> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xmlParserAPIs</artifactId> + </exclusion> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </exclusion> + <exclusion> + <groupId>nekohtml</groupId> + <artifactId>nekohtml</artifactId> + </exclusion> + <exclusion> + <groupId>rhino</groupId> + <artifactId>js</artifactId> + </exclusion> + <exclusion> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-compiler-jdt</artifactId> + <version>5.5.12</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>naming-resources</artifactId> + <version>5.5.15</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-runtime</artifactId> + <version>5.5.12</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-compiler</artifactId> + <version>5.5.12</version> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>naming-factory</artifactId> + <version>5.5.15</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jstl</artifactId> + <version>1.1.2</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-el</groupId> + <artifactId>commons-el</artifactId> + <version>1.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>rhino</groupId> + <artifactId>js</artifactId> + <version>1.6R6-candidate2</version> + </dependency> + </dependencies> + <properties> + <spring.version>2.5.1</spring.version> + </properties> +</project> Property changes on: trunk/openutils-testing4web/pom.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/openutils-usermanagement/pom.xml =================================================================== --- trunk/openutils-usermanagement/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-usermanagement/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <groupId>net.sourceforge.openutils</groupId> Modified: trunk/openutils-usermanagement-dataobjects/pom.xml =================================================================== --- trunk/openutils-usermanagement-dataobjects/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-usermanagement-dataobjects/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -3,7 +3,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <groupId>net.sourceforge.openutils</groupId> Modified: trunk/openutils-web/pom.xml =================================================================== --- trunk/openutils-web/pom.xml 2008-04-27 12:36:18 UTC (rev 768) +++ trunk/openutils-web/pom.xml 2008-04-27 12:41:06 UTC (rev 769) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>7</version> + <version>8</version> <relativePath>..</relativePath> </parent> <artifactId>openutils-web</artifactId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 12:36:12
|
Revision: 768 http://openutils.svn.sourceforge.net/openutils/?rev=768&view=rev Author: fgiust Date: 2008-04-27 05:36:18 -0700 (Sun, 27 Apr 2008) Log Message: ----------- update parent pom (use maven 2.0.9) and add checkstyle configuration Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/src/config/ trunk/src/config/checkstyle.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-04-27 12:23:57 UTC (rev 767) +++ trunk/pom.xml 2008-04-27 12:36:18 UTC (rev 768) @@ -5,7 +5,7 @@ <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> <packaging>pom</packaging> - <version>7</version> + <version>8</version> <name>openutils</name> <description>openutils parent POM</description> <url>http://openutils.sourceforge.net</url> @@ -80,12 +80,15 @@ <timezone>+1</timezone> </developer> </developers> + <prerequisites> + <maven>2.0.9</maven> + </prerequisites> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>2.0-beta-5</version> + <version>2.0-beta-6</version> <configuration> <stagingSiteURL> scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/staging/${pom.artifactId}/ @@ -98,10 +101,11 @@ </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> - <version>2.4</version> + <version>2.4.2</version> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> + <version>2.0.2</version> <configuration> <source>1.5</source> <target>1.5</target> @@ -109,6 +113,7 @@ </plugin> <plugin> <artifactId>maven-source-plugin</artifactId> + <version>2.0.4</version> <executions> <execution> <id>attach-sources</id> @@ -150,15 +155,18 @@ <plugins> <plugin> <artifactId>maven-javadoc-plugin</artifactId> + <version>2.4</version> <configuration> <quiet>true</quiet> </configuration> </plugin> <plugin> <artifactId>maven-project-info-reports-plugin</artifactId> + <version>2.0-beta-3</version> </plugin> <plugin> <artifactId>maven-changes-plugin</artifactId> + <version>2.0-beta-3</version> <configuration> <xmlPath>${basedir}/src/site/changes/changes.xml</xmlPath> </configuration> @@ -172,13 +180,15 @@ </plugin> <plugin> <artifactId>maven-surefire-report-plugin</artifactId> - <version>2.4</version> + <version>2.4.2</version> </plugin> <plugin> <artifactId>maven-changelog-plugin</artifactId> + <version>2.1</version> </plugin> <plugin> <artifactId>maven-jxr-plugin</artifactId> + <version>2.1</version> </plugin> </plugins> </reporting> @@ -209,6 +219,8 @@ <module>openutils-testing</module> <module>openutils-testing-testng</module> <module>openutils-testing-junit</module> + <module>openutils-testing4dwr</module> + <module>openutils-testing4web</module> <module>openutils-testing-junit-dwr</module> <module>openutils-testing-testng-dwr</module> <module>openutils-web</module> Added: trunk/src/config/checkstyle.xml =================================================================== --- trunk/src/config/checkstyle.xml (rev 0) +++ trunk/src/config/checkstyle.xml 2008-04-27 12:36:18 UTC (rev 768) @@ -0,0 +1,198 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + This configuration file was written by the eclipse-cs plugin configuration editor +--> +<!-- + Checkstyle-Configuration: project + Description: none +--> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="severity" value="warning"/> + <module name="TreeWalker"> + <module name="ArrayTypeStyle"/> + <module name="GenericIllegalRegexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="no System.out.println"/> + <property name="severity" value="error"/> + <property name="format" value="System\.out\.print"/> + <property name="message" value="Avoid System.out.println(), use log.debug()"/> + </module> + <module name="GenericIllegalRegexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="no printStackTrace"/> + <property name="severity" value="error"/> + <property name="format" value="\.printStackTrace\(\)"/> + <property name="message" value="Avoid exception.printStackTrace()"/> + </module> + <module name="GenericIllegalRegexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Assert.assertTrue(true) is meaningless!"/> + <property name="severity" value="error"/> + <property name="format" value="Assert\.assertTrue\(true"/> + <property name="message" value="Assert.assertTrue(true) is meaningless!"/> + </module> + <module name="GenericIllegalRegexp"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="no conversions from string to number using Integer.valueOf()"/> + <property name="severity" value="error"/> + <property name="format" value="Integer\.valueOf\("/> + <property name="message" value="Don't use Integer.valueOf(), use NumberUtils from commons-lang"/> + </module> + <module name="UncommentedMain"/> + <module name="UpperEll"/> + <module name="AvoidNestedBlocks"/> + <module name="EmptyBlock"> + <property name="option" value="text"/> + <property name="tokens" value="LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF, LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, STATIC_INIT"/> + </module> + <module name="LeftCurly"> + <property name="option" value="nl"/> + <property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF"/> + </module> + <module name="NeedBraces"> + <property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_IF, LITERAL_FOR, LITERAL_WHILE"/> + </module> + <module name="RightCurly"> + <property name="option" value="alone"/> + <property name="tokens" value="LITERAL_CATCH, LITERAL_ELSE, LITERAL_TRY"/> + </module> + <module name="CovariantEquals"/> + <module name="DeclarationOrder"> + <property name="severity" value="info"/> + </module> + <module name="DoubleCheckedLocking"/> + <module name="EmptyStatement"/> + <module name="EqualsHashCode"/> + <module name="ExplicitInitialization"/> + <module name="IllegalCatch"> + <property name="severity" value="info"/> + </module> + <module name="IllegalInstantiation"/> + <module name="IllegalType"> + <property name="tokens" value="METHOD_DEF, PARAMETER_DEF, VARIABLE_DEF"/> + </module> + <module name="InnerAssignment"> + <property name="severity" value="info"/> + <property name="tokens" value="ASSIGN, BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN, BXOR_ASSIGN, DIV_ASSIGN, MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, SL_ASSIGN, SR_ASSIGN, STAR_ASSIGN"/> + </module> + <module name="JUnitTestCase"> + <property name="severity" value="ignore"/> + </module> + <module name="MissingSwitchDefault"/> + <module name="NestedIfDepth"> + <property name="severity" value="info"/> + <property name="max" value="3"/> + </module> + <module name="NestedTryDepth"> + <property name="severity" value="info"/> + <property name="max" value="2"/> + </module> + <module name="PackageDeclaration"/> + <module name="ParameterAssignment"/> + <module name="ReturnCount"> + <property name="severity" value="info"/> + <property name="max" value="3"/> + </module> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + <module name="StringLiteralEquality"/> + <module name="SuperClone"> + <property name="severity" value="info"/> + </module> + <module name="SuperFinalize"/> + <module name="FinalClass"/> + <module name="HideUtilityClassConstructor"/> + <module name="InterfaceIsType"/> + <module name="ThrowsCount"> + <property name="max" value="5"/> + </module> + <module name="VisibilityModifier"> + <property name="packageAllowed" value="true"/> + <property name="protectedAllowed" value="true"/> + </module> + <module name="AvoidStarImport"/> + <module name="IllegalImport"/> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + <module name="JavadocMethod"> + <property name="scope" value="package"/> + <property name="allowMissingPropertyJavadoc" value="true"/> + <property name="suppressLoadErrors" value="true"/> + <property name="tokens" value="METHOD_DEF"/> + </module> + <module name="JavadocStyle"> + <property name="severity" value="info"/> + <property name="scope" value="package"/> + <property name="checkFirstSentence" value="false"/> + </module> + <module name="JavadocType"> + <property name="scope" value="package"/> + <property name="authorFormat" value="^[a-zA-Z @\.]*$"/> + </module> + <module name="JavadocVariable"> + <property name="scope" value="package"/> + </module> + <module name="CyclomaticComplexity"> + <property name="severity" value="info"/> + <property name="max" value="18"/> + </module> + <module name="ConstantName"/> + <module name="LocalFinalVariableName"/> + <module name="LocalVariableName"> + <property name="severity" value="info"/> + </module> + <module name="MemberName"> + <property name="severity" value="info"/> + </module> + <module name="MethodName"/> + <module name="PackageName"> + <property name="severity" value="ignore"/> + <property name="format" value="^[a-z]+(\.[a-z][a-z]*)*$"/> + </module> + <module name="ParameterName"> + <property name="severity" value="info"/> + </module> + <module name="StaticVariableName"/> + <module name="TypeName"/> + <module name="AnonInnerLength"/> + <module name="ExecutableStatementCount"> + <property name="severity" value="info"/> + <property name="max" value="50"/> + <property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/> + </module> + <module name="FileLength"/> + <module name="LineLength"> + <property name="max" value="160"/> + </module> + <module name="MethodLength"/> + <module name="ParameterNumber"/> + <module name="EmptyForIteratorPad"/> + <module name="NoWhitespaceAfter"> + <property name="tokens" value="BNOT,DEC,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/> + </module> + <module name="NoWhitespaceBefore"/> + <module name="OperatorWrap"/> + <module name="ParenPad"/> + <module name="TabCharacter"/> + <module name="TypecastParenPad"> + <property name="tokens" value="RPAREN, TYPECAST"/> + </module> + <module name="WhitespaceAfter"/> + <module name="WhitespaceAround"> + <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND,WILDCARD_TYPE"/> + </module> + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + <module name="LocalFinalVariableName"/> + <module name="IllegalThrows"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="avoid generic runtime exceptions"/> + </module> + <module name="MultipleStringLiterals"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="duplicate strings"/> + <property name="severity" value="ignore"/> + </module> + <module name="MultipleVariableDeclarations"> + <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="single declaration"/> + </module> + <module name="ModifiedControlVariable"> + <property name="severity" value="ignore"/> + </module> + </module> +</module> Property changes on: trunk/src/config/checkstyle.xml ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 12:23:50
|
Revision: 767 http://openutils.svn.sourceforge.net/openutils/?rev=767&view=rev Author: fgiust Date: 2008-04-27 05:23:57 -0700 (Sun, 27 Apr 2008) Log Message: ----------- remove explicit dependencies. Needs to be built with openutils-testing 2.1.1. Modified Paths: -------------- trunk/openutils-testing-junit/pom.xml Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 12:22:19 UTC (rev 766) +++ trunk/openutils-testing-junit/pom.xml 2008-04-27 12:23:57 UTC (rev 767) @@ -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> @@ -17,45 +18,6 @@ <version>2.1</version> </dependency> <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit-addons</groupId> - <artifactId>junit-addons</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.4</version> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 12:22:16
|
Revision: 766 http://openutils.svn.sourceforge.net/openutils/?rev=766&view=rev Author: fgiust Date: 2008-04-27 05:22:19 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-testing-junit/pom.xml Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 12:22:10 UTC (rev 765) +++ trunk/openutils-testing-junit/pom.xml 2008-04-27 12:22:19 UTC (rev 766) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-testing-junit</artifactId> <name>openutils test utils (junit)</name> - <version>2.1</version> + <version>2.1.1-SNAPSHOT</version> <description>openutils test utils</description> <dependencies> <dependency> @@ -118,10 +118,4 @@ <properties> <spring.version>2.5.3</spring.version> </properties> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-2.1</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-2.1</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-junit-2.1</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...> - 2008-04-27 12:22:05
|
Revision: 765 http://openutils.svn.sourceforge.net/openutils/?rev=765&view=rev Author: fgiust Date: 2008-04-27 05:22:10 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-testing-junit-2.1 Added Paths: ----------- tags/openutils-testing-junit-2.1/ tags/openutils-testing-junit-2.1/pom.xml Removed Paths: ------------- tags/openutils-testing-junit-2.1/pom.xml Copied: tags/openutils-testing-junit-2.1 (from rev 763, trunk/openutils-testing-junit) Deleted: tags/openutils-testing-junit-2.1/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 12:20:46 UTC (rev 763) +++ tags/openutils-testing-junit-2.1/pom.xml 2008-04-27 12:22:10 UTC (rev 765) @@ -1,122 +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>7</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-testing-junit</artifactId> - <name>openutils test utils (junit)</name> - <version>2.0.3-SNAPSHOT</version> - <description>openutils test utils</description> - <dependencies> - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-testing</artifactId> - <version>2.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit-addons</groupId> - <artifactId>junit-addons</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.4</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - <version>3.2.1.ga</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>cglib</groupId> - <artifactId>cglib</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.2.2.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>commons-dbcp</groupId> - <artifactId>commons-dbcp</artifactId> - <version>1.2.1</version> - <scope>test</scope> - <exclusions> - <exclusion> - <artifactId>xerces</artifactId> - <groupId>xerces</groupId> - </exclusion> - <exclusion> - <artifactId>xml-apis</artifactId> - <groupId>xml-apis</groupId> - </exclusion> - <exclusion> - <artifactId>commons-logging</artifactId> - <groupId>commons-logging</groupId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <properties> - <spring.version>2.5.3</spring.version> - </properties> -</project> \ No newline at end of file Copied: tags/openutils-testing-junit-2.1/pom.xml (from rev 764, trunk/openutils-testing-junit/pom.xml) =================================================================== --- tags/openutils-testing-junit-2.1/pom.xml (rev 0) +++ tags/openutils-testing-junit-2.1/pom.xml 2008-04-27 12:22:10 UTC (rev 765) @@ -0,0 +1,127 @@ +<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>7</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing-junit</artifactId> + <name>openutils test utils (junit)</name> + <version>2.1</version> + <description>openutils test utils</description> + <dependencies> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + <exclusion> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.2</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>junit-addons</groupId> + <artifactId>junit-addons</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.4</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + <version>3.2.1.ga</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>cglib</groupId> + <artifactId>cglib</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <version>10.2.2.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>xerces</artifactId> + <groupId>xerces</groupId> + </exclusion> + <exclusion> + <artifactId>xml-apis</artifactId> + <groupId>xml-apis</groupId> + </exclusion> + <exclusion> + <artifactId>commons-logging</artifactId> + <groupId>commons-logging</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <properties> + <spring.version>2.5.3</spring.version> + </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-2.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-2.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-junit-2.1</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...> - 2008-04-27 12:21:43
|
Revision: 764 http://openutils.svn.sourceforge.net/openutils/?rev=764&view=rev Author: fgiust Date: 2008-04-27 05:21:49 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-testing-junit-2.1 Modified Paths: -------------- trunk/openutils-testing-junit/pom.xml Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 12:20:46 UTC (rev 763) +++ trunk/openutils-testing-junit/pom.xml 2008-04-27 12:21:49 UTC (rev 764) @@ -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-junit</artifactId> <name>openutils test utils (junit)</name> - <version>2.0.3-SNAPSHOT</version> + <version>2.1</version> <description>openutils test utils</description> <dependencies> <dependency> @@ -119,4 +118,10 @@ <properties> <spring.version>2.5.3</spring.version> </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-2.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-2.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-junit-2.1</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...> - 2008-04-27 12:20:42
|
Revision: 763 http://openutils.svn.sourceforge.net/openutils/?rev=763&view=rev Author: fgiust Date: 2008-04-27 05:20:46 -0700 (Sun, 27 Apr 2008) Log Message: ----------- cleanup poms Modified Paths: -------------- trunk/openutils-testing/pom.xml trunk/openutils-testing-junit/pom.xml trunk/openutils-testing-testng/pom.xml Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-04-27 12:05:52 UTC (rev 762) +++ trunk/openutils-testing/pom.xml 2008-04-27 12:20:46 UTC (rev 763) @@ -39,6 +39,36 @@ </exclusions> </dependency> <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + <exclusion> + <groupId>org.testng</groupId> + <artifactId>testng</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.dbunit</groupId> <artifactId>dbunit</artifactId> <version>2.2</version> Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 12:05:52 UTC (rev 762) +++ trunk/openutils-testing-junit/pom.xml 2008-04-27 12:20:46 UTC (rev 763) @@ -27,69 +27,36 @@ <artifactId>commons-logging</artifactId> </exclusion> <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + <exclusion> <groupId>org.testng</groupId> <artifactId>testng</artifactId> </exclusion> </exclusions> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.5.0</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> + <groupId>org.dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.2</version> + <optional>true</optional> <exclusions> <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> + <groupId>junit</groupId> + <artifactId>junit</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-orm</artifactId> - <version>${spring.version}</version> - <optional>true</optional> - <exclusions> <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> + <groupId>junit-addons</groupId> + <artifactId>junit-addons</artifactId> </exclusion> </exclusions> </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>junit</groupId> <artifactId>junit</artifactId> <version>4.4</version> Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2008-04-27 12:05:52 UTC (rev 762) +++ trunk/openutils-testing-testng/pom.xml 2008-04-27 12:20:46 UTC (rev 763) @@ -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> @@ -17,80 +18,6 @@ <version>2.1</version> </dependency> <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.5.0</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-orm</artifactId> - <version>${spring.version}</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit-addons</groupId> - <artifactId>junit-addons</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <classifier>jdk15</classifier> @@ -103,22 +30,6 @@ </exclusions> </dependency> <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - <version>3.2.1.ga</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>cglib</groupId> - <artifactId>cglib</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.2.2.0</version> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 12:05:48
|
Revision: 762 http://openutils.svn.sourceforge.net/openutils/?rev=762&view=rev Author: fgiust Date: 2008-04-27 05:05:52 -0700 (Sun, 27 Apr 2008) 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 2008-04-27 12:05:40 UTC (rev 761) +++ trunk/openutils-testing-testng/pom.xml 2008-04-27 12:05:52 UTC (rev 762) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-testing-testng</artifactId> <name>openutils test utils (testng)</name> - <version>2.1</version> + <version>2.1.1-SNAPSHOT</version> <description>openutils test utils</description> <dependencies> <dependency> @@ -160,10 +160,4 @@ <properties> <spring.version>2.5.3</spring.version> </properties> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-2.1</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-2.1</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-testng-2.1</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...> - 2008-04-27 12:05:34
|
Revision: 761 http://openutils.svn.sourceforge.net/openutils/?rev=761&view=rev Author: fgiust Date: 2008-04-27 05:05:40 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-testing-testng-2.1 Added Paths: ----------- tags/openutils-testing-testng-2.1/ Copied: tags/openutils-testing-testng-2.1 (from rev 760, trunk/openutils-testing-testng) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 12:04:43
|
Revision: 760 http://openutils.svn.sourceforge.net/openutils/?rev=760&view=rev Author: fgiust Date: 2008-04-27 05:04:49 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-testing-testng-2.1 Modified Paths: -------------- trunk/openutils-testing-testng/pom.xml Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2008-04-27 12:03:55 UTC (rev 759) +++ trunk/openutils-testing-testng/pom.xml 2008-04-27 12:04:49 UTC (rev 760) @@ -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>2.0.3-SNAPSHOT</version> + <version>2.1</version> <description>openutils test utils</description> <dependencies> <dependency> @@ -161,4 +160,10 @@ <properties> <spring.version>2.5.3</spring.version> </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-2.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-testng-2.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-testng-2.1</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...> - 2008-04-27 12:03:48
|
Revision: 759 http://openutils.svn.sourceforge.net/openutils/?rev=759&view=rev Author: fgiust Date: 2008-04-27 05:03:55 -0700 (Sun, 27 Apr 2008) Log Message: ----------- update poms Modified Paths: -------------- trunk/openutils-testing-junit/pom.xml trunk/openutils-testing-testng/pom.xml Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2008-04-27 10:00:09 UTC (rev 758) +++ trunk/openutils-testing-junit/pom.xml 2008-04-27 12:03:55 UTC (rev 759) @@ -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> @@ -14,7 +15,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-testing</artifactId> - <version>2.0.2</version> + <version>2.1</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -34,7 +35,7 @@ <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>1.4.3</version> + <version>1.5.0</version> </dependency> <dependency> <groupId>log4j</groupId> @@ -77,11 +78,6 @@ </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> @@ -154,6 +150,6 @@ </dependency> </dependencies> <properties> - <spring.version>2.5.1</spring.version> + <spring.version>2.5.3</spring.version> </properties> </project> \ No newline at end of file Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2008-04-27 10:00:09 UTC (rev 758) +++ trunk/openutils-testing-testng/pom.xml 2008-04-27 12:03:55 UTC (rev 759) @@ -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> @@ -14,7 +15,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-testing</artifactId> - <version>2.0.2</version> + <version>2.1</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -34,14 +35,9 @@ <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>1.4.3</version> + <version>1.5.0</version> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl104-over-slf4j</artifactId> - <version>1.4.3</version> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> @@ -76,11 +72,6 @@ </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> @@ -168,6 +159,6 @@ </dependency> </dependencies> <properties> - <spring.version>2.5.1</spring.version> + <spring.version>2.5.3</spring.version> </properties> </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...> - 2008-04-27 10:00:19
|
Revision: 758 http://openutils.svn.sourceforge.net/openutils/?rev=758&view=rev Author: fgiust Date: 2008-04-27 03:00:09 -0700 (Sun, 27 Apr 2008) Log Message: ----------- 2.1.1-SNAPSHOT Modified Paths: -------------- trunk/openutils-testing/pom.xml Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-04-27 09:57:22 UTC (rev 757) +++ trunk/openutils-testing/pom.xml 2008-04-27 10:00:09 UTC (rev 758) @@ -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> @@ -8,7 +9,7 @@ </parent> <artifactId>openutils-testing</artifactId> <name>openutils test utils</name> - <version>2.1-SNAPSHOT</version> + <version>2.1.1-SNAPSHOT</version> <description>openutils test utils</description> <dependencies> <dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 09:57:40
|
Revision: 757 http://openutils.svn.sourceforge.net/openutils/?rev=757&view=rev Author: fgiust Date: 2008-04-27 02:57:22 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-testing/pom.xml Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-04-27 09:56:43 UTC (rev 756) +++ trunk/openutils-testing/pom.xml 2008-04-27 09:57:22 UTC (rev 757) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-testing</artifactId> <name>openutils test utils</name> - <version>2.1</version> + <version>2.1-SNAPSHOT</version> <description>openutils test utils</description> <dependencies> <dependency> @@ -74,10 +74,4 @@ <properties> <spring.version>2.5.3</spring.version> </properties> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-2.1</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-2.1</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-2.1</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...> - 2008-04-27 09:57:03
|
Revision: 756 http://openutils.svn.sourceforge.net/openutils/?rev=756&view=rev Author: fgiust Date: 2008-04-27 02:56:43 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-testing-2.1 Added Paths: ----------- tags/openutils-testing-2.1/ tags/openutils-testing-2.1/pom.xml tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java tags/openutils-testing-2.1/src/site/changes/changes.xml Removed Paths: ------------- tags/openutils-testing-2.1/pom.xml tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java tags/openutils-testing-2.1/src/site/changes/changes.xml Copied: tags/openutils-testing-2.1 (from rev 751, trunk/openutils-testing) Deleted: tags/openutils-testing-2.1/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-03-20 17:39:12 UTC (rev 751) +++ tags/openutils-testing-2.1/pom.xml 2008-04-27 09:56:43 UTC (rev 756) @@ -1,78 +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>7</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-testing</artifactId> - <name>openutils test utils</name> - <version>2.0.4-SNAPSHOT</version> - <description>openutils test utils</description> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</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>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </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.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit-addons</groupId> - <artifactId>junit-addons</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.7</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <properties> - <spring.version>2.5.1</spring.version> - </properties> -</project> \ No newline at end of file Copied: tags/openutils-testing-2.1/pom.xml (from rev 755, trunk/openutils-testing/pom.xml) =================================================================== --- tags/openutils-testing-2.1/pom.xml (rev 0) +++ tags/openutils-testing-2.1/pom.xml 2008-04-27 09:56:43 UTC (rev 756) @@ -0,0 +1,83 @@ +<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>7</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing</artifactId> + <name>openutils test utils</name> + <version>2.1</version> + <description>openutils test utils</description> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.4</version> + </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.dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.2</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>junit-addons</groupId> + <artifactId>junit-addons</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.7</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <properties> + <spring.version>2.5.3</spring.version> + </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-2.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-2.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-2.1</url> + </scm> +</project> \ No newline at end of file Deleted: tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java =================================================================== --- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-03-20 17:39:12 UTC (rev 751) +++ tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-04-27 09:56:43 UTC (rev 756) @@ -1,83 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.dbunit.dataset.datatype.IDataTypeFactory; -import org.dbunit.operation.DatabaseOperation; - - -/** - * @author fgiust - * @version $Id$ - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Documented -public @interface DbUnitExecution { - - /** - * The resource locations to use for loading dbunit dataset. - */ - String[] datasets() default { - - }; - - /** - * The name of the datasource to use. If can be left unset only if there is only one DataSource available in the - * Spring context. - */ - String dataSource() default ""; - - /** - * Db schema name that will be given to dbUnit. Can be left unset if not needed (database specific) - */ - String schema() default ""; - - /** - * The datatype factory (DatabaseConfig.PROPERTY_DATATYPE_FACTORY) to use. Can be left unset if not needed. - */ - Class< ? extends IDataTypeFactory> dataTypeFactory(); - - /** - * A regexp that can match table names. Any table matching this regular expression will not be considered by DbUnit. - * By default tables starting with BIN$ are ignored (oracle recycle bin). - */ - String excludedTables() default "^BIN\\$(.*)"; // oracle recycle bin - - /** - * If true, <strong>all</strong> the tables in the database will be truncated before loading any dataset. - */ - boolean truncateAll() default true; - - /** - * The database operation that will be used to truncate tables. Defaults to org.dbunit.operation.DeleteAllOperation - */ - Class< ? extends DatabaseOperation> truncateOperation() default org.dbunit.operation.DeleteAllOperation.class; - - /** - * The database operation that will be used to load datasets. Defaults to org.dbunit.operation.InsertOperation - */ - Class< ? extends DatabaseOperation> insertOperation() default org.dbunit.operation.InsertOperation.class; - -} \ No newline at end of file Copied: tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java (from rev 752, trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java) =================================================================== --- tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java (rev 0) +++ tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-04-27 09:56:43 UTC (rev 756) @@ -0,0 +1,84 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.testing; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.dbunit.dataset.datatype.DefaultDataTypeFactory; +import org.dbunit.dataset.datatype.IDataTypeFactory; +import org.dbunit.operation.DatabaseOperation; + + +/** + * @author fgiust + * @version $Id$ + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Inherited +@Documented +public @interface DbUnitExecution { + + /** + * The resource locations to use for loading dbunit dataset. + */ + String[] datasets() default { + + }; + + /** + * The name of the datasource to use. If can be left unset only if there is only one DataSource available in the + * Spring context. + */ + String dataSource() default ""; + + /** + * Db schema name that will be given to dbUnit. Can be left unset if not needed (database specific) + */ + String schema() default ""; + + /** + * The datatype factory (DatabaseConfig.PROPERTY_DATATYPE_FACTORY) to use. Can be left unset if not needed. + */ + Class< ? extends IDataTypeFactory> dataTypeFactory() default DefaultDataTypeFactory.class; + + /** + * A regexp that can match table names. Any table matching this regular expression will not be considered by DbUnit. + * By default tables starting with BIN$ are ignored (oracle recycle bin). + */ + String excludedTables() default "^BIN\\$(.*)"; // oracle recycle bin + + /** + * If true, <strong>all</strong> the tables in the database will be truncated before loading any dataset. + */ + boolean truncateAll() default true; + + /** + * The database operation that will be used to truncate tables. Defaults to org.dbunit.operation.DeleteAllOperation + */ + Class< ? extends DatabaseOperation> truncateOperation() default org.dbunit.operation.DeleteAllOperation.class; + + /** + * The database operation that will be used to load datasets. Defaults to org.dbunit.operation.InsertOperation + */ + Class< ? extends DatabaseOperation> insertOperation() default org.dbunit.operation.InsertOperation.class; + +} \ No newline at end of file Deleted: tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java =================================================================== --- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitTestContext.java 2008-03-20 17:39:12 UTC (rev 751) +++ tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java 2008-04-27 09:56:43 UTC (rev 756) @@ -1,336 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing; - -import java.io.IOException; -import java.net.URL; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; - -import javax.sql.DataSource; - -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.StringUtils; -import org.dbunit.DatabaseUnitException; -import org.dbunit.database.DatabaseConfig; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.database.DatabaseSequenceFilter; -import org.dbunit.database.IDatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.FilteredDataSet; -import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.datatype.IDataTypeFactory; -import org.dbunit.dataset.filter.ITableFilter; -import org.dbunit.dataset.filter.SequenceTableFilter; -import org.dbunit.operation.DatabaseOperation; -import org.dbunit.operation.DeleteAllOperation; -import org.dbunit.operation.DeleteOperation; -import org.dbunit.operation.InsertOperation; -import org.dbunit.operation.RefreshOperation; -import org.dbunit.operation.TruncateTableOperation; -import org.dbunit.operation.UpdateOperation; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.ApplicationContext; - - -/** - * @author fgiust - * @version $Id$ - */ -public class DbUnitTestContext -{ - - /** - * Truncate dataset cache. This is kept as a static attribute since the creation of the dataset is very expensive - * and it doesn't change across tests. - */ - protected static Map<String, IDataSet> truncateDataSetCache = new HashMap<String, IDataSet>(); - - /** - * Logger. - */ - private static Logger log = LoggerFactory.getLogger(DbUnitTestContext.class); - - /** - * The test instance. - */ - private Object testcase; - - /** - * Spring application context. - */ - private ApplicationContext applicationContext; - - /** - * Dataset cache. - */ - private Map<String, IDataSet> datasetCache = new HashMap<String, IDataSet>(); - - /** - * Instantiates a new DbUnitTestContext - * @param testcase test instance - * @param applicationContext Spring application context - */ - public DbUnitTestContext(Object testcase, ApplicationContext applicationContext) - { - this.testcase = testcase; - this.applicationContext = applicationContext; - } - - /** - * Setup the Database before running the test method. - * @throws Exception Any exception. - */ - @SuppressWarnings("unchecked") - public void setUpDbUnit() throws Exception - { - DbUnitExecution singleDbUnitExecution = testcase.getClass().getAnnotation(DbUnitExecution.class); - - DbUnitExecution[] executions = null; - if (singleDbUnitExecution != null) - { - executions = new DbUnitExecution[]{singleDbUnitExecution }; - } - else - { - DbUnitConfiguration dbUnitConfiguration = testcase.getClass().getAnnotation(DbUnitConfiguration.class); - if (dbUnitConfiguration != null) - { - executions = dbUnitConfiguration.dbUnitExecutions(); - } - } - if (executions != null) - { - for (DbUnitExecution dbUnitExecution : executions) - { - String[] datasets = dbUnitExecution.datasets(); - String dataSourceName = dbUnitExecution.dataSource(); - String schema = dbUnitExecution.schema(); - if (StringUtils.isEmpty(schema)) - { - schema = null; - } - - IDatabaseConnection connection = new DatabaseConnection( - getDatasource(dataSourceName).getConnection(), - schema); - - if (dbUnitExecution.dataTypeFactory() != null) - { - IDataTypeFactory dataTypeFactory = dbUnitExecution.dataTypeFactory().newInstance(); - connection.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, dataTypeFactory); - } - - try - { - ITableFilter tableFilter = new RegExpTableFilter(dbUnitExecution.excludedTables()); - - if (dbUnitExecution.truncateAll()) - { - truncateAll(connection, tableFilter, dataSourceName, getDatabaseOperation(dbUnitExecution - .truncateOperation())); - } - - DatabaseOperation dbOperation = getDatabaseOperation(dbUnitExecution.insertOperation()); - for (String datasetFile : datasets) - { - importDataSet(createDataset(datasetFile), connection, tableFilter, dataSourceName, dbOperation); - } - } - finally - { - connection.close(); - } - } - } - } - - /** - * Instantiates the givec Database Operation. Standard operations in the <code>org.dbunit.operation</code> package - * have protected constructors and needs to be accessed using the public static fields in - * <code>org.dbunit.operation.DatabaseOperation</code>. - * @param dboperationClass db operation class - * @return db operation instance - * @throws InstantiationException if the given db operation class cannot be instantiated - * @throws IllegalAccessException if the given db operation class cannot be instantiated - */ - private DatabaseOperation getDatabaseOperation(Class< ? extends DatabaseOperation> dboperationClass) - throws InstantiationException, IllegalAccessException - { - if (UpdateOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.UPDATE; - } - else if (InsertOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.INSERT; - } - else if (RefreshOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.REFRESH; - } - else if (DeleteOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.DELETE; - } - else if (DeleteAllOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.DELETE_ALL; - } - else if (TruncateTableOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.TRUNCATE_TABLE; - } - else if (DeleteOperation.class.equals(dboperationClass)) - { - return DatabaseOperation.UPDATE; - } - - return dboperationClass.newInstance(); - - } - - /** - * Creates a dataset instance by fetching a file from the classpath - * @param datasetFile name of the file, will be loaded from the classpath - * @return IDataSet instance - * @throws IOException - * @throws DataSetException - */ - private IDataSet createDataset(String datasetFile) throws IOException, DataSetException - { - IDataSet dataSet = datasetCache.get(datasetFile); - if (dataSet == null) - { - URL datasetUrl = getClass().getResource(datasetFile); - if (datasetUrl == null) - { - throw new IllegalArgumentException("Dataset " + datasetFile + " not found"); - } - dataSet = DbUnitUtils.loadDataset(datasetUrl); - datasetCache.put(datasetFile, dataSet); - } - return dataSet; - } - - private void importDataSet(IDataSet dataSet, IDatabaseConnection connection, ITableFilter tableFilter, - String dataSourceName, DatabaseOperation databaseOperation) throws SQLException, DataSetException, - DatabaseUnitException - { - - if (dataSet == null) - { - throw new IllegalArgumentException("dataSet is null"); - } - - IDataSet orderedDataset = new FilteredDataSet(tableFilter, dataSet); - if (log.isDebugEnabled()) - { - log.debug("Tables: {}", ArrayUtils.toString(orderedDataset.getTableNames())); - } - - // if a sorted dataset is available, use table sequence for sorting - IDataSet truncateDataSet = getTruncateDataset(dataSourceName, connection.getSchema()); - if (truncateDataSet != null) - { - ITableFilter filter = new SequenceTableFilter(truncateDataSet.getTableNames()); - orderedDataset = new FilteredDataSet(filter, dataSet); - } - - if (dataSet != null) - { - databaseOperation.execute(connection, orderedDataset); - } - - } - - /** - * @param connection - * @param tableFilter - * @throws SQLException - * @throws DataSetException - * @throws DatabaseUnitException - */ - private void truncateAll(IDatabaseConnection connection, ITableFilter tableFilter, String dataSourceName, - DatabaseOperation databaseOperation) throws SQLException, DataSetException, DatabaseUnitException - { - IDataSet truncateDataSet = getTruncateDataset(dataSourceName, connection.getSchema()); - if (truncateDataSet == null) - { - log.debug("Generating sorted dataset for initial cleanup"); - IDataSet unsortedDataSet = connection.createDataSet(); - - if (log.isDebugEnabled()) - { - log.debug("Unfiltered truncateDataSet: {}", ArrayUtils.toString(unsortedDataSet.getTableNames())); - } - - // excluded unwanted tables - unsortedDataSet = new FilteredDataSet(tableFilter, unsortedDataSet); - - // sort tables - ITableFilter sortingFilter = new DatabaseSequenceFilter(connection, unsortedDataSet.getTableNames()); - truncateDataSet = new FilteredDataSet(sortingFilter, unsortedDataSet); - - storeTruncateDataset(dataSourceName, connection.getSchema(), truncateDataSet); - log.debug("Sorted dataset generated"); - } - - if (truncateDataSet != null) - { - if (log.isDebugEnabled()) - { - log.debug("Tables truncateDataSet: {}", ArrayUtils.toString(truncateDataSet.getTableNames())); - } - databaseOperation.execute(connection, truncateDataSet); - } - } - - private IDataSet getTruncateDataset(String datasourceName, String schema) - { - return truncateDataSetCache.get(datasourceName + "_" + StringUtils.defaultString(schema)); - } - - private IDataSet storeTruncateDataset(String datasourceName, String schema, IDataSet dataset) - { - return truncateDataSetCache.put(datasourceName + "_" + StringUtils.defaultString(schema), dataset); - } - - /** - * Loads a named datasource from the spring context. - * @param name datasource name. - * @return Datasource instance - */ - @SuppressWarnings("unchecked") - protected DataSource getDatasource(String name) - { - if (StringUtils.isEmpty(name)) - { - Map<String, DataSource> dsMap = applicationContext.getBeansOfType(DataSource.class); - if (dsMap == null || dsMap.size() != 1) - { - throw new RuntimeException( - "Unable to find a datasource in spring applicationContext, please specify the datasource bean name " - + "using the \"datasource\" attribute of @DbUnitConfiguration"); - } - return dsMap.values().iterator().next(); - } - return (DataSource) applicationContext.getBean(name); - } - -} Copied: tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java (from rev 753, trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitTestContext.java) =================================================================== --- tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java (rev 0) +++ tags/openutils-testing-2.1/src/main/java/it/openutils/testing/DbUnitTestContext.java 2008-04-27 09:56:43 UTC (rev 756) @@ -0,0 +1,335 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.testing; + +import java.io.IOException; +import java.net.URL; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; + +import javax.sql.DataSource; + +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; +import org.dbunit.DatabaseUnitException; +import org.dbunit.database.DatabaseConfig; +import org.dbunit.database.DatabaseConnection; +import org.dbunit.database.DatabaseSequenceFilter; +import org.dbunit.database.IDatabaseConnection; +import org.dbunit.dataset.DataSetException; +import org.dbunit.dataset.FilteredDataSet; +import org.dbunit.dataset.IDataSet; +import org.dbunit.dataset.datatype.IDataTypeFactory; +import org.dbunit.dataset.filter.ITableFilter; +import org.dbunit.dataset.filter.SequenceTableFilter; +import org.dbunit.operation.DatabaseOperation; +import org.dbunit.operation.DeleteAllOperation; +import org.dbunit.operation.DeleteOperation; +import org.dbunit.operation.InsertOperation; +import org.dbunit.operation.RefreshOperation; +import org.dbunit.operation.TruncateTableOperation; +import org.dbunit.operation.UpdateOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ApplicationContext; + + +/** + * @author fgiust + * @version $Id$ + */ +public class DbUnitTestContext +{ + + /** + * Truncate dataset cache. This is kept as a static attribute since the creation of the dataset is very expensive + * and it doesn't change across tests. + */ + protected static Map<String, IDataSet> truncateDataSetCache = new HashMap<String, IDataSet>(); + + /** + * Logger. + */ + private static Logger log = LoggerFactory.getLogger(DbUnitTestContext.class); + + /** + * The test instance. + */ + private Object testcase; + + /** + * Spring application context. + */ + private ApplicationContext applicationContext; + + /** + * Dataset cache. + */ + private Map<String, IDataSet> datasetCache = new HashMap<String, IDataSet>(); + + /** + * Instantiates a new DbUnitTestContext + * @param testcase test instance + * @param applicationContext Spring application context + */ + public DbUnitTestContext(Object testcase, ApplicationContext applicationContext) + { + this.testcase = testcase; + this.applicationContext = applicationContext; + } + + /** + * Setup the Database before running the test method. + * @throws Exception Any exception. + */ + public void setUpDbUnit() throws Exception + { + DbUnitExecution singleDbUnitExecution = testcase.getClass().getAnnotation(DbUnitExecution.class); + + DbUnitExecution[] executions = null; + if (singleDbUnitExecution != null) + { + executions = new DbUnitExecution[]{singleDbUnitExecution }; + } + else + { + DbUnitConfiguration dbUnitConfiguration = testcase.getClass().getAnnotation(DbUnitConfiguration.class); + if (dbUnitConfiguration != null) + { + executions = dbUnitConfiguration.dbUnitExecutions(); + } + } + if (executions != null) + { + for (DbUnitExecution dbUnitExecution : executions) + { + String[] datasets = dbUnitExecution.datasets(); + String dataSourceName = dbUnitExecution.dataSource(); + String schema = dbUnitExecution.schema(); + if (StringUtils.isEmpty(schema)) + { + schema = null; + } + + IDatabaseConnection connection = new DatabaseConnection( + getDatasource(dataSourceName).getConnection(), + schema); + + if (dbUnitExecution.dataTypeFactory() != null) + { + IDataTypeFactory dataTypeFactory = dbUnitExecution.dataTypeFactory().newInstance(); + connection.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, dataTypeFactory); + } + + try + { + ITableFilter tableFilter = new RegExpTableFilter(dbUnitExecution.excludedTables()); + + if (dbUnitExecution.truncateAll()) + { + truncateAll(connection, tableFilter, dataSourceName, getDatabaseOperation(dbUnitExecution + .truncateOperation())); + } + + DatabaseOperation dbOperation = getDatabaseOperation(dbUnitExecution.insertOperation()); + for (String datasetFile : datasets) + { + importDataSet(createDataset(datasetFile), connection, tableFilter, dataSourceName, dbOperation); + } + } + finally + { + connection.close(); + } + } + } + } + + /** + * Instantiates the givec Database Operation. Standard operations in the <code>org.dbunit.operation</code> package + * have protected constructors and needs to be accessed using the public static fields in + * <code>org.dbunit.operation.DatabaseOperation</code>. + * @param dboperationClass db operation class + * @return db operation instance + * @throws InstantiationException if the given db operation class cannot be instantiated + * @throws IllegalAccessException if the given db operation class cannot be instantiated + */ + private DatabaseOperation getDatabaseOperation(Class< ? extends DatabaseOperation> dboperationClass) + throws InstantiationException, IllegalAccessException + { + if (UpdateOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.UPDATE; + } + else if (InsertOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.INSERT; + } + else if (RefreshOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.REFRESH; + } + else if (DeleteOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.DELETE; + } + else if (DeleteAllOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.DELETE_ALL; + } + else if (TruncateTableOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.TRUNCATE_TABLE; + } + else if (DeleteOperation.class.equals(dboperationClass)) + { + return DatabaseOperation.UPDATE; + } + + return dboperationClass.newInstance(); + + } + + /** + * Creates a dataset instance by fetching a file from the classpath + * @param datasetFile name of the file, will be loaded from the classpath + * @return IDataSet instance + * @throws IOException + * @throws DataSetException + */ + private IDataSet createDataset(String datasetFile) throws IOException, DataSetException + { + IDataSet dataSet = datasetCache.get(datasetFile); + if (dataSet == null) + { + URL datasetUrl = getClass().getResource(datasetFile); + if (datasetUrl == null) + { + throw new IllegalArgumentException("Dataset " + datasetFile + " not found"); + } + dataSet = DbUnitUtils.loadDataset(datasetUrl); + datasetCache.put(datasetFile, dataSet); + } + return dataSet; + } + + private void importDataSet(IDataSet dataSet, IDatabaseConnection connection, ITableFilter tableFilter, + String dataSourceName, DatabaseOperation databaseOperation) throws SQLException, DataSetException, + DatabaseUnitException + { + + if (dataSet == null) + { + throw new IllegalArgumentException("dataSet is null"); + } + + IDataSet orderedDataset = new FilteredDataSet(tableFilter, dataSet); + if (log.isDebugEnabled()) + { + log.debug("Tables: {}", ArrayUtils.toString(orderedDataset.getTableNames())); + } + + // if a sorted dataset is available, use table sequence for sorting + IDataSet truncateDataSet = getTruncateDataset(dataSourceName, connection.getSchema()); + if (truncateDataSet != null) + { + ITableFilter filter = new SequenceTableFilter(truncateDataSet.getTableNames()); + orderedDataset = new FilteredDataSet(filter, dataSet); + } + + if (dataSet != null) + { + databaseOperation.execute(connection, orderedDataset); + } + + } + + /** + * @param connection + * @param tableFilter + * @throws SQLException + * @throws DataSetException + * @throws DatabaseUnitException + */ + private void truncateAll(IDatabaseConnection connection, ITableFilter tableFilter, String dataSourceName, + DatabaseOperation databaseOperation) throws SQLException, DataSetException, DatabaseUnitException + { + IDataSet truncateDataSet = getTruncateDataset(dataSourceName, connection.getSchema()); + if (truncateDataSet == null) + { + log.debug("Generating sorted dataset for initial cleanup"); + IDataSet unsortedDataSet = connection.createDataSet(); + + if (log.isDebugEnabled()) + { + log.debug("Unfiltered truncateDataSet: {}", ArrayUtils.toString(unsortedDataSet.getTableNames())); + } + + // excluded unwanted tables + unsortedDataSet = new FilteredDataSet(tableFilter, unsortedDataSet); + + // sort tables + ITableFilter sortingFilter = new DatabaseSequenceFilter(connection, unsortedDataSet.getTableNames()); + truncateDataSet = new FilteredDataSet(sortingFilter, unsortedDataSet); + + storeTruncateDataset(dataSourceName, connection.getSchema(), truncateDataSet); + log.debug("Sorted dataset generated"); + } + + if (truncateDataSet != null) + { + if (log.isDebugEnabled()) + { + log.debug("Tables truncateDataSet: {}", ArrayUtils.toString(truncateDataSet.getTableNames())); + } + databaseOperation.execute(connection, truncateDataSet); + } + } + + private IDataSet getTruncateDataset(String datasourceName, String schema) + { + return truncateDataSetCache.get(datasourceName + "_" + StringUtils.defaultString(schema)); + } + + private IDataSet storeTruncateDataset(String datasourceName, String schema, IDataSet dataset) + { + return truncateDataSetCache.put(datasourceName + "_" + StringUtils.defaultString(schema), dataset); + } + + /** + * Loads a named datasource from the spring context. + * @param name datasource name. + * @return Datasource instance + */ + @SuppressWarnings("unchecked") + protected DataSource getDatasource(String name) + { + if (StringUtils.isEmpty(name)) + { + Map<String, DataSource> dsMap = applicationContext.getBeansOfType(DataSource.class); + if (dsMap == null || dsMap.size() != 1) + { + throw new RuntimeException( + "Unable to find a datasource in spring applicationContext, please specify the datasource bean name " + + "using the \"datasource\" attribute of @DbUnitConfiguration"); + } + return dsMap.values().iterator().next(); + } + return (DataSource) applicationContext.getBean(name); + } + +} Deleted: tags/openutils-testing-2.1/src/site/changes/changes.xml =================================================================== --- trunk/openutils-testing/src/site/changes/changes.xml 2008-03-20 17:39:12 UTC (rev 751) +++ tags/openutils-testing-2.1/src/site/changes/changes.xml 2008-04-27 09:56:43 UTC (rev 756) @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- - "type" attribute can be: add, remove, update or fix. ---> -<document> - <properties> - <title>Changes</title> - <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> - </properties> - <body> - <release version="2.0.3" date="in svn" description="2.0.3"> - <action type="fix" dev="fgiust"> excludedTables in DbUnitExecution now defaults to "^BIN\\$(.*)", properly excluding - tables in oracle recycle bin.</action> - </release> - <release version="2.0.3" date="2008-02-19" description="2.0.3"> - <action type="update" dev="fgiust"> it.openutils.testing.DateAssert is now thread safe. Failure messages have been - improved.</action> - <action type="add" dev="fcarone"> New option for DbUnitExection to specify the - DatabaseConfig.PROPERTY_DATATYPE_FACTORY added.</action> - </release> - <release version="2.0.2" date="2008-01-31" description="2.0.2"> - <action type="add" dev="fgiust"> New dbunit operation classes for mssql and mysql (extension of standard dbunit - operation, but refactored so that they can be used in annotations). See the javadocs in the - it.openutils.testing.dbunit package</action> - <action type="update" dev="fgiust"> truncate operation now defaults to DbUnitOperation.DELETE_ALL instead of - DbUnitOperation.TRUNCATE.</action> - <action type="fix" dev="fgiust">DbUnitUtils.exportDataset() doesn't close anymore the - provided connection</action> - <action type="add" dev="fgiust">new DbUnitUtils.exportTablesToDir() utility method</action> - </release> - <release version="2.0.1" date="2008-01-30" description="2.0.1"> - <action type="fix" dev="fgiust"> (junit version only). - it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests was totally broken due to the setup method - being protected. Fixed + added tests</action> - </release> - <release version="2.0" date="2008-01-20" description="2.0 release"> - <action type="update" dev="fgiust">Totally reworked dbunit test framework.</action> - </release> - </body> -</document> \ No newline at end of file Copied: tags/openutils-testing-2.1/src/site/changes/changes.xml (from rev 754, trunk/openutils-testing/src/site/changes/changes.xml) =================================================================== --- tags/openutils-testing-2.1/src/site/changes/changes.xml (rev 0) +++ tags/openutils-testing-2.1/src/site/changes/changes.xml 2008-04-27 09:56:43 UTC (rev 756) @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="2.1" date="2008-04-27" description="2.1"> + <action type="update" dev="fgiust">Legacy base test classes (DbUnitTestCase, GenericsDbUnitTestCase) have been + dropped. Stick with 2.0.x if you are still use them or upgrade to 2.1 for a forced migration</action> + <action type="update" dev="fgiust">Updated spring, slf4j and commons-lang dependencies</action> + <action type="fix" dev="fgiust"> excludedTables in DbUnitExecution now defaults to "^BIN\\$(.*)", properly excluding + tables in oracle recycle bin.</action> + <action type="add" dev="fcarone"> New option for DbUnitExection to specify the + DatabaseConfig.PROPERTY_DATATYPE_FACTORY added.</action> + </release> + <release version="2.0.3" date="2008-02-19" description="2.0.3"> + <action type="update" dev="fgiust"> it.openutils.testing.DateAssert is now thread safe. Failure messages have been + improved.</action> + </release> + <release version="2.0.2" date="2008-01-31" description="2.0.2"> + <action type="add" dev="fgiust"> New dbunit operation classes for mssql and mysql (extension of standard dbunit + operation, but refactored so that they can be used in annotations). See the javadocs in the + it.openutils.testing.dbunit package</action> + <action type="update" dev="fgiust"> truncate operation now defaults to DbUnitOperation.DELETE_ALL instead of + DbUnitOperation.TRUNCATE.</action> + <action type="fix" dev="fgiust">DbUnitUtils.exportDataset() doesn't close anymore the + provided connection</action> + <action type="add" dev="fgiust">new DbUnitUtils.exportTablesToDir() utility method</action> + </release> + <release version="2.0.1" date="2008-01-30" description="2.0.1"> + <action type="fix" dev="fgiust"> (junit version only). + it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests was totally broken due to the setup method + being protected. Fixed + added tests</action> + </release> + <release version="2.0" date="2008-01-20" description="2.0 release"> + <action type="update" dev="fgiust">Totally reworked dbunit test framework.</action> + </release> + </body> +</document> \ 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...> - 2008-04-27 09:56:13
|
Revision: 755 http://openutils.svn.sourceforge.net/openutils/?rev=755&view=rev Author: fgiust Date: 2008-04-27 02:56:13 -0700 (Sun, 27 Apr 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-testing-2.1 Modified Paths: -------------- trunk/openutils-testing/pom.xml Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-04-27 09:55:10 UTC (rev 754) +++ trunk/openutils-testing/pom.xml 2008-04-27 09:56:13 UTC (rev 755) @@ -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</artifactId> <name>openutils test utils</name> - <version>2.0.4-SNAPSHOT</version> + <version>2.1</version> <description>openutils test utils</description> <dependencies> <dependency> @@ -75,4 +74,10 @@ <properties> <spring.version>2.5.3</spring.version> </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-2.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-2.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-2.1</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...> - 2008-04-27 09:55:10
|
Revision: 754 http://openutils.svn.sourceforge.net/openutils/?rev=754&view=rev Author: fgiust Date: 2008-04-27 02:55:10 -0700 (Sun, 27 Apr 2008) Log Message: ----------- one more Modified Paths: -------------- trunk/openutils-testing/pom.xml trunk/openutils-testing/src/site/changes/changes.xml Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-04-27 09:51:42 UTC (rev 753) +++ trunk/openutils-testing/pom.xml 2008-04-27 09:55:10 UTC (rev 754) @@ -15,17 +15,17 @@ <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>1.4.1</version> + <version>1.5.0</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl104-over-slf4j</artifactId> - <version>1.4.1</version> + <version>1.5.0</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> - <version>2.3</version> + <version>2.4</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -73,6 +73,6 @@ </dependency> </dependencies> <properties> - <spring.version>2.5.1</spring.version> + <spring.version>2.5.3</spring.version> </properties> </project> \ No newline at end of file Modified: trunk/openutils-testing/src/site/changes/changes.xml =================================================================== --- trunk/openutils-testing/src/site/changes/changes.xml 2008-04-27 09:51:42 UTC (rev 753) +++ trunk/openutils-testing/src/site/changes/changes.xml 2008-04-27 09:55:10 UTC (rev 754) @@ -8,9 +8,10 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> - <release version="2.1" date="in svn" description="2.1"> + <release version="2.1" date="2008-04-27" description="2.1"> <action type="update" dev="fgiust">Legacy base test classes (DbUnitTestCase, GenericsDbUnitTestCase) have been dropped. Stick with 2.0.x if you are still use them or upgrade to 2.1 for a forced migration</action> + <action type="update" dev="fgiust">Updated spring, slf4j and commons-lang dependencies</action> <action type="fix" dev="fgiust"> excludedTables in DbUnitExecution now defaults to "^BIN\\$(.*)", properly excluding tables in oracle recycle bin.</action> <action type="add" dev="fcarone"> New option for DbUnitExection to specify the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-04-27 09:51:46
|
Revision: 753 http://openutils.svn.sourceforge.net/openutils/?rev=753&view=rev Author: fgiust Date: 2008-04-27 02:51:42 -0700 (Sun, 27 Apr 2008) Log Message: ----------- cleanup deprecations for 2.1 Modified Paths: -------------- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitTestContext.java trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/AbstractDbUnitJunitSpringContextTests.java trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/AbstractDbUnitTestNGSpringContextTests.java Removed Paths: ------------- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/GenericsDbUnitTestCase.java trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/SpringTestCase.java trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/GenericsDbUnitTestCase.java trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/SpringTestCase.java trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/utils/ Modified: trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitTestContext.java =================================================================== --- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitTestContext.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitTestContext.java 2008-04-27 09:51:42 UTC (rev 753) @@ -96,7 +96,6 @@ * Setup the Database before running the test method. * @throws Exception Any exception. */ - @SuppressWarnings("unchecked") public void setUpDbUnit() throws Exception { DbUnitExecution singleDbUnitExecution = testcase.getClass().getAnnotation(DbUnitExecution.class); Modified: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/AbstractDbUnitJunitSpringContextTests.java =================================================================== --- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/AbstractDbUnitJunitSpringContextTests.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/AbstractDbUnitJunitSpringContextTests.java 2008-04-27 09:51:42 UTC (rev 753) @@ -44,7 +44,6 @@ * Setup the Database before running the test method. * @throws Exception Any exception. */ - @SuppressWarnings("unchecked") @Before public void setUpDbUnit() throws Exception { Deleted: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java =================================================================== --- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2008-04-27 09:51:42 UTC (rev 753) @@ -1,269 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.junit; - -import java.io.InputStream; -import java.sql.SQLException; -import java.util.Map; - -import javax.sql.DataSource; - -import org.apache.commons.lang.ClassUtils; -import org.apache.commons.lang.StringUtils; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.database.DatabaseSequenceFilter; -import org.dbunit.database.IDatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.FilteredDataSet; -import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.excel.XlsDataSet; -import org.dbunit.dataset.filter.AbstractTableFilter; -import org.dbunit.dataset.filter.ITableFilter; -import org.dbunit.dataset.filter.SequenceTableFilter; -import org.dbunit.dataset.xml.XmlDataSet; -import org.dbunit.ext.mssql.InsertIdentityOperation; -import org.dbunit.operation.DatabaseOperation; -import org.hibernate.SessionFactory; -import org.springframework.orm.hibernate3.SessionHolder; -import org.springframework.transaction.support.TransactionSynchronizationManager; - - -/** - * Base class for running DAO tests. - * @author fgiust - * @version $Revision $ ($Author $) - * @deprecated use {@link AbstractDbUnitJunitSpringContextTests} - */ -@Deprecated -public abstract class DbUnitTestCase extends SpringTestCase -{ - - /** - * Hibernate session factory. - */ - private SessionFactory sessionFactory; - - private static final String BASETEST_DELETE = "/_BaseDAOTest-delete.xml"; - - protected static IDataSet truncateDataSet; - - /** - * Should use deferred close emulating the spring OpenSessionInView filter? Default is <code>true</code> - * @return <code>true</code> if deferred close should be used - */ - protected boolean mimicSessionFilter() - { - return true; - } - - /** - * Returns the table filter that will be used to exclude certain tables from sort/deletion. This may be overridden - * by subclasses, and is needed when tables have circular references (not handled by dbunit DatabaseSequenceFilter) - * @return an <code>ITableFilter</code> - */ - protected ITableFilter getTableFilter() - { - return new AbstractTableFilter() - { - - @Override - public boolean isValidName(String tableName) throws DataSetException - { - // default excludes: - // $ = oracle recycle bin tables - // JBPM = jbpm tables, with circular references - return !StringUtils.contains(tableName, "$") && !StringUtils.contains(tableName, "JBPM"); - } - }; - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - @Override - protected void setUp() throws Exception - { - super.setUp(); - - // insert values - IDataSet dataSet = null; - - String datesetFileName = "/" + ClassUtils.getShortClassName(getClass()) + "-load.xml"; - InputStream testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - if (log.isDebugEnabled()) - { - log.debug("loading dataset {}", datesetFileName); - } - - dataSet = new XmlDataSet(testData); - } - else - { - // check for excel - datesetFileName = "/" + ClassUtils.getShortClassName(getClass()) + "-load.xls"; - testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - if (log.isDebugEnabled()) - { - log.debug("loading dataset {}", datesetFileName); - } - - dataSet = new XlsDataSet(testData); - } - } - - if (dataSet == null) - { - log.debug("No test data found with name [{}]", datesetFileName); - } - else - { - - IDatabaseConnection connection = createConnection(); - - // truncate common tables - if (truncateDataSet == null) - { - log.debug("Generating sorted dataset for initial cleanup"); - IDataSet unsortedTruncateDataSet = connection.createDataSet(); - - ITableFilter filter = new DatabaseSequenceFilter(connection, new FilteredDataSet( - getTableFilter(), - unsortedTruncateDataSet).getTableNames()); - truncateDataSet = new FilteredDataSet(filter, unsortedTruncateDataSet); - truncateDataSet = new FilteredDataSet(getTableFilter(), truncateDataSet); - log.debug("Sorted dataset generated"); - } - - IDataSet orderedDataset = dataSet; - - // if a sorted dataset is available, use table sequence for sorting - if (truncateDataSet != null) - { - ITableFilter filter = new SequenceTableFilter(truncateDataSet.getTableNames()); - orderedDataset = new FilteredDataSet(filter, dataSet); - } - - try - { - if (truncateDataSet != null) - { - DatabaseOperation.DELETE_ALL.execute(connection, truncateDataSet); - } - if (dataSet != null) - { - InsertIdentityOperation.INSERT.execute(connection, orderedDataset); - } - } - finally - { - connection.close(); - } - } - - // mimic the Spring OpenSessionInViewFilter - if (mimicSessionFilter()) - { - Map<String, SessionFactory> sfbeans = ctx.getBeansOfType(SessionFactory.class); - if (sfbeans.isEmpty()) - { - fail("No bean of type org.hibernate.SessionFactory found in spring context"); - } - this.sessionFactory = sfbeans.get(sfbeans.keySet().iterator().next()); - - TransactionSynchronizationManager.bindResource(this.getSessionFactory(), new SessionHolder(this - .getSessionFactory() - .openSession())); - } - - } - - /** - * {@inheritDoc} - */ - @Override - protected void tearDown() throws Exception - { - if (mimicSessionFilter()) - { - // close open hibernate sessions, mimic the OpenSessionInViewFilter - if (TransactionSynchronizationManager.hasResource(this.getSessionFactory())) - { - TransactionSynchronizationManager.unbindResource(this.getSessionFactory()); - } - } - - // regenerate db initial state - String datesetFileName = "/initial-load.xml"; - InputStream testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - log.debug("Restoring db state"); - - IDataSet dataSet = new XmlDataSet(testData); - - DataSource dataSource = (DataSource) ctx.getBean("dataSource"); - IDatabaseConnection connection = new DatabaseConnection(dataSource.getConnection()); - - try - { - DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet); - } - finally - { - connection.close(); - } - } - - super.tearDown(); - } - - /** - * Returns the full test name. - * @see junit.framework.TestCase#getName() - */ - @Override - public String getName() - { - return ClassUtils.getShortClassName(this.getClass()) + "::" + super.getName(); - } - - /** - * @return The IDatabase connection to use to insert data - * @throws SQLException Thrown on any database connection error - */ - protected IDatabaseConnection createConnection() throws SQLException - { - DataSource dataSource = (DataSource) ctx.getBean("dataSource"); - return new DatabaseConnection(dataSource.getConnection()); - } - - /** - * return the current Hibernate SessionFactory - * @return SessionFactory object - */ - protected SessionFactory getSessionFactory() - { - return sessionFactory; - } -} \ No newline at end of file Deleted: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/GenericsDbUnitTestCase.java =================================================================== --- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/GenericsDbUnitTestCase.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/GenericsDbUnitTestCase.java 2008-04-27 09:51:42 UTC (rev 753) @@ -1,55 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.junit; - -import java.lang.reflect.ParameterizedType; - -import org.apache.commons.lang.ClassUtils; -import org.apache.commons.lang.StringUtils; - - -/** - * @param <D> Spring-managed bean under test. Warning, this base class expect that the name of the bean is the - * non-qualified lowercase class name of the object. For example the bean name for - * <code>org.something.MyNiceComponent</code> is expected to be <code>myNiceComponent</code>. The bean obtained - * from Spring is made available through the <code>instance</code> protected field. - * @author fgiust - * @version $Id$ - * @deprecated use {@link AbstractDbUnitJunitSpringContextTests} - */ -@Deprecated -public class GenericsDbUnitTestCase<D> extends DbUnitTestCase -{ - - /** - * Test instance. - */ - protected D instance; - - /** - * Load the tested bean from Spring application context. - */ - @Override - @SuppressWarnings("unchecked") - protected void setUp() throws Exception - { - super.setUp(); - String genericClass = ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0] - .toString(); - - instance = (D) ctx.getBean(StringUtils.uncapitalize(ClassUtils.getShortClassName(genericClass))); - } -} Deleted: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/SpringTestCase.java =================================================================== --- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/SpringTestCase.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/SpringTestCase.java 2008-04-27 09:51:42 UTC (rev 753) @@ -1,67 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.junit; - -import junit.framework.TestCase; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - - -/** - * Base class for running spring-based tests. - * @author fgiust - * @version $Revision $ ($Author $) - * @deprecated {@link org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests} - */ -@Deprecated -public abstract class SpringTestCase extends TestCase -{ - - /** - * Default Spring context initilization file used for tests. - */ - private static final String DEFAULT_TEST_CONTEXT_FILE = "/spring-tests.xml"; - - /** - * Spring application context. - */ - protected static ApplicationContext ctx; - - /** - * logger. Not static so it can be reused in tests - */ - protected Logger log = LoggerFactory.getLogger(getClass()); - - /** - * {@inheritDoc} - */ - @Override - protected void setUp() throws Exception - { - - if (ctx == null) - { - // load Spring's BeanFactory - String[] paths = {DEFAULT_TEST_CONTEXT_FILE }; - ctx = new ClassPathXmlApplicationContext(paths); - } - - } - -} \ No newline at end of file Modified: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/AbstractDbUnitTestNGSpringContextTests.java =================================================================== --- trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/AbstractDbUnitTestNGSpringContextTests.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/AbstractDbUnitTestNGSpringContextTests.java 2008-04-27 09:51:42 UTC (rev 753) @@ -44,7 +44,6 @@ * Setup the Database before running the test method. * @throws Exception Any exception. */ - @SuppressWarnings("unchecked") @BeforeMethod protected void setUpDbUnit() throws Exception { Deleted: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java =================================================================== --- trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java 2008-04-27 09:51:42 UTC (rev 753) @@ -1,306 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.testng; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.sql.SQLException; -import java.text.MessageFormat; -import java.util.Map; - -import javax.sql.DataSource; - -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.ClassUtils; -import org.apache.commons.lang.StringUtils; -import org.dbunit.DatabaseUnitException; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.database.DatabaseSequenceFilter; -import org.dbunit.database.IDatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.FilteredDataSet; -import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.excel.XlsDataSet; -import org.dbunit.dataset.filter.AbstractTableFilter; -import org.dbunit.dataset.filter.ITableFilter; -import org.dbunit.dataset.filter.SequenceTableFilter; -import org.dbunit.dataset.xml.XmlDataSet; -import org.dbunit.operation.DatabaseOperation; -import org.hibernate.SessionFactory; -import org.testng.Assert; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; -import org.springframework.orm.hibernate3.SessionHolder; -import org.springframework.transaction.support.TransactionSynchronizationManager; - - -/** - * @author fgiust - * @version $Id$ - * @deprecated use {@link AbstractDbUnitTestNGSpringContextTests} - */ -@Test -@Deprecated -public class DbUnitTestCase extends SpringTestCase -{ - - /** - * name for the dataSource bean in Spring context. - */ - private static final String DATASOURCE_BEAN_NAME = "dataSource"; - - /** - * Pattern for dbunit file loaded before a test. MessageFormat format with two placeholders: class name and - * extension. - */ - private static final String DATAFILE_PATTERN = "/{0}-load.{1}"; - - protected static IDataSet truncateDataSet; - - /** - * Hibernate session factory. - */ - private SessionFactory sessionFactory; - - /** - * Optional schema (needed for ORACLE). - * @return <code>null</code> - */ - protected String getSchema() - { - return null; - } - - /** - * Should use deferred close emulating the spring OpenSessionInView filter? Default is <code>true</code> - * @return <code>true</code> if deferred close should be used - */ - protected boolean mimicSessionFilter() - { - return true; - } - - /** - * Returns the table filter that will be used to exclude certain tables from sort/deletion. This may be overridden - * by subclasses, and is needed when tables have circular references (not handled by dbunit DatabaseSequenceFilter) - * @return an <code>ITableFilter</code> - */ - protected ITableFilter getTableFilter() - { - return new AbstractTableFilter() - { - - @Override - public boolean isValidName(String tableName) throws DataSetException - { - // default excludes: - // $ = oracle recycle bin tables - // JBPM = jbpm tables, with circular references - return !StringUtils.contains(tableName, "$") && !StringUtils.contains(tableName, "JBPM"); - } - }; - } - - /** - * Setup the Database before running the test method. - * @throws Exception Any exception. - */ - @SuppressWarnings("unchecked") - @BeforeMethod - protected void setUpDbUnit() throws Exception - { - // mimic the Spring OpenSessionInViewFilter - if (mimicSessionFilter()) - { - Map<String, SessionFactory> sfbeans = ctx.getBeansOfType(SessionFactory.class); - if (sfbeans.isEmpty()) - { - Assert.fail("No bean of type org.hibernate.SessionFactory found in spring context"); - } - this.sessionFactory = sfbeans.get(sfbeans.keySet().iterator().next()); - - TransactionSynchronizationManager.bindResource(this.sessionFactory, new SessionHolder(this.sessionFactory - .openSession())); - } - - // check for xml - IDataSet dataSet = loadDataSet(getDataFileName("xml")); - - if (dataSet == null) - { - // check for excel - dataSet = loadDataSet(getDataFileName("xls")); - } - - if (dataSet != null) - { - importDataSet(dataSet); - } - else - { - log.debug("No test data found with name [{}]", getDataFileName("xml/xls")); - } - } - - /** - * Exports a database to an Excel file - * @param fileName The file name we save the Excel dump to. - * @throws IOException An IO Exception. - * @throws DataSetException A dataset exception. - * @throws SQLException A SQL Exception. - */ - protected void exportDbToXls(String fileName) throws IOException, DataSetException, SQLException - { - IDatabaseConnection connection = getDbUnitConnection(); - - IDataSet fullDataSet = connection.createDataSet(); - - File outFile = new File(fileName); - OutputStream fos = new FileOutputStream(outFile); - XlsDataSet.write(fullDataSet, fos); - fos.close(); - } - - /** - * Cleans the database after we run the tests. - * @throws Exception Any exception. - */ - @AfterMethod - protected void tearDownDbUnit() throws Exception - { - if (mimicSessionFilter()) - { - // close open hibernate sessions, mimic the OpenSessionInViewFilter - // close open hibernate sessions, mimic the OpenSessionInViewFilter - if (TransactionSynchronizationManager.hasResource(this.sessionFactory)) - { - TransactionSynchronizationManager.unbindResource(this.sessionFactory); - } - } - - // regenerate db initial state - String datesetFileName = "/initial-load.xml"; - InputStream testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - log.debug("Restoring db state"); - - IDataSet dataSet = new XmlDataSet(testData); - - IDatabaseConnection connection = getDbUnitConnection(); - - try - { - DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet); - } - finally - { - connection.close(); - } - } - } - - private void importDataSet(IDataSet dataSet) throws SQLException, DataSetException, DatabaseUnitException - { - IDatabaseConnection connection = getDbUnitConnection(); - - if (truncateDataSet == null) - { - log.debug("Generating sorted dataset for initial cleanup"); - IDataSet unsortedTruncateDataSet = connection.createDataSet(); - - ITableFilter filter = new DatabaseSequenceFilter(connection, new FilteredDataSet( - getTableFilter(), - unsortedTruncateDataSet).getTableNames()); - truncateDataSet = new FilteredDataSet(filter, unsortedTruncateDataSet); - truncateDataSet = new FilteredDataSet(getTableFilter(), truncateDataSet); - log.debug("Sorted dataset generated"); - } - - IDataSet orderedDataset = new FilteredDataSet(new AbstractTableFilter() - { - - @Override - public boolean isValidName(String tableName) throws DataSetException - { - return !StringUtils.contains(tableName, "$"); - } - }, dataSet); - - log.debug("Tables: {}", ArrayUtils.toString(orderedDataset.getTableNames())); - log.debug("Tables truncateDataSet: {}", ArrayUtils.toString(truncateDataSet.getTableNames())); - - // if a sorted dataset is available, use table sequence for sorting - if (truncateDataSet != null) - { - ITableFilter filter = new SequenceTableFilter(truncateDataSet.getTableNames()); - orderedDataset = new FilteredDataSet(filter, dataSet); - } - - try - { - - if (truncateDataSet != null) - { - DatabaseOperation.DELETE_ALL.execute(connection, truncateDataSet); - } - if (dataSet != null) - { - DatabaseOperation.INSERT.execute(connection, orderedDataset); - } - } - finally - { - connection.close(); - } - } - - /** - * @return - * @throws SQLException - */ - private IDatabaseConnection getDbUnitConnection() throws SQLException - { - DataSource dataSource = (DataSource) ctx.getBean(DATASOURCE_BEAN_NAME); - IDatabaseConnection connection = new DatabaseConnection(dataSource.getConnection(), getSchema()); - return connection; - } - - private String getDataFileName(String extension) - { - return MessageFormat.format(DATAFILE_PATTERN, ClassUtils.getShortClassName(getClass()), extension); - } - - private IDataSet loadDataSet(String datesetFile) throws IOException, DataSetException - { - InputStream is = getClass().getResourceAsStream(datesetFile); - IDataSet dataSet = null; - - if (is != null) - { - log.debug("loading dataset {}", datesetFile); - dataSet = datesetFile.endsWith(".xls") ? new XlsDataSet(is) : new XmlDataSet(is); - is.close(); - } - - return dataSet; - } -} Deleted: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/GenericsDbUnitTestCase.java =================================================================== --- trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/GenericsDbUnitTestCase.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/GenericsDbUnitTestCase.java 2008-04-27 09:51:42 UTC (rev 753) @@ -1,57 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.testng; - -import java.lang.reflect.ParameterizedType; - -import org.apache.commons.lang.ClassUtils; -import org.apache.commons.lang.StringUtils; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - - -/** - * @param <D> Spring-managed bean under test. Warning, this base class expect that the name of the bean is the - * non-qualified lowercase class name of the object. For example the bean name for - * <code>org.something.MyNiceComponent</code> is expected to be <code>myNiceComponent</code>. The bean obtained - * from Spring is made available through the <code>instance</code> protected field. - * @author fgiust - * @version $Id$ - * @deprecated use {@link AbstractDbUnitTestNGSpringContextTests} - */ -@Test -@Deprecated -public class GenericsDbUnitTestCase<D> extends DbUnitTestCase -{ - - /** - * Test instance. - */ - protected D instance; - - /** - * Load the tested bean from Spring application context. - */ - @SuppressWarnings("unchecked") - @BeforeClass - protected void setUp() - { - String genericClass = ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0] - .toString(); - - instance = (D) ctx.getBean(StringUtils.uncapitalize(ClassUtils.getShortClassName(genericClass))); - } -} Deleted: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/SpringTestCase.java =================================================================== --- trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/SpringTestCase.java 2008-04-27 09:45:03 UTC (rev 752) +++ trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/SpringTestCase.java 2008-04-27 09:51:42 UTC (rev 753) @@ -1,90 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.testng; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - - -/** - * Base class for running spring-based tests. - * @author fgiust - * @version $Revision $ ($Author $) - * @deprecated {@link org.springframework.test.context.testng.AbstractTestNGSpringContextTests} - */ -@Test -@Deprecated -public abstract class SpringTestCase -{ - - /** - * Default Spring context initilization file used for tests. - */ - public static final String DEFAULT_TEST_CONTEXT_FILE = "/spring-tests.xml"; - - /** - * Spring application context. - */ - protected static ApplicationContext ctx; - - /** - * logger. Not static so it can be reused in tests - */ - protected Logger log = LoggerFactory.getLogger(getClass()); - - /** - * Setup Spring application context, by loading the <code>/spring-tests.xml</code> file from the classpath. - * @throws Exception - */ - @BeforeClass - protected void setUpSpring() - { - - if (ctx == null) - { - // load Spring's BeanFactory - String[] paths = {DEFAULT_TEST_CONTEXT_FILE }; - ctx = new ClassPathXmlApplicationContext(paths) - { - - /** - * {@inheritDoc} - */ - @Override - protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) - { - initAppContextBeanDefinitionReader(beanDefinitionReader); - } - }; - } - } - - /** - * You can override this method if you need to pass a custom documentReaderClass to the spring bean definition - * reader. - * @param beanDefinitionReader XmlBeanDefinitionReader instance - */ - protected void initAppContextBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) - { - // you can subclass this method if needed - } - -} \ 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...> - 2008-04-27 09:45:17
|
Revision: 752 http://openutils.svn.sourceforge.net/openutils/?rev=752&view=rev Author: fgiust Date: 2008-04-27 02:45:03 -0700 (Sun, 27 Apr 2008) Log Message: ----------- nearly ready for 2.1 Modified Paths: -------------- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java trunk/openutils-testing/src/site/changes/changes.xml Modified: trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java =================================================================== --- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-03-20 17:39:12 UTC (rev 751) +++ trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-04-27 09:45:03 UTC (rev 752) @@ -22,6 +22,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.dbunit.dataset.datatype.DefaultDataTypeFactory; import org.dbunit.dataset.datatype.IDataTypeFactory; import org.dbunit.operation.DatabaseOperation; @@ -57,7 +58,7 @@ /** * The datatype factory (DatabaseConfig.PROPERTY_DATATYPE_FACTORY) to use. Can be left unset if not needed. */ - Class< ? extends IDataTypeFactory> dataTypeFactory(); + Class< ? extends IDataTypeFactory> dataTypeFactory() default DefaultDataTypeFactory.class; /** * A regexp that can match table names. Any table matching this regular expression will not be considered by DbUnit. Modified: trunk/openutils-testing/src/site/changes/changes.xml =================================================================== --- trunk/openutils-testing/src/site/changes/changes.xml 2008-03-20 17:39:12 UTC (rev 751) +++ trunk/openutils-testing/src/site/changes/changes.xml 2008-04-27 09:45:03 UTC (rev 752) @@ -8,15 +8,17 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> - <release version="2.0.3" date="in svn" description="2.0.3"> + <release version="2.1" date="in svn" description="2.1"> + <action type="update" dev="fgiust">Legacy base test classes (DbUnitTestCase, GenericsDbUnitTestCase) have been + dropped. Stick with 2.0.x if you are still use them or upgrade to 2.1 for a forced migration</action> <action type="fix" dev="fgiust"> excludedTables in DbUnitExecution now defaults to "^BIN\\$(.*)", properly excluding tables in oracle recycle bin.</action> + <action type="add" dev="fcarone"> New option for DbUnitExection to specify the + DatabaseConfig.PROPERTY_DATATYPE_FACTORY added.</action> </release> <release version="2.0.3" date="2008-02-19" description="2.0.3"> <action type="update" dev="fgiust"> it.openutils.testing.DateAssert is now thread safe. Failure messages have been improved.</action> - <action type="add" dev="fcarone"> New option for DbUnitExection to specify the - DatabaseConfig.PROPERTY_DATATYPE_FACTORY added.</action> </release> <release version="2.0.2" date="2008-01-31" description="2.0.2"> <action type="add" dev="fgiust"> New dbunit operation classes for mssql and mysql (extension of standard dbunit This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2008-03-20 17:39:10
|
Revision: 751 http://openutils.svn.sourceforge.net/openutils/?rev=751&view=rev Author: fcarone Date: 2008-03-20 10:39:12 -0700 (Thu, 20 Mar 2008) Log Message: ----------- tests configuration almost working Modified Paths: -------------- trunk/openutils-spring-remote-callback/pom.xml trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml Added Paths: ----------- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientTest.java trunk/openutils-spring-remote-callback/src/test/resources/log4j.dtd trunk/openutils-spring-remote-callback/src/test/resources/log4j.xml trunk/openutils-spring-remote-callback/src/test/resources/spring-jms.xml Removed Paths: ------------- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java Property Changed: ---------------- trunk/openutils-spring-remote-callback/ Property changes on: trunk/openutils-spring-remote-callback ___________________________________________________________________ Name: svn:ignore + .settings target .checkstyle .classpath .project Modified: trunk/openutils-spring-remote-callback/pom.xml =================================================================== --- trunk/openutils-spring-remote-callback/pom.xml 2008-03-20 16:18:55 UTC (rev 750) +++ trunk/openutils-spring-remote-callback/pom.xml 2008-03-20 17:39:12 UTC (rev 751) @@ -130,6 +130,12 @@ <version>4.4</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.xbean</groupId> + <artifactId>xbean-spring-v2c</artifactId> + <version>2.8</version> + <scope>test</scope> + </dependency> </dependencies> <repositories> <repository> Deleted: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java 2008-03-20 16:18:55 UTC (rev 750) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java 2008-03-20 17:39:12 UTC (rev 751) @@ -1,36 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package it.openutils.spring.remote.callback.test; - -import it.openutils.spring.remote.callback.test.shared.DummyManager; - - -/** - * @author fcarone - * @version $Id: $ - */ -public class Client -{ - - private DummyManager dummyManager; - - public void clientTest() - { - dummyManager.findAll(); - } - -} Copied: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientTest.java (from rev 749, trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java) =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientTest.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientTest.java 2008-03-20 17:39:12 UTC (rev 751) @@ -0,0 +1,63 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test; + +import it.openutils.spring.remote.callback.test.shared.DummyManager; + +import org.junit.Before; +import org.junit.Test; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; + + +/** + * @author fcarone + * @version $Id: $ + */ +@ContextConfiguration(locations = {"/spring-tests.xml" }) +public class ClientTest extends AbstractJUnit4SpringContextTests +{ + + private DummyManager dummyManager; + + + /** + * Get the RMI version of the manager + */ + @Before + public void setupTest() + { + this.dummyManager = (DummyManager) applicationContext.getBean("dummyManager"); + } + + @Test + public void clientTest() + { + dummyManager.findAll(); + } + + + /** + * Sets the dummyManager. + * @param dummyManager the dummyManager to set + */ + public void setDummyManager(DummyManager dummyManager) + { + this.dummyManager = dummyManager; + } + +} Added: trunk/openutils-spring-remote-callback/src/test/resources/log4j.dtd =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/log4j.dtd (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/resources/log4j.dtd 2008-03-20 17:39:12 UTC (rev 751) @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!-- Authors: Chris Taylor, Ceki Gulcu. --> + +<!-- Version: 1.2 --> + +<!-- A configuration element consists of optional renderer +elements,appender elements, categories and an optional root +element. --> + +<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, + categoryFactory?)> + +<!-- The "threshold" attribute takes a level value such that all --> +<!-- logging statements with a level equal or below this value are --> +<!-- disabled. --> + +<!-- Setting the "debug" enable the printing of internal log4j logging --> +<!-- statements. --> + +<!-- By default, debug attribute is "null", meaning that we not do touch --> +<!-- internal log4j logging settings. The "null" value for the threshold --> +<!-- attribute can be misleading. The threshold field of a repository --> +<!-- cannot be set to null. The "null" value for the threshold attribute --> +<!-- simply means don't touch the threshold field, the threshold field --> +<!-- keeps its old value. --> + +<!ATTLIST log4j:configuration + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + threshold (all|debug|info|warn|error|fatal|off|null) "null" + debug (true|false|null) "null" +> + +<!-- renderer elements allow the user to customize the conversion of --> +<!-- message objects to String. --> + +<!ELEMENT renderer EMPTY> +<!ATTLIST renderer + renderedClass CDATA #REQUIRED + renderingClass CDATA #REQUIRED +> + +<!-- Appenders must have a name and a class. --> +<!-- Appenders may contain an error handler, a layout, optional parameters --> +<!-- and filters. They may also reference (or include) other appenders. --> +<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)> +<!ATTLIST appender + name ID #REQUIRED + class CDATA #REQUIRED +> + +<!ELEMENT layout (param*)> +<!ATTLIST layout + class CDATA #REQUIRED +> + +<!ELEMENT filter (param*)> +<!ATTLIST filter + class CDATA #REQUIRED +> + +<!-- ErrorHandlers can be of any class. They can admit any number of --> +<!-- parameters. --> + +<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> +<!ATTLIST errorHandler + class CDATA #REQUIRED +> + +<!ELEMENT root-ref EMPTY> + +<!ELEMENT logger-ref EMPTY> +<!ATTLIST logger-ref + ref IDREF #REQUIRED +> + +<!ELEMENT param EMPTY> +<!ATTLIST param + name CDATA #REQUIRED + value CDATA #REQUIRED +> + + +<!-- The priority class is org.apache.log4j.Level by default --> +<!ELEMENT priority (param*)> +<!ATTLIST priority + class CDATA #IMPLIED + value CDATA #REQUIRED +> + +<!-- The level class is org.apache.log4j.Level by default --> +<!ELEMENT level (param*)> +<!ATTLIST level + class CDATA #IMPLIED + value CDATA #REQUIRED +> + + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named category. --> +<!ELEMENT category (param*,(priority|level)?,appender-ref*)> +<!ATTLIST category + class CDATA #IMPLIED + name CDATA #REQUIRED + additivity (true|false) "true" +> + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named logger. --> +<!ELEMENT logger (level?,appender-ref*)> +<!ATTLIST logger + name ID #REQUIRED + additivity (true|false) "true" +> + + +<!ELEMENT categoryFactory (param*)> +<!ATTLIST categoryFactory + class CDATA #REQUIRED> + +<!ELEMENT appender-ref EMPTY> +<!ATTLIST appender-ref + ref IDREF #REQUIRED +> + +<!-- If no priority element is specified, then the configurator MUST not --> +<!-- touch the priority of root. --> +<!-- The root category always exists and cannot be subclassed. --> +<!ELEMENT root (param*, (priority|level)?, appender-ref*)> + + +<!-- ==================================================================== --> +<!-- A logging event --> +<!-- ==================================================================== --> +<!ELEMENT log4j:eventSet (log4j:event*)> +<!ATTLIST log4j:eventSet + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + version (1.1|1.2) "1.2" + includesLocationInfo (true|false) "true" +> + + + +<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, + log4j:locationInfo?) > + +<!-- The timestamp format is application dependent. --> +<!ATTLIST log4j:event + logger CDATA #REQUIRED + level CDATA #REQUIRED + thread CDATA #REQUIRED + timestamp CDATA #REQUIRED +> + +<!ELEMENT log4j:message (#PCDATA)> +<!ELEMENT log4j:NDC (#PCDATA)> + +<!ELEMENT log4j:throwable (#PCDATA)> + +<!ELEMENT log4j:locationInfo EMPTY> +<!ATTLIST log4j:locationInfo + class CDATA #REQUIRED + method CDATA #REQUIRED + file CDATA #REQUIRED + line CDATA #REQUIRED +> Added: trunk/openutils-spring-remote-callback/src/test/resources/log4j.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/log4j.xml (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/resources/log4j.xml 2008-03-20 17:39:12 UTC (rev 751) @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> +<log4j:configuration> + <!-- log4j test configuration --> + <appender name="test-appender" class="org.apache.log4j.ConsoleAppender"> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%-5p %c.%M(%C{1}.java:%L) %m%n" /> + <!-- <param name="ConversionPattern" value="%-5p %m%n" />--> + </layout> + </appender> + <category name="it"> + <priority value="debug" /> + </category> + <category name="org"> + <priority value="warn" /> + </category> + <category name="com"> + <priority value="warn" /> + </category> + <category name="net"> + <priority value="warn" /> + </category> + <category name="org.hibernate"> + <priority value="warn" /> + </category> + <category name="it.openutils.test.ApplicationContextHolder"> + <priority value="info" /> + </category> + <category name="it.openutils.test.BaseDAOTestCase"> + <priority value="INFO" /> + </category> + <category name="it.openutils"> + <priority value="INFO" /> + </category> + <category name="it.openutils.test"> + <priority value="INFO" /> + </category> + <category name="it.openutils.dbupdate.DbSetupManagerImpl"> + <priority value="INFO" /> + </category> + <category name="it.openutils.hibernate.spring.rmibernate"> + <priority value="DEBUG" /> + </category> + <category name="org.acegisecurity"> + <priority value="DEBUG" /> + </category> + <root> + <priority value="debug" /> + <appender-ref ref="test-appender" /> + </root> +</log4j:configuration> \ No newline at end of file Modified: trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml 2008-03-20 16:18:55 UTC (rev 750) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml 2008-03-20 17:39:12 UTC (rev 751) @@ -2,15 +2,32 @@ xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - <bean id="callbackManager" class="org.logicblaze.lingo.jms.JmsProxyFactoryBean"> + <!-- RMI CONFIG --> + <bean id="dummyManager" class="org.springframework.aop.framework.ProxyFactoryBean"> + <property name="targetName" value="dummyManagerRMI" /> + <property name="interceptorNames"> + <list> + <value>serverMethodInterceptor</value> + </list> + </property> + </bean> + <bean id="dummyManagerRMI" class="org.springframework.remoting.rmi.RmiProxyFactoryBean" lazy-init="true"> + <property name="serviceUrl" value="rmi://localhost:1099/dummyManagerRmi" /> + <property name="serviceInterface" value="it.openutils.spring.remote.callback.test.shared.DummyManager" /> + <property name="cacheStub" value="true" /> + <property name="lookupStubOnStartup" value="false" /> + <property name="refreshStubOnConnectFailure" value="true" /> + </bean> + <bean id="serverMethodInterceptor" class="it.openutils.spring.remote.callback.interceptor.CallbackInstallerInterceptor"> + <property name="callbackManager" ref="callbackManagerJMS" /> + <property name="callback" ref="clientCallback" /> + </bean> + <bean id="clientCallback" class="it.openutils.spring.remote.callback.test.ClientCallback" /> + <!-- JMS CONFIG --> + <bean id="callbackManagerJMS" class="org.logicblaze.lingo.jms.JmsProxyFactoryBean"> <property name="serviceInterface" value="it.openutils.spring.remote.callback.manager.CallbackManager" /> <property name="connectionFactory" ref="jmsFactory" /> <property name="destination" ref="callbackDestination" /> </bean> - <bean id="jmsFactory" class="org.activemq.ActiveMQConnectionFactory"> - <property name="brokerURL" value="tcp://localhost:61616" /> - </bean> - <bean id="callbackDestination" class="org.activemq.message.ActiveMQQueue"> - <constructor-arg index="0" value="callbackDestinationQ" /> - </bean> + </beans> Added: trunk/openutils-spring-remote-callback/src/test/resources/spring-jms.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-jms.xml (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-jms.xml 2008-03-20 17:39:12 UTC (rev 751) @@ -0,0 +1,9 @@ +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" xmlns:amq="http://activemq.org/config/1.0" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd + http://activemq.org/config/1.0 http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd"> + + + +</beans> \ No newline at end of file Modified: trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml 2008-03-20 16:18:55 UTC (rev 750) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml 2008-03-20 17:39:12 UTC (rev 751) @@ -1,11 +1,37 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:util="http://www.springframework.org/schema/util" + xmlns:util="http://www.springframework.org/schema/util" xmlns:amq="http://activemq.org/config/1.0" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd - http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - <bean id="dummyManager" class="it.openutils.spring.remote.callback.test.server.DummyManagerImpl" /> + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd + http://activemq.org/config/1.0 http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd"> + <!-- MANAGERS CONFIG --> + <bean id="dummyManager" class="it.openutils.spring.remote.callback.test.server.DummyManagerImpl"> + <property name="callbackManager" ref="callbackManager" /> + </bean> <bean id="callbackManager" class="it.openutils.spring.remote.callback.manager.impl.CallbackManagerImpl" /> + <!-- RMI CONFIG --> + <bean id="dummyManagerRMI" class="org.springframework.remoting.rmi.RmiServiceExporter" lazy-init="true"> + <property name="serviceUrl" value="rmi://localhost:1099/dummyManagerRmi" /> + <property name="serviceInterface" value="it.openutils.spring.remote.callback.test.shared.DummyManager" /> + <property name="cacheStub" value="true" /> + <property name="lookupStubOnStartup" value="false" /> + <property name="refreshStubOnConnectFailure" value="true" /> + </bean> + <!-- JMS CONFIG --> + <!-- lets create an embedded ActiveMQ Broker --> + <amq:broker useJmx="false" persistent="false"> + <amq:transportConnectors> + <amq:transportConnector uri="tcp://localhost:61616"> + </amq:transportConnector> + </amq:transportConnectors> + </amq:broker> + + <!-- ActiveMQ destinations to use --> + <amq:queue id="callbackDestination" physicalName="org.apache.activemq.spring.Test.spring.embedded"/> + + <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML --> + <amq:connectionFactory id="jmsFactory" brokerURL="tcp://localhost:61616"/> + <bean id="callbackManagerListener" class="org.logicblaze.lingo.jms.JmsServiceExporterMessageListener"> - <property name="destination" ref="callbackDestination" /> <property name="service" ref="callbackManager" /> <property name="serviceInterface" value="it.openutils.spring.remote.callback.manager.CallbackManager" /> <property name="connectionFactory" ref="jmsFactory" /> @@ -16,14 +42,4 @@ <property name="messageListener" ref="callbackManagerListener" /> <property name="connectionFactory" ref="jmsFactory" /> </bean> - <!-- JMS ConnectionFactory to use --> - <bean id="jmsFactory" class="org.activemq.ActiveMQConnectionFactory"> - <property name="brokerURL" value="tcp://localhost:61616" /> - <property name="useEmbeddedBroker"> - <value>true</value> - </property> - </bean> - <bean id="callbackDestination" class="org.activemq.message.ActiveMQQueue"> - <constructor-arg index="0" value="callbackDestinationQ" /> - </bean> </beans> \ No newline at end of file Modified: trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml 2008-03-20 16:18:55 UTC (rev 750) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml 2008-03-20 17:39:12 UTC (rev 751) @@ -3,6 +3,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> + <!-- any side --> + <import resource="classpath:spring-jms.xml" /> + <!-- server side --> <import resource="classpath:spring-services.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2008-03-20 16:19:21
|
Revision: 750 http://openutils.svn.sourceforge.net/openutils/?rev=750&view=rev Author: fcarone Date: 2008-03-20 09:18:55 -0700 (Thu, 20 Mar 2008) Log Message: ----------- spring config for tests Added Paths: ----------- trunk/openutils-spring-remote-callback/src/test/resources/ trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml Added: trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-client.xml 2008-03-20 16:18:55 UTC (rev 750) @@ -0,0 +1,16 @@ +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> + <bean id="callbackManager" class="org.logicblaze.lingo.jms.JmsProxyFactoryBean"> + <property name="serviceInterface" value="it.openutils.spring.remote.callback.manager.CallbackManager" /> + <property name="connectionFactory" ref="jmsFactory" /> + <property name="destination" ref="callbackDestination" /> + </bean> + <bean id="jmsFactory" class="org.activemq.ActiveMQConnectionFactory"> + <property name="brokerURL" value="tcp://localhost:61616" /> + </bean> + <bean id="callbackDestination" class="org.activemq.message.ActiveMQQueue"> + <constructor-arg index="0" value="callbackDestinationQ" /> + </bean> +</beans> Added: trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-services.xml 2008-03-20 16:18:55 UTC (rev 750) @@ -0,0 +1,29 @@ +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> + <bean id="dummyManager" class="it.openutils.spring.remote.callback.test.server.DummyManagerImpl" /> + <bean id="callbackManager" class="it.openutils.spring.remote.callback.manager.impl.CallbackManagerImpl" /> + <bean id="callbackManagerListener" class="org.logicblaze.lingo.jms.JmsServiceExporterMessageListener"> + <property name="destination" ref="callbackDestination" /> + <property name="service" ref="callbackManager" /> + <property name="serviceInterface" value="it.openutils.spring.remote.callback.manager.CallbackManager" /> + <property name="connectionFactory" ref="jmsFactory" /> + </bean> + <bean id="callbackManagerJMS" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> + <property name="concurrentConsumers" value="20" /> + <property name="destination" ref="callbackDestination" /> + <property name="messageListener" ref="callbackManagerListener" /> + <property name="connectionFactory" ref="jmsFactory" /> + </bean> + <!-- JMS ConnectionFactory to use --> + <bean id="jmsFactory" class="org.activemq.ActiveMQConnectionFactory"> + <property name="brokerURL" value="tcp://localhost:61616" /> + <property name="useEmbeddedBroker"> + <value>true</value> + </property> + </bean> + <bean id="callbackDestination" class="org.activemq.message.ActiveMQQueue"> + <constructor-arg index="0" value="callbackDestinationQ" /> + </bean> +</beans> \ No newline at end of file Added: trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml =================================================================== --- trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/resources/spring-tests.xml 2008-03-20 16:18:55 UTC (rev 750) @@ -0,0 +1,11 @@ +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> + + <!-- server side --> + <import resource="classpath:spring-services.xml" /> + + <!-- client side --> + <import resource="classpath:spring-client.xml" /> +</beans> \ 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...> - 2008-03-20 15:53:37
|
Revision: 749 http://openutils.svn.sourceforge.net/openutils/?rev=749&view=rev Author: fcarone Date: 2008-03-20 08:53:26 -0700 (Thu, 20 Mar 2008) Log Message: ----------- Initial callback test impl Added Paths: ----------- trunk/openutils-spring-remote-callback/src/test/ trunk/openutils-spring-remote-callback/src/test/java/ trunk/openutils-spring-remote-callback/src/test/java/it/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,36 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test; + +import it.openutils.spring.remote.callback.test.shared.DummyManager; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class Client +{ + + private DummyManager dummyManager; + + public void clientTest() + { + dummyManager.findAll(); + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,53 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test; + +import it.openutils.spring.remote.callback.Callback; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class ClientCallback implements Callback +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(ClientCallback.class); + + /** + * {@inheritDoc} + */ + public String getUID() + { + return "1"; + } + + /** + * {@inheritDoc} + */ + public void invoke() + { + log.info("Callback invoked"); + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,78 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test.dataobject; + +import java.io.Serializable; + +/** + * @author fcarone + * @version $Id: $ + */ + +public class DummyDataobject implements Serializable +{ + + /** + * + */ + private static final long serialVersionUID = 6428114657758013388L; + + private Long id; + + private String someText; + + + /** + * Returns the id. + * @return the id + */ + public Long getId() + { + return id; + } + + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + + + /** + * Returns the someText. + * @return the someText + */ + public String getSomeText() + { + return someText; + } + + + /** + * Sets the someText. + * @param someText the someText to set + */ + public void setSomeText(String someText) + { + this.someText = someText; + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,62 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test.server; + +import it.openutils.spring.remote.callback.manager.CallbackManager; +import it.openutils.spring.remote.callback.test.dataobject.DummyDataobject; +import it.openutils.spring.remote.callback.test.shared.DummyManager; + +import java.util.List; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class DummyManagerImpl implements DummyManager +{ + + private CallbackManager callbackManager; + + /** + * {@inheritDoc} + */ + public List<DummyDataobject> findAll() + { + callbackManager.invokeCallback(); + return null; + } + + /** + * {@inheritDoc} + */ + public DummyDataobject findFilteredFirst(DummyDataobject filter) + { + return null; + } + + + /** + * Sets the callbackManager. + * @param callbackManager the callbackManager to set + */ + public void setCallbackManager(CallbackManager callbackManager) + { + this.callbackManager = callbackManager; + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,35 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test.shared; + +import it.openutils.spring.remote.callback.test.dataobject.DummyDataobject; + +import java.util.List; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface DummyManager +{ + + List<DummyDataobject> findAll(); + + DummyDataobject findFilteredFirst(DummyDataobject filter); + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2008-03-20 15:14:20
|
Revision: 748 http://openutils.svn.sourceforge.net/openutils/?rev=748&view=rev Author: fcarone Date: 2008-03-20 08:13:45 -0700 (Thu, 20 Mar 2008) Log Message: ----------- initial impl for remote callbacks Added Paths: ----------- trunk/openutils-spring-remote-callback/ trunk/openutils-spring-remote-callback/pom.xml trunk/openutils-spring-remote-callback/src/ trunk/openutils-spring-remote-callback/src/main/ trunk/openutils-spring-remote-callback/src/main/java/ trunk/openutils-spring-remote-callback/src/main/java/it/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/Callback.java trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/interceptor/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/interceptor/CallbackInstallerInterceptor.java trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackHolder.java trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackManager.java trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/impl/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/impl/CallbackManagerImpl.java trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocation.java trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocationFactory.java trunk/openutils-spring-remote-callback/src/main/resources/ Added: trunk/openutils-spring-remote-callback/pom.xml =================================================================== --- trunk/openutils-spring-remote-callback/pom.xml (rev 0) +++ trunk/openutils-spring-remote-callback/pom.xml 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,144 @@ +<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"> + <parent> + <artifactId>openutils</artifactId> + <groupId>net.sourceforge.openutils</groupId> + <version>7</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-spring-remote-callback</artifactId> + <name>openutils spring remote callback</name> + <version>0.0.1-SNAPSHOT</version> + <description>Openutils Spring Remote Callback classes</description> + <properties> + <spring.version>2.5.1</spring.version> + <aspectj.version>1.5.3</aspectj.version> + </properties> + <dependencies> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring</artifactId> + <version>${spring.version}</version> + <scope>provided</scope> + </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-aop</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.logicblaze.lingo</groupId> + <artifactId>lingo</artifactId> + <version>1.3</version> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>activemq-core</artifactId> + <version>4.1.1</version> + </dependency> + <dependency> + <groupId>aspectj</groupId> + <artifactId>aspectjrt</artifactId> + <version>${aspectj.version}</version> + </dependency> + <dependency> + <groupId>aspectj</groupId> + <artifactId>aspectjweaver</artifactId> + <version>${aspectj.version}</version> + </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> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-attrs</artifactId> + <version>2.2.3</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-commons</artifactId> + <version>2.2.3</version> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing-junit</artifactId> + <version>2.0.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing</artifactId> + <version>2.0.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.4</version> + <scope>test</scope> + </dependency> + </dependencies> + <repositories> + <repository> + <id>http://repository.codehaus.org</id> + <name>codehaus repository</name> + <url>http://repository.codehaus.org</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> +</project> \ No newline at end of file Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/Callback.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/Callback.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/Callback.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,37 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback; + +import java.util.EventListener; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface Callback extends EventListener +{ + /** + * Invocation for the remote callback + */ + void invoke(); + + /** + * @return The callback UID. + */ + String getUID(); +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/Callback.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/interceptor/CallbackInstallerInterceptor.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/interceptor/CallbackInstallerInterceptor.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/interceptor/CallbackInstallerInterceptor.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,65 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.interceptor; + +import it.openutils.spring.remote.callback.Callback; +import it.openutils.spring.remote.callback.manager.CallbackManager; + +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class CallbackInstallerInterceptor implements MethodInterceptor +{ + + private CallbackManager callbackManager; + + private Callback callback; + + /** + * {@inheritDoc} + */ + public Object invoke(MethodInvocation invocation) throws Throwable + { + callbackManager.installCallback(callback); + Object result = invocation.proceed(); + callbackManager.uninstallCallback(callback); + return result; + } + + /** + * Sets the callback. + * @param callback the callback to set + */ + public void setCallback(Callback callback) + { + this.callback = callback; + } + + /** + * Sets the callbackManager. + * @param callbackManager the callbackManager to set + */ + public void setCallbackManager(CallbackManager callbackManager) + { + this.callbackManager = callbackManager; + } +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/interceptor/CallbackInstallerInterceptor.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackHolder.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackHolder.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackHolder.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,58 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.manager; + +import org.apache.commons.lang.StringUtils; +import org.springframework.util.Assert; + + +/** + * @author fcarone + * @version $Id: $ + */ +public final class CallbackHolder +{ + + private static ThreadLocal<String> callbackUID; + + private CallbackHolder() + { + // + } + + /** + * @param uid The callback uid + */ + public static void setCallbackUID(String uid) + { + Assert.notNull(uid, "Only non-null UID instances are permitted"); + callbackUID.set(uid); + } + + public static String getCallbackUID() + { + return callbackUID.get(); + } + + /** + * Clears the callback UID + */ + public static void clearCallback() + { + callbackUID.set(StringUtils.EMPTY); + } +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackHolder.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackManager.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackManager.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackManager.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,44 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.manager; + +import it.openutils.spring.remote.callback.Callback; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface CallbackManager +{ + + /** + * @param callback The callback to register + */ + void installCallback(Callback callback); + + /** + * @param callback The callback to unregister + */ + void uninstallCallback(Callback callback); + + /** + * Invokes the current callback + */ + void invokeCallback(); + +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/CallbackManager.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/impl/CallbackManagerImpl.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/impl/CallbackManagerImpl.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/impl/CallbackManagerImpl.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,66 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.manager.impl; + +import it.openutils.spring.remote.callback.Callback; +import it.openutils.spring.remote.callback.manager.CallbackHolder; +import it.openutils.spring.remote.callback.manager.CallbackManager; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class CallbackManagerImpl implements CallbackManager +{ + + private Set<Callback> callbacks = new HashSet<Callback>(); + private Map<String, Callback> callbacksMap = new HashMap<String, Callback>(); + + /** + * {@inheritDoc} + */ + public void invokeCallback() + { + Callback callback = callbacksMap.get(CallbackHolder.getCallbackUID()); + callback.invoke(); + } + + /** + * {@inheritDoc} + */ + public void installCallback(Callback callback) + { + callbacks.add(callback); + callbacksMap.put(callback.getUID(), callback); + } + + /** + * {@inheritDoc} + */ + public void uninstallCallback(Callback callback) + { + callbacks.remove(callback); + callbacksMap.remove(callback.getUID()); + } + +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/manager/impl/CallbackManagerImpl.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocation.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocation.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocation.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,66 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.rmi; + +import it.openutils.spring.remote.callback.manager.CallbackHolder; + +import java.lang.reflect.InvocationTargetException; + +import org.aopalliance.intercept.MethodInvocation; +import org.springframework.remoting.support.RemoteInvocation; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class CallbackRemoteInvocation extends RemoteInvocation +{ + /** + * + */ + private static final long serialVersionUID = 5093459466178643546L; + + private String callbackUID; + + /** + * @param methodInvocation The methodInvocation + */ + public CallbackRemoteInvocation(MethodInvocation methodInvocation) + { + super(methodInvocation); + this.callbackUID = CallbackHolder.getCallbackUID(); + } + + /** + * {@inheritDoc} + */ + @Override + public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, + InvocationTargetException + { + CallbackHolder.setCallbackUID(callbackUID); + try + { + return super.invoke(targetObject); + } + finally + { + CallbackHolder.clearCallback(); + } + } +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocation.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocationFactory.java =================================================================== --- trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocationFactory.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocationFactory.java 2008-03-20 15:13:45 UTC (rev 748) @@ -0,0 +1,45 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.rmi; + +import org.aopalliance.intercept.MethodInvocation; +import org.springframework.remoting.support.RemoteInvocation; +import org.springframework.remoting.support.RemoteInvocationFactory; + + + +/** + * @author fcarone + * @version $Id: $ + */ +public class CallbackRemoteInvocationFactory implements RemoteInvocationFactory +{ + /** + * + */ + private static final long serialVersionUID = 5093459466178643546L; + + /** + * {@inheritDoc} + */ + public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) + { + return new CallbackRemoteInvocation(methodInvocation); + } + + +} Property changes on: trunk/openutils-spring-remote-callback/src/main/java/it/openutils/spring/remote/callback/rmi/CallbackRemoteInvocationFactory.java ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |