You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jbo...@li...> - 2006-04-17 16:48:59
|
Author: tirelli Date: 2006-04-17 12:48:44 -0400 (Mon, 17 Apr 2006) New Revision: 3742 Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/conflict/RecencyConflictResolver.java Log: fixing null pointer exception on RecencyConflictResolver Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/conflict/RecencyConflictResolver.java =================================================================== --- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/conflict/RecencyConflictResolver.java 2006-04-17 15:56:15 UTC (rev 3741) +++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/conflict/RecencyConflictResolver.java 2006-04-17 16:48:44 UTC (rev 3742) @@ -41,9 +41,7 @@ * */ -import org.drools.FactHandle; import org.drools.common.InternalFactHandle; -import org.drools.reteoo.FactHandleImpl; import org.drools.spi.Activation; import org.drools.spi.ConflictResolver; @@ -111,10 +109,9 @@ rightMostRecent = getMostRecentFact( rFacts, rightMostRecent ); if ( leftMostRecent == null || rightMostRecent == null ) { if( leftMostRecent == null && rightMostRecent != null ) { - return leftMostRecent.getRecency(); - } - } - if ( leftMostRecent.getRecency() != rightMostRecent.getRecency() ) { + return (int) rightMostRecent.getRecency(); + } + } else if ( leftMostRecent.getRecency() != rightMostRecent.getRecency() ) { return (int) ( rightMostRecent.getRecency() - leftMostRecent.getRecency() ); } } |
From: <jbo...@li...> - 2006-04-17 15:56:17
|
Author: mla...@jb... Date: 2006-04-17 11:56:15 -0400 (Mon, 17 Apr 2006) New Revision: 3741 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.sh Log: Use tag or trunk for tcnative svn. Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.sh 2006-04-17 15:48:24 UTC (rev 3740) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.sh 2006-04-17 15:56:15 UTC (rev 3741) @@ -1,19 +1,19 @@ #/bin/sh # -# # JBoss, the OpenSource J2EE webOS # # Distributable under LGPL license. # See terms of license at gnu.org. # -# Replace NATIVETAG with real tag, like TOMCAT_NATIVE_1_1_0 NATIVETAG=HEAD -# NATIVEEXT="1.1.3" # Replace NATIVEEXT with tagged version number, like 1.1.0 NATIVEEXT="current" -NATIVESVN=http://svn.apache.org/repos/asf/tomcat/connectors/trunk +# Use tag or trunk +# NATIVESVN=http://svn.apache.org/repos/asf/tomcat/connectors/trunk +NATIVESVN=http://svn.apache.org/repos/asf/tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_3 + NATIVEDIST=tomcat-native-${NATIVEEXT} rm -rf ${NATIVEDIST} |
From: <jbo...@li...> - 2006-04-17 15:48:27
|
Author: mla...@jb... Date: 2006-04-17 11:48:24 -0400 (Mon, 17 Apr 2006) New Revision: 3740 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.sh Log: Property changes on: labs/jbossweb/trunk/src/share/native/build/buildprep.sh ___________________________________________________________________ Name: svn:executable + * |
From: <jbo...@li...> - 2006-04-17 15:47:43
|
Author: mla...@jb... Date: 2006-04-17 11:47:39 -0400 (Mon, 17 Apr 2006) New Revision: 3739 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.sh labs/jbossweb/trunk/src/share/native/build/buildworld.sh Log: Property changes on: labs/jbossweb/trunk/src/share/native/build/buildprep.sh ___________________________________________________________________ Name: svn:eol-style + native Property changes on: labs/jbossweb/trunk/src/share/native/build/buildworld.sh ___________________________________________________________________ Name: svn:eol-style + native |
From: <jbo...@li...> - 2006-04-17 15:47:04
|
Author: mla...@jb... Date: 2006-04-17 11:46:54 -0400 (Mon, 17 Apr 2006) New Revision: 3738 Added: labs/jbossweb/trunk/src/share/native/build/buildprep.sh Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.sh Log: Added: labs/jbossweb/trunk/src/share/native/build/buildprep.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.sh 2006-04-17 15:41:43 UTC (rev 3737) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.sh 2006-04-17 15:46:54 UTC (rev 3738) @@ -0,0 +1,48 @@ +#/bin/sh +# +# +# JBoss, the OpenSource J2EE webOS +# +# Distributable under LGPL license. +# See terms of license at gnu.org. +# +# Replace NATIVETAG with real tag, like TOMCAT_NATIVE_1_1_0 +NATIVETAG=HEAD +# NATIVEEXT="1.1.3" + +# Replace NATIVEEXT with tagged version number, like 1.1.0 +NATIVEEXT="current" + +NATIVESVN=http://svn.apache.org/repos/asf/tomcat/connectors/trunk +NATIVEDIST=tomcat-native-${NATIVEEXT} +rm -rf ${NATIVEDIST} + +svn export -r $NATIVETAG ${NATIVESVN}/jni/native ${NATIVEDIST} + +APRVER="1.2.7" +SSLVER="0.9.8a" + +# Prebuild +cd ${NATIVEDIST} +mkdir srclib +cd srclib + +wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/apr/apr-${APRVER}.tar.gz +tar zxf apr-${APRVER}.tar.gz + +wget http://www.openssl.org/source/openssl-${SSLVER}.tar.gz +tar zxf openssl-${SSLVER}.tar.gz +#Adjust the location of APR sources +cd .. +./buildconf --with-apr=./srclib/apr-${APRVER} +cd .. +cp ./buildworld.sh ${NATIVEDIST}/ + +# Create distribution +tar cfz ${NATIVEDIST}.tar.gz ${NATIVEDIST} + +# Convert lineends to DOS +# perl apr/build/lineends.pl --cr ${NATIVEDIST} +# zip -9 -r ${NATIVEDIST}.zip ${NATIVEDIST} + +rm -rf ${NATIVEDIST} Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildworld.sh 2006-04-17 15:41:43 UTC (rev 3737) +++ labs/jbossweb/trunk/src/share/native/build/buildworld.sh 2006-04-17 15:46:54 UTC (rev 3738) @@ -1,5 +1,11 @@ #/bin/sh # +# JBoss, the OpenSource J2EE webOS +# +# Distributable under LGPL license. +# See terms of license at gnu.org. +# + TEST=test SSLVER="0.9.8a" SSLNUM="0.9.8" |
From: <jbo...@li...> - 2006-04-17 15:41:48
|
Author: mla...@jb... Date: 2006-04-17 11:41:43 -0400 (Mon, 17 Apr 2006) New Revision: 3737 Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.sh Log: Set exe tag Property changes on: labs/jbossweb/trunk/src/share/native/build/buildworld.sh ___________________________________________________________________ Name: svn:executable + * |
From: <jbo...@li...> - 2006-04-17 15:28:02
|
Author: mla...@jb... Date: 2006-04-17 11:27:55 -0400 (Mon, 17 Apr 2006) New Revision: 3736 Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.sh Log: Add make depend to OpenSSL Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildworld.sh 2006-04-17 15:01:49 UTC (rev 3735) +++ labs/jbossweb/trunk/src/share/native/build/buildworld.sh 2006-04-17 15:27:55 UTC (rev 3736) @@ -3,7 +3,7 @@ TEST=test SSLVER="0.9.8a" SSLNUM="0.9.8" -APRVER="1.2.6" +APRVER="1.2.7" TCNATIVE_BASE=`pwd` TCNATIVE_BUILD=`uname -p` TCNATIVE_BIN=${TCNATIVE_BASE}/../native-builds/${TCNATIVE_BUILD} @@ -13,16 +13,17 @@ shift else cd srclib/openssl-${SSLVER} - + case ${TCNATIVE_BUILD} in - sparc*) + sparc*) ./Configure --prefix=${TCNATIVE_BIN} --openssldir=${TCNATIVE_BIN}/ssl threads zlib no-krb5 no-rc5 no-mdc2 no-idea no-ec shared solaris64-sparcv9-gcc ;; - *) + *) ./config --prefix=${TCNATIVE_BIN} --openssldir=${TCNATIVE_BIN}/ssl threads zlib no-krb5 no-rc5 no-mdc2 no-idea no-ec shared - ;; - esac + ;; + esac make + make depend make install_sw cd .. cd apr-${APRVER} |
From: <jbo...@li...> - 2006-04-17 15:02:03
|
Author: mla...@jb... Date: 2006-04-17 11:01:49 -0400 (Mon, 17 Apr 2006) New Revision: 3735 Added: labs/jbossweb/trunk/src/share/native/build/buildworld.sh Log: Initial version Added: labs/jbossweb/trunk/src/share/native/build/buildworld.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildworld.sh 2006-04-17 13:39:12 UTC (rev 3734) +++ labs/jbossweb/trunk/src/share/native/build/buildworld.sh 2006-04-17 15:01:49 UTC (rev 3735) @@ -0,0 +1,41 @@ +#/bin/sh +# +TEST=test +SSLVER="0.9.8a" +SSLNUM="0.9.8" +APRVER="1.2.6" +TCNATIVE_BASE=`pwd` +TCNATIVE_BUILD=`uname -p` +TCNATIVE_BIN=${TCNATIVE_BASE}/../native-builds/${TCNATIVE_BUILD} + +nativeonly=$1 +if ${TEST} "${nativeonly}" = "--native" ; then + shift +else + cd srclib/openssl-${SSLVER} + + case ${TCNATIVE_BUILD} in + sparc*) + ./Configure --prefix=${TCNATIVE_BIN} --openssldir=${TCNATIVE_BIN}/ssl threads zlib no-krb5 no-rc5 no-mdc2 no-idea no-ec shared solaris64-sparcv9-gcc + ;; + *) + ./config --prefix=${TCNATIVE_BIN} --openssldir=${TCNATIVE_BIN}/ssl threads zlib no-krb5 no-rc5 no-mdc2 no-idea no-ec shared + ;; + esac + make + make install_sw + cd .. + cd apr-${APRVER} + ./configure --prefix=${TCNATIVE_BIN} + make + make install + cd ${TCNATIVE_BIN}/lib + ln -s libcrypto.so.${SSLNUM} libcrypto.so.0 + ln -s libssl.so.${SSLNUM} libssl.so.0 + cd ${TCNATIVE_BASE} +fi + +./configure --prefix=${TCNATIVE_BIN} --with-apr=${TCNATIVE_BIN} --with-ssl=${TCNATIVE_BIN} $1 + +make +make install |
From: <jbo...@li...> - 2006-04-17 11:58:54
|
Author: mic...@jb... Date: 2006-04-17 07:58:46 -0400 (Mon, 17 Apr 2006) New Revision: 3733 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml Log: improvements Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml 2006-04-17 11:13:19 UTC (rev 3732) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml 2006-04-17 11:58:46 UTC (rev 3733) @@ -16,12 +16,27 @@ </mediaobject> </figure> - <para>uuuere</para> + <para>The Rule construct is where is all happens. Rules are of the form "IF" + something "THEN" action (of course we chose the keywords "when" and "then") + - in the style of production rules. </para> + <para>A rule must have a name, and be a unique name for a rule package. If a + rule name is to have spaces, then it will need to be in double quotes (its + best to always use double quotes.</para> + + <para>Attributes are optional, and are described below (they are best kept + as one per line).</para> + + <para>The LHS of the rule follows the "when" keyword (ideally on a new + line), similarly the RHS follows the "then" keyword (ideally on a newline). + The rule is terminated by the keyword "end". Rules cannot be nested of + course.</para> + <section> <title>Left Hand Side</title> - <para></para> + <para>To interpret the following diagram, refer to the sections below for + the details.</para> <figure> <title>Left Hand Side</title> @@ -156,7 +171,13 @@ Cheese( type == "stilton", price < 10 )</programlisting> </example> - <para>A Column is what Drools refers to</para> + <para>A Column is what Drools refers calls a list of constraints on an + Object type. The above cases refer to constraints against instances of a + Cheese object. In the first case, there are obviously no constraints, so + this Column will match all instances of Cheese that it finds in working + memory. In the latter case, there are 2 constraints on "fields" that must + be met before the Cheese object will be matched (they are seperated by a + comma, which implicitly means "and").</para> <figure> <title>Column</title> @@ -175,7 +196,7 @@ </figure> <example> - <title> Bound Column</title> + <title>Bound Column</title> <programlisting>cheapStilton : Cheese( type == "stilton", price < 10 )</programlisting> </example> @@ -277,7 +298,7 @@ <simplesect> <title>Date</title> - <para>Currently only "dd/mm/yyyy" date format is supported. There + <para>Currently only "dd-mmm-yyyy" date format is supported. There are plans to make this configurable in the future.</para> <para>Valid operators:</para> @@ -311,7 +332,7 @@ <example> <title>Date Literal Constraint</title> - <programlisting>Cheese( bestBefore < "27/10/2007" )</programlisting> + <programlisting>Cheese( bestBefore < "27-Oct-2007" )</programlisting> </example> </simplesect> |
From: <jbo...@li...> - 2006-04-17 11:13:25
|
Author: mic...@jb... Date: 2006-04-17 07:13:19 -0400 (Mon, 17 Apr 2006) New Revision: 3732 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Function.xml labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml Log: more goodness Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Function.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Function.xml 2006-04-17 04:06:38 UTC (rev 3731) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Function.xml 2006-04-17 11:13:19 UTC (rev 3732) @@ -7,16 +7,43 @@ <mediaobject> <imageobject> - <imagedata align="center" fileref="function.svg" format="SVG" role="" - /> + <imagedata align="center" fileref="function.svg" format="SVG" role="" /> </imageobject> <imageobject> - <imagedata align="center" fileref="function.png" format="PNG" role="" - /> + <imagedata align="center" fileref="function.png" format="PNG" role="" /> </imageobject> </mediaobject> </figure> - <para>uuuere</para> + <para>Functions are a way to put semantic code in your rule source, as + opposed to in normal java classes. They can't do anything more then what you + can do with helper classes (in fact, the compiler generates the helper class + for you behind the scenes, isn't that helpful). The main advantage of using + functions in a rule is that you can keep the logic all in one place, and you + can change the functions as needed (this can be a good and bad thing). + Functions are most useful for invoking actions on the consequence ("then") + part of a rule, especially if that particular action is used over and over + (perhaps with only differing parameters for each rule - for example the + contents of an email message).</para> + + <para>A typica function declaration looks like:</para> + + <para>function String calcSomething(String arg) {</para> + + <para> return "hola !";</para> + + <para>}</para> + + <para>Note that the "function" keyword is used, even though its not really + part of java. Parameters to the function are just like a normal method (and + you don't have to have parameters if they are not needed). Return type is + just like a normal method. To call the function from within a rule (in a + consequence, or perhaps an eval, simply use the function name, and toss in + the parameters - just like a method call). </para> + + <para>An alternative to a function, could be to use a static method in a + helper class: Foo.doSomething(), or perhaps pass in an instance of a helper + class/service as a named global (see the section on globals): + foo.soSomething() (where foo is a named global variable).</para> </section> \ No newline at end of file Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml 2006-04-17 04:06:38 UTC (rev 3731) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml 2006-04-17 11:13:19 UTC (rev 3732) @@ -2,13 +2,14 @@ <section> <title>Package</title> - <para>A package is basically a collection of rules kept under a namespace. A - package represents a namespace, which ideally is kept unique for a given - grouping of rules. The package name itself is just a namespace, and is not - related to files or folders in any way.</para> + <para>A package is basically a collection of rules (rules that are logically + related to each other - perhaps HR rules, for instance). A package + represents a namespace, which ideally is kept unique for a given grouping of + rules. The package name itself is the namespace, and is not related to files + or folders in any way. </para> <para>At the Package level items are things like functions, imports, global - data and so on. </para> + data and so on.</para> <para>Not that it is possible to assemble rules from multiple rule sources, and have one top level package configuration that all the rules are kept @@ -56,7 +57,7 @@ <para>Import statements work like import statements in Java. You need to specify the fully qualified paths and type names for any objects you want - to use in the rule. </para> + to use in the rule.</para> </section> <section> @@ -101,7 +102,24 @@ <para>Globals are global variables (although ideally, they won't change in value while the rules are executing). They typically are used to return - data, such as a log of actions, or provide data that the rules refer - to.</para> + data, such as a log of actions, or provide data or services that the rules + use.</para> + + <para>Note that these are just named instances of objects that you pass in + from your application to the working memory. This means you can pass in + any object you want: you could pass in a service locator, or perhaps a + service itself. </para> + + <para>One example may be an instance of a Email service. In your + integration code that is calling the rule engine, you get your + emailService object, and then set it in the working memory. In the DRL, + you declare that you have a global of type EmailService, and give it a + name "email". Then in your rule consequences, you can use things like + email.sendSMS(number, message); etc... (you get the idea). </para> + + <para>It is important to NOT use globals as a replacement for asserting + facts, if you do, you are bypassing most of the rule engines power, and + may get suprising results (surprising in a bad way, like when a doctor + says "thats interesting" to a chest XRay of yours).</para> </section> </section> \ No newline at end of file |
From: <jbo...@li...> - 2006-04-17 04:06:44
|
Author: mic...@jb... Date: 2006-04-17 00:06:38 -0400 (Mon, 17 Apr 2006) New Revision: 3731 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Comments.xml labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml Log: improvements Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Comments.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Comments.xml 2006-04-17 00:48:23 UTC (rev 3730) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Comments.xml 2006-04-17 04:06:38 UTC (rev 3731) @@ -2,7 +2,8 @@ <section> <title>Comments</title> - <para>uuuere</para> + <para>Comments are sections of text that are ignored by the rule engine. + They are effectively stripped out when they are encountered. </para> <section> <title>Single line comment</title> @@ -13,12 +14,12 @@ <mediaobject> <imageobject> <imagedata align="center" fileref="single_line_comment.svg" - format="SVG" /> + format="SVG" /> </imageobject> <imageobject> <imagedata align="center" fileref="single_line_comment.png" - format="PNG" /> + format="PNG" /> </imageobject> </mediaobject> </figure> @@ -35,12 +36,12 @@ <mediaobject> <imageobject> <imagedata align="center" fileref="multi_line_comment.svg" - format="SVG" /> + format="SVG" /> </imageobject> <imageobject> <imagedata align="center" fileref="multi_line_comment.png" - format="PNG" /> + format="PNG" /> </imageobject> </mediaobject> </figure> @@ -48,25 +49,4 @@ <para></para> </section> - <section> - <title>Documentation</title> - - <figure> - <title>Documentation</title> - - <mediaobject> - <imageobject> - <imagedata align="center" fileref="documentation.svg" format="SVG" - /> - </imageobject> - - <imageobject> - <imagedata align="center" fileref="documentation.png" format="PNG" - /> - </imageobject> - </mediaobject> - </figure> - - <para></para> - </section> </section> \ No newline at end of file Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml 2006-04-17 00:48:23 UTC (rev 3730) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Package.xml 2006-04-17 04:06:38 UTC (rev 3731) @@ -1,21 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> <section> - <title>package</title> + <title>Package</title> - <para>uuuere</para> + <para>A package is basically a collection of rules kept under a namespace. A + package represents a namespace, which ideally is kept unique for a given + grouping of rules. The package name itself is just a namespace, and is not + related to files or folders in any way.</para> + <para>At the Package level items are things like functions, imports, global + data and so on. </para> + + <para>Not that it is possible to assemble rules from multiple rule sources, + and have one top level package configuration that all the rules are kept + under (when the rules are assembled). A common structure, however, is to + have all the rules for a package in the same file as the package declaration + (so that is it entirely self contained).</para> + + <para>The following rail road diagram shows all the components that may make + up a package. Not that a package MUST have a namespace (which can contain no + spaces). In terms of the order of elements, they can appear in any order in + the rule file, with the exception of the "package" and "expander" statements + being at the top of the file, before any rules appear. In all cases, the + semi colons are optional.</para> + <figure> <title>package</title> <mediaobject> <imageobject> - <imagedata align="center" fileref="package.svg" format="SVG" role="" - /> + <imagedata align="center" fileref="package.svg" format="SVG" role="" /> </imageobject> <imageobject> - <imagedata align="center" fileref="package.png" format="PNG" role="" - /> + <imagedata align="center" fileref="package.png" format="PNG" role="" /> </imageobject> </mediaobject> </figure> @@ -28,16 +45,18 @@ <mediaobject> <imageobject> - <imagedata fileref="import.svg" format="SVG" /> + <imagedata fileref="import.svg" format="SVG" /> </imageobject> <imageobject> - <imagedata fileref="import.png" format="PNG" /> + <imagedata fileref="import.png" format="PNG" /> </imageobject> </mediaobject> </figure> - <para></para> + <para>Import statements work like import statements in Java. You need to + specify the fully qualified paths and type names for any objects you want + to use in the rule. </para> </section> <section> @@ -48,16 +67,19 @@ <mediaobject> <imageobject> - <imagedata fileref="expander.svg" format="SVG" /> + <imagedata fileref="expander.svg" format="SVG" /> </imageobject> <imageobject> - <imagedata fileref="expander.png" format="PNG" /> + <imagedata fileref="expander.png" format="PNG" /> </imageobject> </mediaobject> </figure> - <para></para> + <para>The expander statement (optional) is used to specify domain specific + language configurations (which are normally stored in a seperate file). + This provides clues to the parser as to how to understand what you are + raving on about in your rules.</para> </section> <section> @@ -68,15 +90,18 @@ <mediaobject> <imageobject> - <imagedata fileref="global.svg" format="SVG" /> + <imagedata fileref="global.svg" format="SVG" /> </imageobject> <imageobject> - <imagedata fileref="global.png" format="PNG" /> + <imagedata fileref="global.png" format="PNG" /> </imageobject> </mediaobject> </figure> - <para></para> + <para>Globals are global variables (although ideally, they won't change in + value while the rules are executing). They typically are used to return + data, such as a log of actions, or provide data that the rules refer + to.</para> </section> </section> \ No newline at end of file |
From: <jbo...@li...> - 2006-04-17 00:48:31
|
Author: mar...@jb... Date: 2006-04-16 20:48:23 -0400 (Sun, 16 Apr 2006) New Revision: 3730 Added: labs/jbossrules/tags/RC-2/ Log: made a copy Copied: labs/jbossrules/tags/RC-2 (from rev 3729, labs/jbossrules/trunk) |
From: <jbo...@li...> - 2006-04-17 00:47:52
|
Author: mar...@jb... Date: 2006-04-16 20:47:47 -0400 (Sun, 16 Apr 2006) New Revision: 3729 Removed: labs/jbossrules/tags/RC-2/ Log: Removed file/folder |
From: <jbo...@li...> - 2006-04-17 00:40:47
|
Author: mar...@jb... Date: 2006-04-16 20:40:39 -0400 (Sun, 16 Apr 2006) New Revision: 3728 Added: labs/jbossrules/tags/RC-2/trunk/ Log: made a copy Copied: labs/jbossrules/tags/RC-2/trunk (from rev 3727, labs/jbossrules/trunk) |
From: <jbo...@li...> - 2006-04-16 23:28:58
|
Author: mar...@jb... Date: 2006-04-16 19:28:51 -0400 (Sun, 16 Apr 2006) New Revision: 3727 Added: labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar Log: -added missing repo jar Added: labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar =================================================================== (Binary files differ) Property changes on: labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <jbo...@li...> - 2006-04-16 14:59:20
|
Author: tirelli Date: 2006-04-16 10:59:14 -0400 (Sun, 16 Apr 2006) New Revision: 3726 Modified: labs/jbossrules/trunk/pom.xml Log: updating personal info Modified: labs/jbossrules/trunk/pom.xml =================================================================== --- labs/jbossrules/trunk/pom.xml 2006-04-16 14:58:29 UTC (rev 3725) +++ labs/jbossrules/trunk/pom.xml 2006-04-16 14:59:14 UTC (rev 3726) @@ -182,12 +182,11 @@ <developer> <name>Edson Tirelli</name> <id>tirelli</id> - <email>eds...@au...</email> + <email>ti...@po...</email> <roles> <role>Developer</role> </roles> <timezone>-3</timezone> - <organization>Auster Solutions do Brasil</organization> </developer> </developers> |
From: <jbo...@li...> - 2006-04-16 14:58:42
|
Author: tirelli Date: 2006-04-16 10:58:29 -0400 (Sun, 16 Apr 2006) New Revision: 3725 Modified: labs/jbossrules/trunk/drools-core/pom.xml Log: Fixing dependency Modified: labs/jbossrules/trunk/drools-core/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-core/pom.xml 2006-04-16 10:47:22 UTC (rev 3724) +++ labs/jbossrules/trunk/drools-core/pom.xml 2006-04-16 14:58:29 UTC (rev 3725) @@ -40,9 +40,9 @@ </dependency> <dependency> - <groupId>xpp</groupId> - <artifactId>xpp</artifactId> - <version>3-1.1.3.4.O</version> + <groupId>xpp3</groupId> + <artifactId>xpp3</artifactId> + <version>1.1.3.4.O</version> </dependency> </dependencies> @@ -97,4 +97,4 @@ </build> -</project> \ No newline at end of file +</project> |
From: <jbo...@li...> - 2006-04-16 10:47:27
|
Author: mar...@jb... Date: 2006-04-16 06:47:22 -0400 (Sun, 16 Apr 2006) New Revision: 3724 Added: labs/jbossrules/tags/RC-2/ Log: made a copy Copied: labs/jbossrules/tags/RC-2 (from rev 3723, labs/jbossrules/trunk) |
From: <jbo...@li...> - 2006-04-16 10:32:38
|
Author: mar...@jb... Date: 2006-04-16 06:32:26 -0400 (Sun, 16 Apr 2006) New Revision: 3723 Modified: labs/jbossrules/trunk/pom.xml Log: -commented out some aggregate goals Modified: labs/jbossrules/trunk/pom.xml =================================================================== --- labs/jbossrules/trunk/pom.xml 2006-04-15 15:02:25 UTC (rev 3722) +++ labs/jbossrules/trunk/pom.xml 2006-04-16 10:32:26 UTC (rev 3723) @@ -243,10 +243,10 @@ <reporting> <plugins> - <plugin> + <!--plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clover-plugin</artifactId> - </plugin> + </plugin--> <plugin> <artifactId>maven-javadoc-plugin</artifactId> @@ -291,7 +291,7 @@ </configuration> </plugin> - <plugin> + <!--plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clover-plugin</artifactId> <configuration/> @@ -304,7 +304,7 @@ </goals> </execution> </executions> - </plugin> + </plugin--> </plugins> </build> |
From: <jbo...@li...> - 2006-04-15 15:02:29
|
Author: mar...@jb... Date: 2006-04-15 11:02:25 -0400 (Sat, 15 Apr 2006) New Revision: 3722 Modified: labs/jbossrules/trunk/pom.xml Log: -Updated to produce reports Modified: labs/jbossrules/trunk/pom.xml =================================================================== --- labs/jbossrules/trunk/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) +++ labs/jbossrules/trunk/pom.xml 2006-04-15 15:02:25 UTC (rev 3722) @@ -241,6 +241,27 @@ </dependency> </dependencies> + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clover-plugin</artifactId> + </plugin> + + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + </plugins> + </reporting> + <build> <plugins> <plugin> @@ -268,7 +289,22 @@ <maxmemory>512</maxmemory> <aggregate>true</aggregate> </configuration> - </plugin> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clover-plugin</artifactId> + <configuration/> + <executions> + <execution> + <phase>pre-site</phase> + <goals> + <goal>instrument</goal> + <goal>aggregate</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> |
From: <jbo...@li...> - 2006-04-15 14:14:27
|
Author: mar...@jb... Date: 2006-04-15 10:13:47 -0400 (Sat, 15 Apr 2006) New Revision: 3721 Added: labs/jbossrules/trunk/repository/xpp/ labs/jbossrules/trunk/repository/xpp/xpp/ labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/ labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/pom.xml Modified: labs/jbossrules/trunk/documentation/manual/en/master.xml labs/jbossrules/trunk/drools-compiler/.classpath labs/jbossrules/trunk/drools-compiler/.project labs/jbossrules/trunk/drools-compiler/pom.xml labs/jbossrules/trunk/drools-core/.classpath labs/jbossrules/trunk/drools-core/pom.xml labs/jbossrules/trunk/drools-decisiontables/.classpath labs/jbossrules/trunk/drools-decisiontables/pom.xml labs/jbossrules/trunk/drools-examples/pom.xml labs/jbossrules/trunk/drools-examples/src/java/com/sample/TroubleTicketExampleWithDSL.java labs/jbossrules/trunk/drools-ide/META-INF/MANIFEST.MF labs/jbossrules/trunk/drools-jsr94/.classpath labs/jbossrules/trunk/drools-jsr94/pom.xml labs/jbossrules/trunk/drools-natural-dsl/pom.xml labs/jbossrules/trunk/drools-repository/pom.xml labs/jbossrules/trunk/drools-ruledoc/pom.xml labs/jbossrules/trunk/pom.xml Log: -Updated to latest xpp3 Modified: labs/jbossrules/trunk/documentation/manual/en/master.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/master.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/documentation/manual/en/master.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -5,7 +5,7 @@ <subtitle>Drools Documentation</subtitle> - <releaseinfo>3.0-RC-1</releaseinfo> + <releaseinfo>3.0-RC-2</releaseinfo> <author> <firstname>Mark</firstname> Modified: labs/jbossrules/trunk/drools-compiler/.classpath =================================================================== --- labs/jbossrules/trunk/drools-compiler/.classpath 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-compiler/.classpath 2006-04-15 14:13:47 UTC (rev 3721) @@ -5,21 +5,21 @@ <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/> <classpathentry kind="output" path="target/classes"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/> - <classpathentry kind="var" path="M2_REPO/jung/jung/1.7.2/jung-1.7.2.jar"/> - <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/> + <classpathentry kind="var" path="M2_REPO/drools-asm/drools-asm/2.2.1/drools-asm-2.2.1.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> + <classpathentry kind="var" path="M2_REPO/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/stringtemplate/2.3b6/stringtemplate-2.3b6.jar"/> + <classpathentry kind="src" path="/drools-core"/> <classpathentry kind="var" path="M2_REPO/jci/jci/SNAPSHOT-378493+patch3/jci-SNAPSHOT-378493+patch3.jar"/> - <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar"/> - <classpathentry kind="var" path="M2_REPO/eclipse/jdtcore/3.2.0.v_653/jdtcore-3.2.0.v_653.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/stringtemplate/2.3b6/stringtemplate-2.3b6.jar"/> <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> - <classpathentry kind="src" path="/drools-core"/> - <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> - <classpathentry kind="var" path="M2_REPO/drools-asm/drools-asm/2.2.1/drools-asm-2.2.1.jar"/> + <classpathentry kind="var" path="M2_REPO/jung/jung/1.7.2/jung-1.7.2.jar"/> <classpathentry kind="var" path="M2_REPO/antlr/antlr3/3.0ea8/antlr3-3.0ea8.jar"/> - <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> + <classpathentry kind="var" path="M2_REPO/eclipse/jdtcore/3.2.0.v_653/jdtcore-3.2.0.v_653.jar"/> </classpath> \ No newline at end of file Modified: labs/jbossrules/trunk/drools-compiler/.project =================================================================== --- labs/jbossrules/trunk/drools-compiler/.project 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-compiler/.project 2006-04-15 14:13:47 UTC (rev 3721) @@ -1,7 +1,9 @@ <projectDescription> <name>drools-compiler</name> <comment/> - <projects/> + <projects> + <project>drools-core</project> + </projects> <buildSpec> <buildCommand> <name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</name> Modified: labs/jbossrules/trunk/drools-compiler/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-compiler/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-compiler/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,7 +2,7 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -10,7 +10,7 @@ <artifactId>drools-compiler</artifactId> <name>Drools :: Compiler</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <repositories> <repository> Modified: labs/jbossrules/trunk/drools-core/.classpath =================================================================== --- labs/jbossrules/trunk/drools-core/.classpath 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-core/.classpath 2006-04-15 14:13:47 UTC (rev 3721) @@ -4,13 +4,13 @@ <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/> <classpathentry kind="output" path="target/classes"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/> <classpathentry kind="var" path="M2_REPO/jung/jung/1.7.2/jung-1.7.2.jar"/> + <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> + <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/> - <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> <classpathentry kind="var" path="M2_REPO/drools-asm/drools-asm/2.2.1/drools-asm-2.2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> - <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar"/> - <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> + <classpathentry kind="var" path="M2_REPO/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar"/> </classpath> \ No newline at end of file Modified: labs/jbossrules/trunk/drools-core/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-core/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-core/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,7 +2,7 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -10,7 +10,7 @@ <artifactId>drools-core</artifactId> <name>Drools :: Rete-OO Core</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <repositories> <repository> @@ -40,9 +40,9 @@ </dependency> <dependency> - <groupId>xpp3</groupId> - <artifactId>xpp3</artifactId> - <version>1.1.3.3</version> + <groupId>xpp</groupId> + <artifactId>xpp</artifactId> + <version>3-1.1.3.4.O</version> </dependency> </dependencies> Modified: labs/jbossrules/trunk/drools-decisiontables/.classpath =================================================================== --- labs/jbossrules/trunk/drools-decisiontables/.classpath 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-decisiontables/.classpath 2006-04-15 14:13:47 UTC (rev 3721) @@ -5,23 +5,23 @@ <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/> <classpathentry kind="output" path="target/classes"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/> + <classpathentry kind="var" path="M2_REPO/jci/jci/SNAPSHOT-378493+patch3/jci-SNAPSHOT-378493+patch3.jar"/> + <classpathentry kind="var" path="M2_REPO/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar"/> <classpathentry kind="var" path="M2_REPO/jung/jung/1.7.2/jung-1.7.2.jar"/> + <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/> - <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/jci/jci/SNAPSHOT-378493+patch3/jci-SNAPSHOT-378493+patch3.jar"/> - <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/antlr3/3.0ea8/antlr3-3.0ea8.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> + <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> + <classpathentry kind="var" path="M2_REPO/eclipse/jdtcore/3.2.0.v_653/jdtcore-3.2.0.v_653.jar"/> + <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> + <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/> <classpathentry kind="src" path="/drools-compiler"/> <classpathentry kind="var" path="M2_REPO/antlr/stringtemplate/2.3b6/stringtemplate-2.3b6.jar"/> - <classpathentry kind="var" path="M2_REPO/eclipse/jdtcore/3.2.0.v_653/jdtcore-3.2.0.v_653.jar"/> - <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> <classpathentry kind="src" path="/drools-core"/> - <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> <classpathentry kind="var" path="M2_REPO/drools-asm/drools-asm/2.2.1/drools-asm-2.2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/antlr3/3.0ea8/antlr3-3.0ea8.jar"/> - <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> </classpath> \ No newline at end of file Modified: labs/jbossrules/trunk/drools-decisiontables/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-decisiontables/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-decisiontables/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,7 +2,7 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -10,7 +10,7 @@ <artifactId>drools-decisiontables</artifactId> <name>Drools :: Decision Tables</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <repositories> <repository> Modified: labs/jbossrules/trunk/drools-examples/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-examples/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-examples/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,7 +2,7 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -10,7 +10,7 @@ <artifactId>drools-examples</artifactId> <name>Drools :: Examples</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <repositories> <repository> Modified: labs/jbossrules/trunk/drools-examples/src/java/com/sample/TroubleTicketExampleWithDSL.java =================================================================== --- labs/jbossrules/trunk/drools-examples/src/java/com/sample/TroubleTicketExampleWithDSL.java 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-examples/src/java/com/sample/TroubleTicketExampleWithDSL.java 2006-04-15 14:13:47 UTC (rev 3721) @@ -7,8 +7,8 @@ import org.drools.RuleBase; import org.drools.RuleBaseFactory; import org.drools.WorkingMemory; +import org.drools.audit.WorkingMemoryFileLogger; import org.drools.compiler.PackageBuilder; -import org.drools.reteoo.WorkingMemoryFileLogger; public class TroubleTicketExampleWithDSL { Modified: labs/jbossrules/trunk/drools-ide/META-INF/MANIFEST.MF =================================================================== --- labs/jbossrules/trunk/drools-ide/META-INF/MANIFEST.MF 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-ide/META-INF/MANIFEST.MF 2006-04-15 14:13:47 UTC (rev 3721) @@ -46,4 +46,5 @@ lib/stringtemplate-2.3b6.jar, lib/xercesImpl-2.6.2.jar, lib/xstream-1.1.3.jar, - lib/xpp3-1.1.3.3.jar + lib/xpp-3-1.1.3.4.O.jar, + lib/xml-apis-1.0.b2.jar Modified: labs/jbossrules/trunk/drools-jsr94/.classpath =================================================================== --- labs/jbossrules/trunk/drools-jsr94/.classpath 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-jsr94/.classpath 2006-04-15 14:13:47 UTC (rev 3721) @@ -1,29 +1,29 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/main/java"/> - <classpathentry output="target/test-classes" kind="src" path="src/test/java"/> - <classpathentry output="target/test-classes" kind="src" path="src/test/resources"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/> - <classpathentry kind="var" path="M2_REPO/jung/jung/1.7.2/jung-1.7.2.jar"/> - <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/> - <classpathentry sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar" kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> - <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar"/> - <classpathentry kind="var" path="M2_REPO/eclipse/jdtcore/3.2.0.v_653/jdtcore-3.2.0.v_653.jar"/> - <classpathentry kind="src" path="/drools-compiler"/> - <classpathentry kind="var" path="M2_REPO/antlr/stringtemplate/2.3b6/stringtemplate-2.3b6.jar"/> - <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> - <classpathentry kind="var" path="M2_REPO/jsr94/jsr94/1.1/jsr94-1.1.jar"/> - <classpathentry kind="src" path="/drools-core"/> - <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> - <classpathentry kind="var" path="M2_REPO/drools-asm/drools-asm/2.2.1/drools-asm-2.2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/jsr94/jsr94-tck/1.0.2/jsr94-tck-1.0.2.jar"/> - <classpathentry kind="var" path="M2_REPO/antlr/antlr3/3.0ea8/antlr3-3.0ea8.jar"/> - <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> - <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> - <classpathentry kind="var" path="M2_REPO/jsr94/jsr94-sigtest/1.1/jsr94-sigtest-1.1.jar"/> - <classpathentry kind="output" path="target/classes"/> -</classpath> +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/test/java" output="target/test-classes"/> + <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> + <classpathentry kind="var" path="M2_REPO/jsr94/jsr94-tck/1.0.2/jsr94-tck-1.0.2.jar"/> + <classpathentry kind="var" path="M2_REPO/jung/jung/1.7.2/jung-1.7.2.jar"/> + <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/> + <classpathentry kind="var" path="M2_REPO/jsr94/jsr94/1.1/jsr94-1.1.jar"/> + <classpathentry kind="var" path="M2_REPO/jci/jci/SNAPSHOT-378493+patch3/jci-SNAPSHOT-378493+patch3.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> + <classpathentry kind="var" path="M2_REPO/xpp/xpp/3-1.1.3.4.O/xpp-3-1.1.3.4.O.jar"/> + <classpathentry kind="var" path="M2_REPO/colt/colt/1.2.0/colt-1.2.0.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> + <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/> + <classpathentry kind="var" path="M2_REPO/eclipse/jdtcore/3.2.0.v_653/jdtcore-3.2.0.v_653.jar"/> + <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/> + <classpathentry kind="src" path="/drools-compiler"/> + <classpathentry kind="var" path="M2_REPO/antlr/stringtemplate/2.3b6/stringtemplate-2.3b6.jar"/> + <classpathentry kind="src" path="/drools-core"/> + <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/> + <classpathentry kind="var" path="M2_REPO/drools-asm/drools-asm/2.2.1/drools-asm-2.2.1.jar"/> + <classpathentry kind="var" path="M2_REPO/antlr/antlr3/3.0ea8/antlr3-3.0ea8.jar"/> + <classpathentry kind="var" path="M2_REPO/jsr94/jsr94-sigtest/1.1/jsr94-sigtest-1.1.jar"/> +</classpath> \ No newline at end of file Modified: labs/jbossrules/trunk/drools-jsr94/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-jsr94/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-jsr94/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,7 +2,7 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -10,7 +10,7 @@ <artifactId>drools-jsr94</artifactId> <name>Drools :: JSR-94 API Module</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <repositories> <repository> Modified: labs/jbossrules/trunk/drools-natural-dsl/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-natural-dsl/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-natural-dsl/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,13 +2,13 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1/version> + <version>3.0-RC-2/version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>drools-natural-dsl</artifactId> <name>Drools :: Natural and DSL utility</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <packaging>jar</packaging> <dependencies> Modified: labs/jbossrules/trunk/drools-repository/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-repository/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-repository/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,13 +2,13 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>drools-repository</artifactId> <name>Drools :: Repository API</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <packaging>jar</packaging> <repositories> Modified: labs/jbossrules/trunk/drools-ruledoc/pom.xml =================================================================== --- labs/jbossrules/trunk/drools-ruledoc/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/drools-ruledoc/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -2,13 +2,13 @@ <parent> <artifactId>drools</artifactId> <groupId>org.drools</groupId> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>drools-ruledoc</artifactId> <name>Drools :: Rule Documents</name> - <version>3.0-RC-1/version> + <version>3.0-RC-2/version> <packaging>jar</packaging> Modified: labs/jbossrules/trunk/pom.xml =================================================================== --- labs/jbossrules/trunk/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -4,7 +4,7 @@ <artifactId>drools</artifactId> <packaging>pom</packaging> <name>Drools</name> - <version>3.0-RC-1</version> + <version>3.0-RC-2</version> <issueManagement> <system>jira</system> Added: labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/pom.xml =================================================================== --- labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/pom.xml 2006-04-14 21:32:03 UTC (rev 3720) +++ labs/jbossrules/trunk/repository/xpp/xpp/3-1.1.3.4.O/pom.xml 2006-04-15 14:13:47 UTC (rev 3721) @@ -0,0 +1,17 @@ +<project> + <pomVersion>3</pomVersion> + <id>xpp</id> + <name>XPP - XML Pull Parser</name> + <currentVersion>3-1.1.3.4.O</currentVersion> + <organization> + <name>Indiana University Extreme! Lab</name> + <url></url> + </organization> + <licenses> + <license> + <name>Indiana University Extreme! Lab Software License</name> + <url>http://www.extreme.indiana.edu/xgws/xsoap/xpp/download/xpp3/LICENSE.txt</url> + <comments>BSDish license</comments> + </license> + </licenses> +</project> |
From: <jbo...@li...> - 2006-04-14 21:32:10
|
Author: tirelli Date: 2006-04-14 17:32:03 -0400 (Fri, 14 Apr 2006) New Revision: 3720 Added: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/FieldImplTest.java Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/FieldImpl.java Log: JBRULES-213: fixing node sharing problem when field was null Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/FieldImpl.java =================================================================== --- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/FieldImpl.java 2006-04-14 21:10:20 UTC (rev 3719) +++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/FieldImpl.java 2006-04-14 21:32:03 UTC (rev 3720) @@ -33,7 +33,7 @@ if (this.value != null) { return this.value.hashCode(); } else { - return super.hashCode(); + return 0; } } } \ No newline at end of file Added: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/FieldImplTest.java =================================================================== --- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/FieldImplTest.java 2006-04-14 21:10:20 UTC (rev 3719) +++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/FieldImplTest.java 2006-04-14 21:32:03 UTC (rev 3720) @@ -0,0 +1,54 @@ +package org.drools.base; + +import junit.framework.Assert; +import junit.framework.TestCase; + +public class FieldImplTest extends TestCase { + FieldImpl field1; + FieldImpl field2; + FieldImpl field3; + FieldImpl field4; + FieldImpl field5; + + protected void setUp() throws Exception { + super.setUp(); + this.field1 = new FieldImpl(null); + this.field2 = new FieldImpl(null); + this.field3 = new FieldImpl("A"); + this.field4 = new FieldImpl("A"); + this.field5 = new FieldImpl("B"); + + } + + protected void tearDown() throws Exception { + super.tearDown(); + Assert.assertEquals( field1, field1 ); + Assert.assertEquals( field1, field2 ); + Assert.assertEquals( field3, field3 ); + Assert.assertEquals( field3, field4 ); + Assert.assertFalse( field1.equals( field3 ) ); + Assert.assertFalse( field3.equals( field1 ) ); + Assert.assertFalse( field3.equals( field5 ) ); + } + + /* + * Test method for 'org.drools.base.FieldImpl.hashCode()' + */ + public void testHashCode() { + Assert.assertEquals( field1.hashCode(), field1.hashCode() ); + Assert.assertEquals( field1.hashCode(), field2.hashCode() ); + Assert.assertEquals( field3.hashCode(), field3.hashCode() ); + Assert.assertEquals( field3.hashCode(), field4.hashCode() ); + Assert.assertFalse( field1.hashCode() == field3.hashCode() ); + Assert.assertFalse( field3.hashCode() == field1.hashCode() ); + Assert.assertFalse( field3.hashCode() == field5.hashCode() ); + } + + /* + * Test method for 'org.drools.base.FieldImpl.equals(Object)' + */ + public void testEqualsObject() { + + } + +} |
From: <jbo...@li...> - 2006-04-14 21:10:27
|
Author: adamw Date: 2006-04-14 17:10:20 -0400 (Fri, 14 Apr 2006) New Revision: 3719 Removed: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java Log: http://jira.jboss.com/jira/browse/JBSHOTOKU-82 Deleted: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml 2006-04-14 20:59:19 UTC (rev 3718) +++ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml 2006-04-14 21:10:20 UTC (rev 3719) @@ -1,16 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<!DOCTYPE faces-config PUBLIC - "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" - "http://java.sun.com/dtd/web-facesconfig_1_0.dtd"> - -<faces-config> - <lifecycle> - <phase-listener>org.jboss.shotoku.web.ajaxtree.AjaxPhaseListener</phase-listener> - </lifecycle> - - <component> - <component-type>org.jboss.shotoku.web.ajaxtree.AjaxTree</component-type> - <component-class>org.jboss.shotoku.web.ajaxtree.AjaxTree</component-class> - </component> -</faces-config> - \ No newline at end of file Deleted: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld 2006-04-14 20:59:19 UTC (rev 3718) +++ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld 2006-04-14 21:10:20 UTC (rev 3719) @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" - "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> - -<taglib> - <tlib-version>0.01</tlib-version> - <jsp-version>1.2</jsp-version> - <short-name>shotoku</short-name> - <uri>http://labs.jboss.org/projects/shotoku</uri> - - <tag> - <name>ajaxTree</name> - <tag-class>org.jboss.shotoku.web.ajaxtree.AjaxTreeTag</tag-class> - <body-content>empty</body-content> - - <attribute> - <name>id</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - </description> - </attribute> - <attribute> - <name>immediate</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - </description> - </attribute> - <attribute> - <name>rendered</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. - </description> - </attribute> - <attribute> - <name>value</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - The current value of this component. - </description> - </attribute> - <attribute> - <name>style</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - CSS style(s) to be applied when this component is rendered. - </description> - </attribute> - <attribute> - <name>styleClass</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - </description> - </attribute> - <attribute> - <name>binding</name> - <required>false</required> - <rtexprvalue>false</rtexprvalue> - <description> - The value binding expression linking this component to a property in a backing bean - </description> - </attribute> - </tag> -</taglib> Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java 2006-04-14 20:59:19 UTC (rev 3718) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java 2006-04-14 21:10:20 UTC (rev 3719) @@ -76,11 +76,11 @@ setTimerInterval(SvnTools.DEFAULT_TIMER_INTERVAL); // Enabling administration for this service. - Tools.getService().addAdministratedService(new AdministratedServiceGetter() { + /* TODO Tools.getService().addAdministratedService(new AdministratedServiceGetter() { public AdministratedService get() { return SvnTools.getService(); } - }); + });*/ log.info("Svn service Created."); } |
From: <jbo...@li...> - 2006-04-14 20:59:26
|
Author: adamw Date: 2006-04-14 16:59:19 -0400 (Fri, 14 Apr 2006) New Revision: 3718 Modified: labs/shotoku/trunk/shotoku-base/project.xml labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceTimer.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/test/DummyService.java Log: http://jira.jboss.com/jira/browse/JBSHOTOKU-82 Modified: labs/shotoku/trunk/shotoku-base/project.xml =================================================================== --- labs/shotoku/trunk/shotoku-base/project.xml 2006-04-14 20:44:05 UTC (rev 3717) +++ labs/shotoku/trunk/shotoku-base/project.xml 2006-04-14 20:59:19 UTC (rev 3718) @@ -5,6 +5,22 @@ <id>shotoku-base</id> <name>Shotoku base</name> +<dependencies> + <dependency> + <groupId>jboss</groupId> + <artifactId>javax.servlet</artifactId> + <version>1.0</version> + <jar>javax.servlet.jar</jar> + </dependency> + + <dependency> + <groupId>aslibs</groupId> + <artifactId>javax.servlet.jsp</artifactId> + <version>1.0</version> + <jar>javax.servlet.jsp.jar</jar> + </dependency> +</dependencies> + <build> <sourceDirectory>src/java</sourceDirectory> <resources> Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceTimer.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceTimer.java 2006-04-14 20:44:05 UTC (rev 3717) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceTimer.java 2006-04-14 20:59:19 UTC (rev 3718) @@ -32,6 +32,7 @@ import org.jboss.mx.util.MBeanProxyExt; import org.jboss.mx.util.MBeanServerLocator; import org.jboss.shotoku.tools.Constants; +import org.jboss.shotoku.svn.SvnService; /** * @author Adam Warski (ad...@as...) @@ -41,28 +42,28 @@ @Stateless @Local(SvnServiceTimerLocal.class) public class SvnServiceTimer { - //private static final Logger log = Logger.getLogger(SvnServiceTimer.class); - private @Resource SessionContext ctx; - private SvnServiceLocal ssi; - - public void scheduleTimer(long interval) { - //ctx.getTimerService().createTimer(new Date(new Date().getTime() + interval), null); - ctx.getTimerService().createTimer(interval, interval, null); - } - - @Timeout - public void timeoutHandler(Timer timer) { - if (ssi == null) { - try { - ssi = ((SvnServiceLocal) MBeanProxyExt.create( - SvnServiceLocal.class, - Constants.SVN_SERVICE_NAME, - MBeanServerLocator.locate())); - } catch (MalformedObjectNameException e) { - e.printStackTrace(); - } - } - - ssi.update(); - } + //private static final Logger log = Logger.getLogger(SvnServiceTimer.class); + private @Resource SessionContext ctx; + private SvnService ssi; + + public void scheduleTimer(long interval) { + //ctx.getTimerService().createTimer(new Date(new Date().getTime() + interval), null); + ctx.getTimerService().createTimer(interval, interval, null); + } + + @Timeout + public void timeoutHandler(Timer timer) { + if (ssi == null) { + try { + ssi = ((SvnService) MBeanProxyExt.create( + SvnService.class, + Constants.SVN_SERVICE_NAME, + MBeanServerLocator.locate())); + } catch (MalformedObjectNameException e) { + e.printStackTrace(); + } + } + + ssi.update(); + } } Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/test/DummyService.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/test/DummyService.java 2006-04-14 20:44:05 UTC (rev 3717) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/test/DummyService.java 2006-04-14 20:59:19 UTC (rev 3718) @@ -90,6 +90,31 @@ return modifiedD.contains(fullPath); } + public long getLastUpdate() { + return 0; + } + + public void setLastUpdate(long lastUpdate) { + } + + public boolean getServiceRunnable() { + return false; + } + + public void setServiceRunnable(boolean runnable) { + } + + public String getServiceName() { + return null; + } + + public String getServiceDescription() { + return null; + } + + public void update() { + } + public void create() throws Exception { } |
Author: adamw Date: 2006-04-14 16:44:05 -0400 (Fri, 14 Apr 2006) New Revision: 3717 Added: labs/shotoku/trunk/shotoku-admin/ labs/shotoku/trunk/shotoku-admin/maven.xml labs/shotoku/trunk/shotoku-admin/project.properties labs/shotoku/trunk/shotoku-admin/project.xml labs/shotoku/trunk/shotoku-admin/shotoku-admin.iml labs/shotoku/trunk/shotoku-admin/src/ labs/shotoku/trunk/shotoku-admin/src/java/ labs/shotoku/trunk/shotoku-admin/src/java/org/ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java labs/shotoku/trunk/shotoku-admin/src/web/ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/web/ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/web/FilesFromRepoFilter.java labs/shotoku/trunk/shotoku-web/src/java/org/jboss/shotoku/web/admin/ Modified: labs/shotoku/trunk/project.properties labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuService.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceLocal.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Tools.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnService.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceLocal.java labs/shotoku/trunk/shotoku-web/shotoku-web.iml labs/shotoku/trunk/shotoku-web/src/web/WEB-INF/web.xml Log: http://jira.jboss.com/jira/browse/JBSHOTOKU-82 Modified: labs/shotoku/trunk/project.properties =================================================================== --- labs/shotoku/trunk/project.properties 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/project.properties 2006-04-14 20:44:05 UTC (rev 3717) @@ -5,7 +5,7 @@ shotoku.sar.dir=shotoku.sar shotoku.subprojects.cms=base,files,jcr,svn -shotoku.subprojects=${shotoku.subprojects.cms},aop,test,web,portal +shotoku.subprojects=${shotoku.subprojects.cms},aop,test,web,portal,admin maven.final.name=${pom.artifactId} Property changes on: labs/shotoku/trunk/shotoku-admin ___________________________________________________________________ Name: svn:ignore + target Added: labs/shotoku/trunk/shotoku-admin/maven.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/maven.xml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/maven.xml 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,22 @@ +<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:u="jelly:util"> + <goal name="build"> + <attainGoal name="war" /> + </goal> + + <goal name="deploy"> + <ant:copy + file="target/shotoku-admin.war" + todir="${local.deploy.dir}" /> + </goal> + + <goal name="clean"> + <attainGoal name="prj-clean" /> + </goal> + + <!-- TODO remove --> + <goal name="all"> + <attainGoal name="clean" /> + <attainGoal name="build" /> + <attainGoal name="deploy" /> + </goal> +</project> Added: labs/shotoku/trunk/shotoku-admin/project.properties =================================================================== --- labs/shotoku/trunk/shotoku-admin/project.properties 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/project.properties 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,4 @@ +maven.repo.remote=http://repository.atlassian.com,http://www.ibiblio.org/maven,http://dist.codehaus.org/ + +maven.final.name=${pom.artifactId} + Added: labs/shotoku/trunk/shotoku-admin/project.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/project.xml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/project.xml 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,48 @@ +<?xml version='1.0' encoding='ISO-8859-1'?> +<project> + <pomVersion>3</pomVersion> + <extend>../project.xml</extend> + <id>shotoku-admin</id> + <name>Shotoku admin</name> + + <dependencies> + <dependency> + <groupId>shotoku</groupId> + <artifactId>shotoku-base</artifactId> + <jar>shotoku-base.jar</jar> + </dependency> + + <dependency> + <groupId>jboss</groupId> + <artifactId>javax.servlet</artifactId> + <version>1.0</version> + <jar>javax.servlet.jar</jar> + </dependency> + + <dependency> + <groupId>aslibs</groupId> + <artifactId>javax.servlet.jsp</artifactId> + <version>1.0</version> + <jar>javax.servlet.jsp.jar</jar> + </dependency> + + <dependency> + <groupId>myfaces</groupId> + <artifactId>myfaces-all</artifactId> + <version>1.1.1</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + </dependencies> + + <build> + <sourceDirectory>src/java</sourceDirectory> + <resources> + <resource> + <directory>src/etc</directory> + <include>**/*</include> + </resource> + </resources> + </build> +</project> Added: labs/shotoku/trunk/shotoku-admin/shotoku-admin.iml =================================================================== --- labs/shotoku/trunk/shotoku-admin/shotoku-admin.iml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/shotoku-admin.iml 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module version="4" relativePaths="true" type="JAVA_MODULE"> + <component name="ModuleRootManager" /> + <component name="NewModuleRootManager"> + <output url="file://$MODULE_DIR$/target" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="shotoku-base" /> + <orderEntry type="library" name="jsf" level="application" /> + <orderEntry type="library" name="jboss" level="application" /> + <orderEntryProperties /> + </component> +</module> + Added: labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/src/java/org/jboss/shotoku/web/admin/AdminServlet.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,29 @@ +package org.jboss.shotoku.web.admin; + +import org.jboss.shotoku.service.AdministratedServiceGetter; +import org.jboss.shotoku.tools.Tools; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletException; +import javax.servlet.ServletResponse; +import java.io.IOException; +import java.util.Calendar; + +/** + * @author Adam Warski (ad...@as...) + */ +public class AdminServlet extends HttpServlet { + protected void service(HttpServletRequest httpServletRequest, + HttpServletResponse httpServletResponse) + throws ServletException, IOException { + httpServletRequest.setAttribute("now", Calendar.getInstance().getTimeInMillis()); + + for (AdministratedServiceGetter asg : Tools.getService().getAdministratedServices()) { + httpServletRequest.setAttribute("service", asg.get()); + httpServletRequest.getRequestDispatcher("repo-access/services.jsp").include( + httpServletRequest, httpServletResponse); + } + } +} Added: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/faces-config.xml 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE faces-config PUBLIC + "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" + "http://java.sun.com/dtd/web-facesconfig_1_0.dtd"> + +<faces-config> + <lifecycle> + <phase-listener>org.jboss.shotoku.web.ajaxtree.AjaxPhaseListener</phase-listener> + </lifecycle> + + <component> + <component-type>org.jboss.shotoku.web.ajaxtree.AjaxTree</component-type> + <component-class>org.jboss.shotoku.web.ajaxtree.AjaxTree</component-class> + </component> +</faces-config> + \ No newline at end of file Added: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/tree-tag.tld 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + <tlib-version>0.01</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>shotoku</short-name> + <uri>http://labs.jboss.org/projects/shotoku</uri> + + <tag> + <name>ajaxTree</name> + <tag-class>org.jboss.shotoku.web.ajaxtree.AjaxTreeTag</tag-class> + <body-content>empty</body-content> + + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + The component identifier for this component. This value must be + unique within the closest parent component that is a naming + container. + </description> + </attribute> + <attribute> + <name>immediate</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + Flag indicating that this component's value must be + converted and validated immediately (that is, during + Apply Request Values phase), rather than waiting + until Process Validations phase. + </description> + </attribute> + <attribute> + <name>rendered</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + Flag indicating whether or not this component should be rendered + (during Render Response Phase), or processed on any subsequent + form submit. + </description> + </attribute> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + The current value of this component. + </description> + </attribute> + <attribute> + <name>style</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + CSS style(s) to be applied when this component is rendered. + </description> + </attribute> + <attribute> + <name>styleClass</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + Space-separated list of CSS style class(es) to be applied when + this element is rendered. This value must be passed through + as the "class" attribute on generated markup. + </description> + </attribute> + <attribute> + <name>binding</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description> + The value binding expression linking this component to a property in a backing bean + </description> + </attribute> + </tag> +</taglib> Added: labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml =================================================================== --- labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-admin/src/web/WEB-INF/web.xml 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!DOCTYPE web-app PUBLIC + "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <servlet> + <servlet-name>Admin Servlet</servlet-name> + <servlet-class>org.jboss.shotoku.web.admin</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>Admin Servlet</servlet-name> + <url-pattern>/*</url-pattern> + </servlet-mapping> + + <filter> + <filter-name>filesFromRepoFilter</filter-name> + <filter-class>org.jboss.shotoku.web.FilesFromRepoFilter</filter-class> + <init-param> + <param-name>repoAccessDir</param-name> + <param-value>repo-access</param-value> + </init-param> + <init-param> + <param-name>contentManagerPrefix</param-name> + <param-value>shotoku-admin</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>filesFromRepoFilter</filter-name> + <url-pattern>/repo-access/*</url-pattern> + <dispatcher>INCLUDE</dispatcher> + </filter-mapping> +</web-app> Added: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedService.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,26 @@ +package org.jboss.shotoku.service; + +/** + * @author Adam Warski (ad...@as...) + */ +public interface AdministratedService { + public long getLastUpdate(); + public void setLastUpdate(long lastUpdate); + + public boolean getServiceRunnable(); + public void setServiceRunnable(boolean runnable); + + public String getServiceName(); + public String getServiceDescription(); + + public void update(); + + /* + * SERVICE MANAGEMENT METHODS + */ + + public void create() throws Exception; + public void start() throws Exception; + public void stop(); + public void destroy(); +} Added: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceGetter.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,8 @@ +package org.jboss.shotoku.service; + +/** + * @author Adam Warski (ad...@as...) + */ +public interface AdministratedServiceGetter { + public AdministratedService get(); +} Added: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,56 @@ +package org.jboss.shotoku.service; + +import org.apache.log4j.Logger; + +/** + * @author Adam Warski (ad...@as...) + */ +public abstract class AdministratedServiceImpl implements AdministratedService { + private static final Logger log = Logger.getLogger(AdministratedServiceImpl.class); + + private long lastUpdate; + private long timerInterval; + private boolean serviceRunnable; + + public long getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(long lastUpdate) { + this.lastUpdate = lastUpdate; + } + + public boolean getServiceRunnable() { + return serviceRunnable; + } + + public void setServiceRunnable(boolean runnable) { + serviceRunnable = runnable; + } + + public void setTimerInterval(long timerInterval) { + this.timerInterval = timerInterval; + } + + public long getTimerInterval() { + return timerInterval; + } + + public void create() throws Exception { + log.info("Creating " + getServiceName() + "..."); + } + + public void start() throws Exception { + log.info("Starting " + getServiceName() + "..."); + setServiceRunnable(true); + } + + public void stop() { + log.info("Stopping " + getServiceName() + "..."); + setServiceRunnable(false); + } + + public void destroy() { + log.info("Destroying " + getServiceName() + "..."); + } +} Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuService.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuService.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuService.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -23,21 +23,14 @@ import org.jboss.shotoku.cache.ShotokuCacheItem; +import java.util.Set; + /** * * @author Adam Warski (ad...@as...) */ -public interface ShotokuService { +public interface ShotokuService extends AdministratedService { /* - * SERVICE MANAGEMENT METHODS - */ - - public void create() throws Exception; - public void start() throws Exception; - public void stop(); - public void destroy(); - - /* * CACHE */ @@ -50,4 +43,7 @@ * Gets a next unique key base for a shotoku cache item. */ public String getNextKeyBase(); + + public void addAdministratedService(AdministratedServiceGetter asg); + public Set<AdministratedServiceGetter> getAdministratedServices(); } Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -31,10 +31,13 @@ import org.jboss.shotoku.tools.Constants; import org.jboss.shotoku.tools.ConcurrentSet; import org.jboss.shotoku.tools.ConcurrentHashSet; +import org.jboss.shotoku.tools.Tools; import org.apache.log4j.Logger; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentHashMap; +import java.util.Calendar; +import java.util.Set; /** * @@ -44,7 +47,7 @@ @Local(ShotokuServiceLocal.class) @Management(ShotokuService.class) @Depends(Constants.SVN_SERVICE_NAME) -public class ShotokuServiceImpl implements ShotokuService, ShotokuServiceLocal { +public class ShotokuServiceImpl extends AdministratedServiceImpl implements ShotokuService, ShotokuServiceLocal { Logger log = Logger.getLogger(ShotokuServiceImpl.class); /* @@ -52,11 +55,21 @@ */ public void create() throws Exception { + super.create(); + // Enabling administration for this service. + Tools.getService().addAdministratedService(new AdministratedServiceGetter() { + public AdministratedService get() { + return Tools.getService(); + } + }); + + log.info("Shotoku service created."); } public void start() throws Exception { - log.info("ShotokuService starting. Setting up content manager..."); + super.start(); + /* * Setting up content managers. */ @@ -64,10 +77,10 @@ log.info("ContentManager setup completed. Getting the default service timer interval..."); // Setting the default timer interval. - timerInterval = ContentManager.getDefaultServiceInterval(); - log.info("Timer interval is: "+timerInterval+". Starting update thread..."); - + setTimerInterval(ContentManager.getDefaultServiceInterval()); + log.info("Timer interval is: "+ getTimerInterval() +". Starting update thread..."); + new Thread() { { setDaemon(true); @@ -75,7 +88,7 @@ public void run() { //noinspection InfiniteLoopStatement - while (true) { + while (getServiceRunnable()) { try { sleep(getTimerInterval()); } catch (InterruptedException e) { @@ -87,14 +100,20 @@ } catch (Throwable t) { // Making sure that an exception won't stop the thread. } + + setLastUpdate(Calendar.getInstance().getTimeInMillis()); } + + log.info("Shotoku service deaemon thread terminated."); } }.start(); - log.info("Shotoku Service started."); + + log.info("Shotoku service started."); } public void stop() { - + super.stop(); + log.info("Shotoku service stopped."); } public void destroy() { @@ -102,20 +121,6 @@ } /* - * Timer interval management functions. - */ - - private volatile long timerInterval; - - public void setTimerInterval(long timerInterval) { - this.timerInterval = timerInterval; - } - - public long getTimerInterval() { - return timerInterval; - } - - /* * Cache handling */ @@ -163,4 +168,31 @@ } } } + + /* + * Description functions. + */ + + public String getServiceName() { + return "Shotoku service"; + } + + public String getServiceDescription() { + return "Cache service."; + } + + /* + * Service administration. + */ + + private ConcurrentSet<AdministratedServiceGetter> services = + new ConcurrentHashSet<AdministratedServiceGetter>(); + + public void addAdministratedService(AdministratedServiceGetter asg) { + services.add(asg); + } + + public Set<AdministratedServiceGetter> getAdministratedServices() { + return services; + } } Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceLocal.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceLocal.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceLocal.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -26,5 +26,4 @@ * @author Adam Warski (ad...@as...) */ public interface ShotokuServiceLocal { - public void update(); } Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Tools.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Tools.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/tools/Tools.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -30,6 +30,7 @@ import org.jboss.shotoku.ContentManager; import org.jboss.shotoku.service.ShotokuService; import org.jboss.shotoku.service.ShotokuServiceImpl; +import org.jboss.shotoku.service.AdministratedService; import org.jboss.shotoku.exceptions.RepositoryException; import org.jboss.shotoku.exceptions.NameFormatException; import org.jboss.mx.util.MBeanProxyExt; Added: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/web/FilesFromRepoFilter.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/web/FilesFromRepoFilter.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/web/FilesFromRepoFilter.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -0,0 +1,128 @@ +package org.jboss.shotoku.web; + +import org.jboss.shotoku.ContentManager; +import org.jboss.shotoku.Node; +import org.jboss.shotoku.tools.Tools; +import org.jboss.shotoku.exceptions.ResourceDoesNotExist; + +import javax.servlet.*; +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.io.File; +import java.io.InputStream; +import java.io.OutputStream; + +/** + * A filter for reading JSP (and html, text etc) files from a file repository + * and including them in the response. + * + * @author adamw + * @author Tomasz Szymanski + */ +public class FilesFromRepoFilter implements Filter { + private final static String WRONG_REQ_RESP = "Error accessing the " + + "requested resource."; + + /** + * Name of a directory to which files + * will be copied; this will be a subdirectory of the deployment directory + * of a web application using this filter. + */ + private final static String COPIED_TO_REPO_DIR = "copied-to-repo"; + + /** + * Base path to a directory where jsp pages will + * be copied; it's a subdirectory of a deployment directory created by the + * app server. + */ + private String basePath; + + /** + * Directory, through which the filter is invoked (when JSPs are included). + */ + private String repoAccessDir; + + /** + * Length of repoAccessDir + */ + private int repoAccessDirLength; + + private ContentManager contentManager; + + public void init(FilterConfig conf) { + repoAccessDir = conf.getInitParameter("repoAccessDir"); + repoAccessDirLength = repoAccessDir.length(); + + contentManager = ContentManager.getContentManager( + conf.getInitParameter("contentManagerId"), + conf.getInitParameter("contentManagerPrefix")); + + // Constructing the base path. + basePath = conf.getServletContext().getRealPath("") + File.separator + + FilesFromRepoFilter.COPIED_TO_REPO_DIR; + } + + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + if (request instanceof HttpServletRequest) { + HttpServletRequest httpRequest = (HttpServletRequest) request; + + // Constructing the path of the requested path as relative to the + // content's repository root. + String requestURI = httpRequest.getRequestURI(); + String requestedFile = requestURI.substring(requestURI + .indexOf(repoAccessDir) + repoAccessDirLength + 1); + + Node requestedNode; + try { + requestedNode = contentManager.getNode(requestedFile); + } catch (ResourceDoesNotExist e) { + throw new ServletException(e); + } + + if (requestedFile.toLowerCase().endsWith("jsp")) { + // If the requested page is a jsp, then we copy it (if a newer + // version is available) and dispatch a request for it. + String filePath = basePath + File.separator + requestedFile; + long lastModified = new File(filePath).lastModified(); + if ((lastModified == 0) || + (lastModified < requestedNode.getLastModification())) { + new File(filePath.substring(0, + filePath.lastIndexOf(File.separator))).mkdirs(); + requestedNode.copyToFile(filePath); + } + + request.getRequestDispatcher( + File.separator + FilesFromRepoFilter.COPIED_TO_REPO_DIR + File.separator + + requestedFile).include(request, response); + } else { + // If it is not a jsp, then we just print its contents. + //response.getWriter().write(requestedNode.getContent()); + InputStream is = requestedNode.getContentInputStream(); + OutputStream os = response.getOutputStream(); + + // set content data + response.setContentType(requestedNode.getMimeType()); + response.setContentLength((int)requestedNode.getLength()); + + // Transferring the bytes + try { + Tools.transfer(is, os); + } catch (Exception e2) { + // Nothing that we can really do. Just send an incomplete + // file. + } finally { + os.close(); + is.close(); + } + } + } else { + response.setContentType("text/html"); + response.getWriter().write(FilesFromRepoFilter.WRONG_REQ_RESP); + } + } + + public void destroy() { + + } +} Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnService.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnService.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/SvnService.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -23,12 +23,13 @@ import org.apache.commons.configuration.Configuration; import org.jboss.shotoku.svn.service.delayed.DelayedOperation; +import org.jboss.shotoku.service.AdministratedService; /** * @author Adam Warski (ad...@as...) * @author Damon Sicore (da...@si...) */ -public interface SvnService { +public interface SvnService extends AdministratedService { /** * Registers a repository in the service. Has an effect only if the * repository wasn't earlier registered. @@ -173,13 +174,4 @@ * @param op Operation to perform. */ public void addDelayedOperation(String id, DelayedOperation op); - - /* - * SERVICE MANAGEMENT METHODS - */ - - public void create() throws Exception; - public void start() throws Exception; - public void stop(); - public void destroy(); } Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -21,12 +21,9 @@ */ package org.jboss.shotoku.svn.service; -import java.util.Collections; -import java.util.HashMap; - -import java.util.Map; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentHashMap; +import java.util.Calendar; import javax.ejb.Local; @@ -38,6 +35,10 @@ import org.jboss.shotoku.svn.SvnTools; import org.jboss.shotoku.svn.service.delayed.DelayedOperation; import org.jboss.shotoku.tools.Constants; +import org.jboss.shotoku.tools.Tools; +import org.jboss.shotoku.service.AdministratedServiceImpl; +import org.jboss.shotoku.service.AdministratedServiceGetter; +import org.jboss.shotoku.service.AdministratedService; import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl; @@ -48,166 +49,167 @@ @Service(objectName=Constants.SVN_SERVICE_NAME) @Local(SvnServiceLocal.class) @Management(SvnService.class) -public class SvnServiceImpl implements SvnService { - private static final Logger log = Logger.getLogger(SvnServiceImpl.class); - - private volatile long timerInterval; - - private ConcurrentMap<String, SvnRepository> repositories; +public class SvnServiceImpl extends AdministratedServiceImpl implements SvnService, SvnServiceLocal { + private static final Logger log = Logger.getLogger(SvnServiceImpl.class); - private boolean svnServiceRunnable = true; - - /* - * Service lifecycle management. - */ - - public void create() throws Exception { - log.info("Creating Subversion Service. Setting up DAVRepositoryFactory..."); + private ConcurrentMap<String, SvnRepository> repositories; - // Set up connection protocols support: + /* + * Service lifecycle management. + */ + + public void create() throws Exception { + super.create(); + + // Set up connection protocols support: // for DAV (over http and https) DAVRepositoryFactory.setup(); - log.info("DAVRepositoryFactory setup. Setting up SVNRepositoryFactory..."); + log.info("DAVRepositoryFactory setup. Setting up SVNRepositoryFactory..."); // for SVN (over svn and svn+ssh) SVNRepositoryFactoryImpl.setup(); - log.info("SVNRepositoryFactory setup complete."); - - repositories = new ConcurrentHashMap<String, SvnRepository>(); - log.info("Created."); - } - - public void start() throws Exception { - log.info("Starting Subversion Service..."); - setSvnServiceRunnable(true); - // Setting the default timer interval. - timerInterval = SvnTools.DEFAULT_TIMER_INTERVAL; + log.info("SVNRepositoryFactory setup complete."); + repositories = new ConcurrentHashMap<String, SvnRepository>(); + + // Setting the default timer interval. + setTimerInterval(SvnTools.DEFAULT_TIMER_INTERVAL); + + // Enabling administration for this service. + Tools.getService().addAdministratedService(new AdministratedServiceGetter() { + public AdministratedService get() { + return SvnTools.getService(); + } + }); + + log.info("Svn service Created."); + } + + public void start() throws Exception { + super.start(); + // Starting the updater thread. new Thread() { - { - setDaemon(true); - } - - public void run() { - while (getSvnServiceRunnable()) { - try { - sleep(getTimerInterval()); - } catch (InterruptedException e) { - e.printStackTrace(); - } + { + setDaemon(true); + } + public void run() { + while (getServiceRunnable()) { try { + sleep(getTimerInterval()); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + try { update(); } catch (Throwable t) { // Making sure that an exception won't stop the thread. } + + setLastUpdate(Calendar.getInstance().getTimeInMillis()); } - log.info("Subversion Service Deaemon Thread terminated."); - } - }.start(); - log.info("Subversion Service started with update interval: "+timerInterval); + + log.info("Subversion Service Deaemon Thread terminated."); + } + }.start(); + + log.info("Subversion Service started with update interval: "+ getTimerInterval()); } - public void stop() { - log.info("Stopping Subversion Service..."); - setSvnServiceRunnable(false); - log.info("Subversion Service signaled to stop."); - } + public void stop() { + super.stop(); + log.info("Subversion Service signaled to stop."); + } - public void destroy() { - } + public void destroy() { + } - /* - * Service start and stop flags. - */ - public void setSvnServiceRunnable(boolean b) { - svnServiceRunnable = b; - } + /* + * Timer-handling functions. + */ - public boolean getSvnServiceRunnable() { - return svnServiceRunnable; - } - - /* - * Timer-handling functions. - */ - - public void setTimerInterval(long timerInterval) { - this.timerInterval = timerInterval; - } - - public long getTimerInterval() { - return timerInterval; - } - - public void update() { - for (SvnRepository repo : repositories.values()) { - try { + public void update() { + for (SvnRepository repo : repositories.values()) { + try { repo.update(); } catch (Exception e) { log.error("Exception while updating a repository.", e); } - } - } - - /* - * SvnService implementation. - */ - - public void registerRepository(String id, Configuration conf) { - if (repositories.get(id) == null) { - SvnRepository repo = new SvnRepository(id, - conf.getString(SvnTools.PROPERTY_USERNAME), - conf.getString(SvnTools.PROPERTY_PASSWORD), - conf.getString(SvnTools.PROPERTY_URL), - conf.getString(SvnTools.PROPERTY_LOCALPATH)); - - repositories.put(id, repo); - - // First update/ checkout. - repo.firstUpdate(); - - log.info("Added svn repository: " + id); - } - } + } + } - public boolean isModified(String id, String fullPath) { - return repositories.get(id).isModified(fullPath); - } + public String getServiceName() { + return "SVN service"; + } - public void addToDeleted(String id, String fullPath) { - repositories.get(id).addToDeleted(fullPath); - } + public String getServiceDescription() { + StringBuffer sb = new StringBuffer("These repositories are currently serviced: "); + for (String id : repositories.keySet()) { + sb.append(id).append(" "); + } - public boolean isDeleted(String id, String fullPath) { - return repositories.get(id).isDeleted(fullPath); - } + return sb.append(".").toString(); + } - public void addNodeToModfied(String id, String fullPath) { - repositories.get(id).addNodeToModfied(fullPath); - } + /* + * SvnService implementation. + */ - public boolean isNodeModified(String id, String fullPath) { - return repositories.get(id).isNodeModified(fullPath); - } - - public void addTreeToModfied(String id, String fullPath) { - repositories.get(id).addTreeToModfied(fullPath); - } + public void registerRepository(String id, Configuration conf) { + if (repositories.get(id) == null) { + SvnRepository repo = new SvnRepository(id, + conf.getString(SvnTools.PROPERTY_USERNAME), + conf.getString(SvnTools.PROPERTY_PASSWORD), + conf.getString(SvnTools.PROPERTY_URL), + conf.getString(SvnTools.PROPERTY_LOCALPATH)); - public boolean isTreeModified(String id, String fullPath) { - return repositories.get(id).isTreeModified(fullPath); - } + repositories.put(id, repo); - public void addDirectoryToModfied(String id, String fullPath) { - repositories.get(id).addDirectoryToModfied(fullPath); - } + // First update/ checkout. + repo.firstUpdate(); - public boolean isDirectoryModified(String id, String fullPath) { - return repositories.get(id).isDirectoryModified(fullPath); - } + log.info("Added svn repository: " + id); + } + } + public boolean isModified(String id, String fullPath) { + return repositories.get(id).isModified(fullPath); + } + + public void addToDeleted(String id, String fullPath) { + repositories.get(id).addToDeleted(fullPath); + } + + public boolean isDeleted(String id, String fullPath) { + return repositories.get(id).isDeleted(fullPath); + } + + public void addNodeToModfied(String id, String fullPath) { + repositories.get(id).addNodeToModfied(fullPath); + } + + public boolean isNodeModified(String id, String fullPath) { + return repositories.get(id).isNodeModified(fullPath); + } + + public void addTreeToModfied(String id, String fullPath) { + repositories.get(id).addTreeToModfied(fullPath); + } + + public boolean isTreeModified(String id, String fullPath) { + return repositories.get(id).isTreeModified(fullPath); + } + + public void addDirectoryToModfied(String id, String fullPath) { + repositories.get(id).addDirectoryToModfied(fullPath); + } + + public boolean isDirectoryModified(String id, String fullPath) { + return repositories.get(id).isDirectoryModified(fullPath); + } + public void addDelayedOperation(String id, DelayedOperation op) { repositories.get(id).addDelayedOperation(op); } Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceLocal.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceLocal.java 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceLocal.java 2006-04-14 20:44:05 UTC (rev 3717) @@ -26,7 +26,5 @@ * @author Damon Sicore (da...@si...) */ public interface SvnServiceLocal { - public void setTimerInterval(long timerInterval); - public long getTimerInterval(); - public void update(); + } Modified: labs/shotoku/trunk/shotoku-web/shotoku-web.iml =================================================================== --- labs/shotoku/trunk/shotoku-web/shotoku-web.iml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-web/shotoku-web.iml 2006-04-14 20:44:05 UTC (rev 3717) @@ -11,6 +11,7 @@ <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="jsf" level="application" /> <orderEntry type="library" name="jboss" level="application" /> + <orderEntry type="module" module-name="shotoku-base" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-web/src/web/WEB-INF/web.xml =================================================================== --- labs/shotoku/trunk/shotoku-web/src/web/WEB-INF/web.xml 2006-04-14 16:43:36 UTC (rev 3716) +++ labs/shotoku/trunk/shotoku-web/src/web/WEB-INF/web.xml 2006-04-14 20:44:05 UTC (rev 3717) @@ -3,7 +3,6 @@ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> - <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> |