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-05-10 12:40:19
|
Author: mla...@jb... Date: 2006-05-10 08:40:09 -0400 (Wed, 10 May 2006) New Revision: 4179 Added: labs/jbossweb/trunk/src/share/native/build/buildsvc.bat Modified: labs/jbossweb/trunk/src/windows/native/service/jbosssvc/NMAKEmakefile Log: Added build svc target Added: labs/jbossweb/trunk/src/share/native/build/buildsvc.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildsvc.bat 2006-05-10 12:17:17 UTC (rev 4178) +++ labs/jbossweb/trunk/src/share/native/build/buildsvc.bat 2006-05-10 12:40:09 UTC (rev 4179) @@ -0,0 +1,45 @@ +@echo off +REM +REM JBoss, the OpenSource J2EE webOS +REM +REM Distributable under LGPL license. +REM See terms of license at gnu.org. +REM +REM +REM @author Mladen Turk +REM +REM +REM +@if "%OS%" == "Windows_NT" setlocal +REM set MSVS8VC=C:\opt\MSVS8\VC\bin +set MSVS8VC=C:\D\Microsoft\MSVS8\VC\bin + +@rmdir /S /Q jbosssvc 2>NUL + +svn export http://anonsvn.labs.jboss.com/labs/jbossweb/trunk/src/windows/native/service/jbosssvc +svn export http://anonsvn.labs.jboss.com/labs/jbossweb/trunk/src/share/native/build jbosssvc/build + +@if "%1" == "dll" set FORDLL=1 + +@if "%2" == "x86" goto cpuX86 +@if "%2" == "amd64" goto cpuAMD64 +@if "%2" == "ia64" goto cpuIA64 +echo Usage: buildsvc <CPU> +goto cmdEnd + +:cpuX86 +set CPU=I386 +call %MSVS8VC%\vcvars32 +goto cmdBuild + +:cpuAMD64 +set CPU=AMD64 +call %MSVS8VC%\amd64\vcvarsamd64 +goto cmdBuild + +:cmdBuild +cd jbosssvc +nmake -f NMAKEMakefile +nmake -f NMAKEMakefile install + +:cmdEnd Modified: labs/jbossweb/trunk/src/windows/native/service/jbosssvc/NMAKEmakefile =================================================================== --- labs/jbossweb/trunk/src/windows/native/service/jbosssvc/NMAKEmakefile 2006-05-10 12:17:17 UTC (rev 4178) +++ labs/jbossweb/trunk/src/windows/native/service/jbosssvc/NMAKEmakefile 2006-05-10 12:40:09 UTC (rev 4179) @@ -26,7 +26,7 @@ TARGET = EXE PROJECT = jbosssvc -!include <../../../../share/native/build/NMAKEcommon.inc> +!include <build/NMAKEcommon.inc> !IF !DEFINED(SRCDIR) || "$(SRCDIR)" == "" SRCDIR = . @@ -61,3 +61,15 @@ clean: @$(CLEANTARGET) + +!IFNDEF INSTALLDIR +!IFDEF FORDLL +INSTALLDIR = ../../native-builds/WINNT_$(CPU)_DLL_RELEASE +!ELSE +INSTALLDIR = ../../native-builds/WINNT_$(CPU)_LIB_RELEASE +!ENDIF +!ENDIF + +install: all + @gmkdir -p $(INSTALLDIR) + @cp -f -t $(INSTALLDIR) $(BUILDEXE) |
From: <jbo...@li...> - 2006-05-10 12:17:23
|
Author: mla...@jb... Date: 2006-05-10 08:17:17 -0400 (Wed, 10 May 2006) New Revision: 4178 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.bat Log: Revert latest commit. Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 11:51:12 UTC (rev 4177) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 12:17:17 UTC (rev 4178) @@ -41,9 +41,9 @@ wget http://www.openssl.org/source/openssl-%SSLVER%.tar.gz tar zxf openssl-%SSLVER%.tar.gz 2>NUL @del /Q openssl-%SSLVER%.tar.gz - cd .. cd .. + cp ./buildworld.bat %NATIVEDIST%/ cp ./NMAKEcommon.inc %NATIVEDIST%/build/ cp ../NMAKEmakefile %NATIVEDIST%/ @@ -55,5 +55,5 @@ REM @rmdir /S /Q %NATIVEDIST% REM Instead packing move the prepared sources. -REM @rmdir /S /Q ../../%NATIVEDIST% 2>NUL -REM @mv %NATIVEDIST% ../../ +@rmdir /S /Q ..\..\%NATIVEDIST% 2>NUL +@mv %NATIVEDIST% ../../ |
From: <jbo...@li...> - 2006-05-10 11:51:18
|
Author: mla...@jb... Date: 2006-05-10 07:51:12 -0400 (Wed, 10 May 2006) New Revision: 4177 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.bat Log: Do not move the prepared sources Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 10:15:32 UTC (rev 4176) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 11:51:12 UTC (rev 4177) @@ -55,5 +55,5 @@ REM @rmdir /S /Q %NATIVEDIST% REM Instead packing move the prepared sources. -@rmdir /S /Q ../../%NATIVEDIST% 2>NUL -@mv %NATIVEDIST% ../../ +REM @rmdir /S /Q ../../%NATIVEDIST% 2>NUL +REM @mv %NATIVEDIST% ../../ |
From: <jbo...@li...> - 2006-05-10 10:15:55
|
Author: mla...@jb... Date: 2006-05-10 06:15:32 -0400 (Wed, 10 May 2006) New Revision: 4176 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.bat Log: Added move target Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 10:10:10 UTC (rev 4175) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 10:15:32 UTC (rev 4176) @@ -50,6 +50,10 @@ cp ../srclib/apr/NMAKEmakefile %NATIVEDIST%/srclib/apr-%APRVER%/ cp ../srclib/openssl/*.bat %NATIVEDIST%/srclib/openssl-%SSLVER%/ -REM zip -9rqo %NATIVEDIST%.zip %NATIVEDIST% -tar cfz %NATIVEDIST%.tar.gz %NATIVEDIST% -@rmdir /S /Q %NATIVEDIST% +REM zip -9rqo ../../%NATIVEDIST%.zip %NATIVEDIST% +REM tar cfz ../../%NATIVEDIST%.tar.gz %NATIVEDIST% + +REM @rmdir /S /Q %NATIVEDIST% +REM Instead packing move the prepared sources. +@rmdir /S /Q ../../%NATIVEDIST% 2>NUL +@mv %NATIVEDIST% ../../ |
From: <jbo...@li...> - 2006-05-10 10:10:18
|
Author: mla...@jb... Date: 2006-05-10 06:10:10 -0400 (Wed, 10 May 2006) New Revision: 4175 Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.bat Log: Use correct cpu flag for AMD64 Modified: labs/jbossweb/trunk/src/share/native/build/buildworld.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildworld.bat 2006-05-10 09:51:06 UTC (rev 4174) +++ labs/jbossweb/trunk/src/share/native/build/buildworld.bat 2006-05-10 10:10:10 UTC (rev 4175) @@ -39,7 +39,7 @@ goto cmdBuild :cpuAMD64 -set CPU=I386 +set CPU=AMD64 set OPENSSLBIN=buildsslamd %1 call %MSVS8VC%\amd64\vcvarsamd64 goto cmdBuild |
From: <jbo...@li...> - 2006-05-10 09:51:14
|
Author: mla...@jb... Date: 2006-05-10 05:51:06 -0400 (Wed, 10 May 2006) New Revision: 4174 Added: labs/jbossweb/trunk/src/share/native/build/buildprep.bat Log: Initial buildprep for Windows Added: labs/jbossweb/trunk/src/share/native/build/buildprep.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 07:49:41 UTC (rev 4173) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.bat 2006-05-10 09:51:06 UTC (rev 4174) @@ -0,0 +1,55 @@ +@echo off +REM +REM JBoss, the OpenSource J2EE webOS +REM +REM Distributable under LGPL license. +REM See terms of license at gnu.org. +REM +REM +REM @author Mladen Turk +REM +REM +REM +@if "%OS%" == "Windows_NT" setlocal +set NATIVETAG=HEAD + +REM Replace NATIVEEXT with tagged version number, like 1.1.0 +set NATIVEEXT=current + +REM Use tag or trunk +REM NATIVESVN=http://svn.apache.org/repos/asf/tomcat/connectors/trunk +set NATIVESVN=http://svn.apache.org/repos/asf/tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_3 + +set NATIVEDIST=tomcat-native-%NATIVEEXT% +@rmdir /S /Q %NATIVEDIST% 2>NUL +svn export -r %NATIVETAG% %NATIVESVN%/jni/native %NATIVEDIST% + +set APRVER=1.2.7 +set SSLVER=0.9.8b + +REM Prebuild +cd %NATIVEDIST% +mkdir srclib +cd srclib + +REM Download APR +wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/apr/apr-%APRVER%-win32-src.zip +unzip -qo apr-%APRVER%-win32-src.zip +@del /Q apr-%APRVER%-win32-src.zip + +REM Download OpenSSL +wget http://www.openssl.org/source/openssl-%SSLVER%.tar.gz +tar zxf openssl-%SSLVER%.tar.gz 2>NUL +@del /Q openssl-%SSLVER%.tar.gz + +cd .. +cd .. +cp ./buildworld.bat %NATIVEDIST%/ +cp ./NMAKEcommon.inc %NATIVEDIST%/build/ +cp ../NMAKEmakefile %NATIVEDIST%/ +cp ../srclib/apr/NMAKEmakefile %NATIVEDIST%/srclib/apr-%APRVER%/ +cp ../srclib/openssl/*.bat %NATIVEDIST%/srclib/openssl-%SSLVER%/ + +REM zip -9rqo %NATIVEDIST%.zip %NATIVEDIST% +tar cfz %NATIVEDIST%.tar.gz %NATIVEDIST% +@rmdir /S /Q %NATIVEDIST% |
From: <jbo...@li...> - 2006-05-10 07:49:45
|
Author: mla...@jb... Date: 2006-05-10 03:49:41 -0400 (Wed, 10 May 2006) New Revision: 4173 Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.sh Log: Add buildworld.bat to buildprep. Modified: labs/jbossweb/trunk/src/share/native/build/buildprep.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildprep.sh 2006-05-10 07:48:12 UTC (rev 4172) +++ labs/jbossweb/trunk/src/share/native/build/buildprep.sh 2006-05-10 07:49:41 UTC (rev 4173) @@ -62,6 +62,7 @@ cd .. cp ./buildworld.sh ${NATIVEDIST}/ +cp ./buildworld.bat ${NATIVEDIST}/ cp ./NMAKEcommon.inc ${NATIVEDIST}/build/ cp ../NMAKEmakefile ${NATIVEDIST}/ cp ../srclib/apr/NMAKEmakefile ${NATIVEDIST}/srclib/apr-${APRVER}/ |
From: <jbo...@li...> - 2006-05-10 07:48:17
|
Author: mla...@jb... Date: 2006-05-10 03:48:12 -0400 (Wed, 10 May 2006) New Revision: 4172 Added: labs/jbossweb/trunk/src/share/native/build/buildworld.bat Log: Initial buildworld for Windows Added: labs/jbossweb/trunk/src/share/native/build/buildworld.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildworld.bat 2006-05-10 07:47:38 UTC (rev 4171) +++ labs/jbossweb/trunk/src/share/native/build/buildworld.bat 2006-05-10 07:48:12 UTC (rev 4172) @@ -0,0 +1,58 @@ +@echo off +REM +REM JBoss, the OpenSource J2EE webOS +REM +REM Distributable under LGPL license. +REM See terms of license at gnu.org. +REM +REM +REM @author Mladen Turk +REM +REM +REM +@if "%OS%" == "Windows_NT" setlocal +set MSVS8VC=C:\opt\MSVS8\VC\bin +REM set MSVS8VC=C:\D\Microsoft\MSVS8\VC\bin + +set OPENSSLBIN=buildssl +set OPENSSLVER=0.9.8b +set APRVER=1.2.7 +set FLAVOR=DLL + +@if "%1" == "dll" goto makeDLL +set FLAVOR=STATIC +goto checkCPU +:makeDLL +set FLAVOR=DLL + +:checkCPU +@if "%2" == "x86" goto cpuX86 +@if "%2" == "amd64" goto cpuAMD64 +@if "%2" == "ia64" goto cpuIA64 +echo Usage: buildworld <CPU> +goto cmdEnd + +:cpuX86 +set CPU=I386 +set OPENSSLBIN=buildsslasm %1 +call %MSVS8VC%\vcvars32 +goto cmdBuild + +:cpuAMD64 +set CPU=I386 +set OPENSSLBIN=buildsslamd %1 +call %MSVS8VC%\amd64\vcvarsamd64 +goto cmdBuild + +:cmdBuild +cd srclib/openssl-%OPENSSLVER% +call %OPENSSLBIN% %1 +cd .. +cd apr-%APRVER% +nmake -f NMAKEMakefile %FLAVOR%=1 +cd .. +cd .. +nmake -f NMAKEMakefile %FLAVOR%=1 +nmake -f NMAKEMakefile %FLAVOR%=1 install + +:cmdEnd |
From: <jbo...@li...> - 2006-05-10 07:47:47
|
Author: mla...@jb... Date: 2006-05-10 03:47:38 -0400 (Wed, 10 May 2006) New Revision: 4171 Modified: labs/jbossweb/trunk/src/share/native/NMAKEmakefile labs/jbossweb/trunk/src/share/native/srclib/VERSIONS labs/jbossweb/trunk/src/share/native/srclib/openssl/buildssl.bat labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslamd.bat labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslasm.bat Log: Update build files. Modified: labs/jbossweb/trunk/src/share/native/NMAKEmakefile =================================================================== --- labs/jbossweb/trunk/src/share/native/NMAKEmakefile 2006-05-10 03:36:47 UTC (rev 4170) +++ labs/jbossweb/trunk/src/share/native/NMAKEmakefile 2006-05-10 07:47:38 UTC (rev 4171) @@ -69,7 +69,7 @@ LFLAGS = $(LFLAGS) user32.lib psapi.lib gdi32.lib shlwapi.lib !IFDEF STATIC -LDIRS = $(LDIRS) /libpath:"$(WITH_OPENSSL)/out32" /libpath:"$(WITH_OPENSSL)/out32dll" +LDIRS = $(LDIRS) /libpath:"$(WITH_OPENSSL)/out32" !ELSE LDIRS = $(LDIRS) /libpath:"$(WITH_OPENSSL)/out32dll" !ENDIF @@ -136,7 +136,7 @@ !IFDEF STATIC install: all - @gmkdir -p $(INSTALLDIR + @gmkdir -p $(INSTALLDIR) @cp -f -t $(INSTALLDIR) $(BUILDLIB) @cp -f -t $(INSTALLDIR) $(WITH_OPENSSL)/out32/openssl.exe !ELSE Modified: labs/jbossweb/trunk/src/share/native/srclib/VERSIONS =================================================================== --- labs/jbossweb/trunk/src/share/native/srclib/VERSIONS 2006-05-10 03:36:47 UTC (rev 4170) +++ labs/jbossweb/trunk/src/share/native/srclib/VERSIONS 2006-05-10 07:47:38 UTC (rev 4171) @@ -2,7 +2,7 @@ Use the following version of the libraries -- APR 1.2.2, http://apr.apache.org -- OpenSSL 0.9.8a, http://www.openssl.org +- APR 1.2.7, http://apr.apache.org +- OpenSSL 0.9.8b, http://www.openssl.org - Zlib 1.2.3, http://www.zlib.net - Bzip2 1.0.3, http://www.bzip.org Modified: labs/jbossweb/trunk/src/share/native/srclib/openssl/buildssl.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/srclib/openssl/buildssl.bat 2006-05-10 03:36:47 UTC (rev 4170) +++ labs/jbossweb/trunk/src/share/native/srclib/openssl/buildssl.bat 2006-05-10 07:47:38 UTC (rev 4171) @@ -13,7 +13,10 @@ REM call vsvars32 REM @if "%OS%" == "Windows_NT" setlocal -@set PATH=%CD%;%PATH% +@rmdir /S /Q out32 +@rmdir /S /Q out32dll +@rmdir /S /Q tmp32 +@rmdir /S /Q tmp32dll perl Configure VC-NT call ms\do_nt Modified: labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslamd.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslamd.bat 2006-05-10 03:36:47 UTC (rev 4170) +++ labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslamd.bat 2006-05-10 07:47:38 UTC (rev 4171) @@ -13,7 +13,10 @@ REM call vsvars32 REM @if "%OS%" == "Windows_NT" setlocal -@set PATH=%CD%;%PATH% +@rmdir /S /Q out32 +@rmdir /S /Q out32dll +@rmdir /S /Q tmp32 +@rmdir /S /Q tmp32dll perl Configure VC-WIN64A call ms\do_win64a Modified: labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslasm.bat =================================================================== --- labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslasm.bat 2006-05-10 03:36:47 UTC (rev 4170) +++ labs/jbossweb/trunk/src/share/native/srclib/openssl/buildsslasm.bat 2006-05-10 07:47:38 UTC (rev 4171) @@ -13,7 +13,10 @@ REM call vsvars32 REM @if "%OS%" == "Windows_NT" setlocal -@set PATH=%CD%;%PATH% +@rmdir /S /Q out32 +@rmdir /S /Q out32dll +@rmdir /S /Q tmp32 +@rmdir /S /Q tmp32dll perl Configure VC-NT call ms\do_masm |
From: <jbo...@li...> - 2006-05-10 03:36:58
|
Author: mic...@jb... Date: 2006-05-09 23:36:47 -0400 (Tue, 09 May 2006) New Revision: 4170 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.png labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg Log: added xor group 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-05-10 03:19:40 UTC (rev 4169) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml 2006-05-10 03:36:47 UTC (rev 4170) @@ -16,9 +16,9 @@ </mediaobject> </figure> - <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>The Rule construct is where is clearly the most important construct. + 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 @@ -174,6 +174,18 @@ </section> <section> + <title>xor-group</title> + + <para>default value N/A</para> + + <para>type : String</para> + + <para>Rules that belong to the same named xor-group will only fire exclusively. + In other words, the first rule in an xor-group to fire will cancel the other rules activations (stop them from firing). + The Xor group attribute is any string, as long as the string is identical for all the rules you need to be in the one group.</para> + </section> + + <section> <title>duration</title> <para>default value : no default value</para> @@ -870,17 +882,26 @@ <para>Grouping is similar to using parentheses in algebra, it makes the order of operations explicit.</para> </section> + </section> + <section> + <title>A note on autoboxing and primitive types</title> + + <para>Java 5 supports autoboxing and unboxing between primitives of + appropraite types. This makes for very convenience and easier to read + code. However, as drools runs in J2SE 1.4 as well, we can't rely on this. + Thus we have to autobox at times. Fields that are referred to are + autoboxed in the corresponding object type automatically (if they are + already an object, then there is no change). However, it is important to + note that they are not "unboxed" automatically. Thus if you bind to a + field that is an "int" in your object model, it will behave like an Object + in the rule (ie predicates, return value constraints and the RHS).</para> + + <para>As a general rule, if possible, make your fields object types (at + least until java 5), or at least think of your fields as object types even + if they are not to start with). Another special note, is that for return + value constraints, the return value snippet of code must return an Object + (not a primitive). Now, I bet you can't wait for Java 5 to be the minimum + !</para> </section> - - <section> - <title>A note on autoboxing and primitive types</title> - <para> - Java 5 supports autoboxing and unboxing between primitives of appropraite types. This makes for very convenience and easier to read code. However, as drools runs in J2SE 1.4 as well, we can't rely on this. Thus we have to autobox at times. Fields that are referred to are autoboxed in the corresponding object type automatically (if they are already an object, then there is no change). However, it is important to note that they are not "unboxed" automatically. Thus if you bind to a field that is an "int" in your object model, it will behave like an Object in the rule (ie predicates, return value constraints and the RHS). - </para> - <para> - As a general rule, if possible, make your fields object types (at least until java 5), or at least think of your fields as object types even if they are not to start with). Another special note, is that for return value constraints, the return value snippet of code must return an Object (not a primitive). - Now, I bet you can't wait for Java 5 to be the minimum ! - </para> - </section> </section> \ No newline at end of file Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.png =================================================================== (Binary files differ) Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg 2006-05-10 03:19:40 UTC (rev 4169) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg 2006-05-10 03:36:47 UTC (rev 4170) @@ -2,18 +2,17 @@ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 rule_attributes.svg Page-1 --> <svg xmlns="http://www.w3.org/2000/svg" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="3.90316in" - height="1.86039in" viewBox="0 0 281.027 133.948" xml:space="preserve" color-interpolation-filters="sRGB" class="st7"> - <v:documentProperties v:langID="1033" v:metric="true" v:viewMarkup="false"/> + height="1.86039in" viewBox="0 0 281.028 133.948" xml:space="preserve" color-interpolation-filters="sRGB" class="st6"> + <v:documentProperties v:langID="1033" v:metric="true"/> <style type="text/css"> <![CDATA[ .st1 {fill:#e8eef7;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24} .st2 {fill:#000000;font-family:Arial;font-size:0.666664em} - .st3 {font-size:1em} - .st4 {marker-end:url(#mrkr2-16);stroke:#4677bf;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24} - .st5 {fill:#4677bf;fill-opacity:1;stroke:#4677bf;stroke-opacity:1;stroke-width:0.08695652173913} - .st6 {fill:#000000;font-family:Arial;font-size:0.666664em;font-style:italic} - .st7 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} + .st3 {marker-end:url(#mrkr2-12);stroke:#4677bf;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24} + .st4 {fill:#4677bf;fill-opacity:1;stroke:#4677bf;stroke-opacity:1;stroke-width:0.08695656915758} + .st5 {fill:#000000;font-family:Arial;font-size:0.666664em;font-style:italic} + .st6 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} ]]> </style> @@ -21,18 +20,18 @@ <g id="lend2"> <path d="M 1 1 L 0 0 L 1 -1 L 1 1 " style="stroke:none"/> </g> - <marker id="mrkr2-16" class="st5" v:arrowType="2" v:arrowSize="2" v:setback="11.5" refX="-11.5" orient="auto" + <marker id="mrkr2-12" class="st4" v:arrowType="2" v:arrowSize="2" v:setback="11.5" refX="-11.499993728913" orient="auto" markerUnits="strokeWidth"> - <use xlink:href="#lend2" transform="scale(-11.5,-11.5) "/> + <use xlink:href="#lend2" transform="scale(-11.499993728913,-11.499993728913) "/> </marker> </defs> <g v:mID="0" v:index="1" v:groupContext="foregroundPage"> <title>Page-1</title> - <v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50394" - v:shadowOffsetY="-8.50394"/> + <v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50395" + v:shadowOffsetY="-8.50395"/> <v:layer v:name="Flowchart" v:index="0"/> <v:layer v:name="Connector" v:index="1"/> - <g id="shape5-1" v:mID="5" v:groupContext="shape" v:layerMember="0" transform="translate(64.9004,-104.813)"> + <g id="shape1-1" v:mID="1" v:groupContext="shape" v:layerMember="0" transform="translate(64.9006,-104.813)"> <title>Process.89</title> <desc>‘no-loop’</desc> <v:custProps> @@ -44,11 +43,12 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="23.2137" cy="127.24" width="46.43" height="13.4147"/> - <rect x="0" y="120.533" width="46.4273" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="8.1" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘n<tspan class="st3" - v:langID="2057">o</tspan><tspan class="st3" v:langID="2057">-</tspan>l<tspan class="st3" v:langID="2057">oop</tspan>’</text> </g> - <g id="shape8-7" v:mID="8" v:groupContext="shape" v:layerMember="0" transform="translate(64.9004,-77.4243)"> + <v:textRect cx="23.2135" cy="127.24" width="46.44" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L43.59 133.95 A2.83472 2.83472 -180 0 0 46.43 131.11 L46.43 + 123.37 A2.83472 2.83472 -180 0 0 43.59 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + Z" class="st1"/> + <text x="8.1" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘no-loop’</text> </g> + <g id="shape2-4" v:mID="2" v:groupContext="shape" v:layerMember="0" transform="translate(65.1969,-85.7979)"> <title>Process.90</title> <desc>‘salience’</desc> <v:custProps> @@ -60,20 +60,21 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="23.2137" cy="127.24" width="46.43" height="13.4147"/> - <rect x="0" y="120.533" width="46.4273" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="6.77" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘<tspan class="st3" - v:langID="2057">salience</tspan>’</text> </g> - <g id="shape10-11" v:mID="10" v:groupContext="shape" v:layerMember="1" transform="translate(11.9778,-104.433)"> + <v:textRect cx="23.2135" cy="127.24" width="46.44" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L43.59 133.95 A2.83472 2.83472 -180 0 0 46.43 131.11 L46.43 + 123.37 A2.83472 2.83472 -180 0 0 43.59 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + Z" class="st1"/> + <text x="6.77" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘salience’</text> </g> + <g id="shape3-7" v:mID="3" v:groupContext="shape" v:layerMember="1" transform="translate(11.978,-111.521)"> <title>Dynamic connector.91</title> - <path d="M0 126.86 L50.16 126.86" class="st4"/> + <path d="M0 133.95 L50.16 133.95 L50.16 133.95" class="st3"/> </g> - <g id="shape27-17" v:mID="27" v:groupContext="shape" v:layerMember="1" transform="translate(18.3206,-111.52)"> + <g id="shape4-13" v:mID="4" v:groupContext="shape" v:layerMember="1" transform="translate(18.3208,-92.126)"> <title>Dynamic connector.92</title> - <path d="M0 133.95 L11.64 133.95 A5.66929 5.66929 0 0 1 17.31 139.62 L17.31 155.67 A5.66929 5.66929 -180 0 0 22.98 161.34 - L43.82 161.34" class="st4"/> + <path d="M0 114.56 L11.71 114.56 A5.70532 4.01385 0 0 1 17.42 118.57 L17.42 129.93 A5.70532 4.01385 -180 0 0 23.13 133.95 + L44.1 133.95 L44.12 133.95" class="st3"/> </g> - <g id="shape35-22" v:mID="35" v:groupContext="shape" v:layerMember="0" transform="translate(51.2499,-50.036)"> + <g id="shape5-18" v:mID="5" v:groupContext="shape" v:layerMember="0" transform="translate(51.0236,-68.79)"> <title>Process.93</title> <desc>‘agenda-group’</desc> <v:custProps> @@ -85,12 +86,12 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="36.8641" cy="127.24" width="73.73" height="13.4147"/> - <rect x="0" y="120.533" width="73.7282" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="10.19" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘a<tspan class="st3" - v:langID="2057">genda</tspan><tspan class="st3" v:langID="2057">-</tspan>g<tspan class="st3" - v:langID="2057">roup</tspan>’</text> </g> - <g id="shape41-28" v:mID="41" v:groupContext="shape" v:layerMember="0" transform="translate(58.7694,-0.379282)"> + <v:textRect cx="36.8639" cy="127.24" width="73.74" height="13.4147"/> + <path d="M-0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L70.89 133.95 A2.83472 2.83472 -180 0 0 73.73 131.11 L73.73 + 123.37 A2.83472 2.83472 -180 0 0 70.89 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 + Z" class="st1"/> + <text x="10.19" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘agenda-group’</text> </g> + <g id="shape6-21" v:mID="6" v:groupContext="shape" v:layerMember="0" transform="translate(58.5294,-0.75852)"> <title>Process.94</title> <desc>‘duration’</desc> <v:custProps> @@ -102,40 +103,40 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="29.3446" cy="127.24" width="58.69" height="13.4147"/> - <rect x="0" y="120.533" width="58.6892" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="13.12" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘<tspan class="st3" - v:langID="2057">duration</tspan>’</text> </g> - <g id="shape42-32" v:mID="42" v:groupContext="shape" v:layerMember="1" transform="translate(18.3206,-111.52)"> + <v:textRect cx="29.3444" cy="127.24" width="58.7" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L55.85 133.95 A2.83472 2.83472 -180 0 0 58.69 131.11 L58.69 + 123.37 A2.83472 2.83472 -180 0 0 55.85 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + Z" class="st1"/> + <text x="13.12" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘duration’</text> </g> + <g id="shape7-24" v:mID="7" v:groupContext="shape" v:layerMember="1" transform="translate(18.3208,-76.5354)"> <title>Dynamic connector.95</title> - <path d="M0 133.95 L11.64 133.95 A5.66929 5.66929 0 0 1 17.31 139.62 L17.31 183.06 A5.66929 5.66929 -180 0 0 22.98 188.72 - L30.17 188.72" class="st4"/> + <path d="M0 98.97 L11.64 98.97 A5.66929 3.62108 0 0 1 17.31 102.59 L17.31 130.33 A5.66929 3.62108 -180 0 0 22.98 133.95 + L30.17 133.95 L30.17 133.95" class="st3"/> </g> - <g id="shape43-37" v:mID="43" v:groupContext="shape" v:layerMember="1" transform="translate(18.3206,-111.52)"> + <g id="shape8-29" v:mID="8" v:groupContext="shape" v:layerMember="1" transform="translate(18.3208,-7.088)"> <title>Dynamic connector.96</title> - <path d="M0 133.95 L11.64 133.95 A5.66929 5.66929 0 0 1 17.31 139.62 L17.31 232.71 A5.66929 5.66929 -180 0 0 22.98 238.38 - L37.69 238.38" class="st4"/> + <path d="M0 29.52 L11.64 29.52 A5.66929 5.66929 0 0 1 17.31 35.19 L17.31 128.28 A5.66929 5.66929 -180 0 0 22.98 133.95 + L37.69 133.95 L37.69 133.95" class="st3"/> </g> - <g id="shape44-42" v:mID="44" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-118.607)"> + <g id="shape9-34" v:mID="9" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-111.525)"> <title>Dynamic connector.98</title> - <v:textBlock v:margins="rect(4,4,4,4)" v:tabSpace="42.5197"/> - <path d="M0 141.03 L32.06 141.03" class="st4"/> + <path d="M0 133.95 L32.06 133.95 L32.06 133.95" class="st3"/> </g> - <g id="shape45-47" v:mID="45" v:groupContext="shape" v:layerMember="1" transform="translate(117.459,-5.68434E-014)"> + <g id="shape10-39" v:mID="10" v:groupContext="shape" v:layerMember="1" transform="translate(117.459,-7.088)"> <title>Dynamic connector.99</title> - <path d="M0 126.86 L25.13 126.86" class="st4"/> + <path d="M0 133.95 L25.13 133.95 L25.13 133.95" class="st3"/> </g> - <g id="shape46-52" v:mID="46" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-84.1316)"> + <g id="shape11-44" v:mID="11" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-93.5433)"> <title>Dynamic connector.100</title> - <path d="M0 133.95 L9.6 133.95 A5.66929 5.66929 -180 0 0 15.27 128.28 L15.27 112.23 A5.66929 5.66929 0 0 1 20.94 106.56 - L58.66 106.56" class="st4"/> + <path d="M0 133.95 L9.6 133.95 A5.66929 3.72082 -180 0 0 15.27 130.23 L15.27 119.69 A5.66929 3.72082 0 0 1 20.94 115.97 + L58.66 115.97 L58.66 115.97" class="st3"/> </g> - <g id="shape47-57" v:mID="47" v:groupContext="shape" v:layerMember="1" transform="translate(124.978,-56.7433)"> + <g id="shape12-49" v:mID="12" v:groupContext="shape" v:layerMember="1" transform="translate(124.978,-76.5354)"> <title>Dynamic connector.101</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 5.31496 -180 0 0 10.63 128.63 L10.63 84.44 A5.27187 5.27187 0 0 1 15.9 79.17 - L18.41 79.17" class="st4"/> + <path d="M0 133.95 L5.31 133.95 A5.31496 3.39447 -180 0 0 10.63 130.55 L10.63 102.33 A5.27187 3.36695 0 0 1 15.9 98.96 + L18.41 98.96 L18.41 98.96" class="st3"/> </g> - <g id="shape48-62" v:mID="48" v:groupContext="shape" v:layerMember="0" transform="translate(146.152,-104.813)"> + <g id="shape13-54" v:mID="13" v:groupContext="shape" v:layerMember="0" transform="translate(146.152,-104.813)"> <title>Process.156</title> <desc>value</desc> <v:custProps> @@ -147,18 +148,19 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="18.4976" cy="127.24" width="37" height="13.4147"/> - <rect x="0" y="120.533" width="36.9953" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="8.94" y="129.64" class="st6" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>value</text> </g> - <g id="shape49-65" v:mID="49" v:groupContext="shape" v:layerMember="1;0" transform="translate(255.158,-105.651)"> + <v:textRect cx="18.4974" cy="127.24" width="37.01" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L34.16 133.95 A2.83472 2.83472 -180 0 0 37 131.11 L37 123.37 + A2.83472 2.83472 -180 0 0 34.16 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 Z" + class="st1"/> + <text x="8.93" y="129.64" class="st5" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>value</text> </g> + <g id="shape14-57" v:mID="14" v:groupContext="shape" v:layerMember="1;0" transform="translate(255.158,-105.649)"> <title>On-page reference.157</title> <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <path d="M0 128.08 A5.86892 5.86892 0 0 1 11.74 128.08 A5.86892 5.86892 0 0 1 0 128.08 Z" class="st1"/> + <path d="M0 128.08 A5.87 5.87 0 1 1 11.74 128.08 A5.87 5.87 0 1 1 0 128.08 Z" class="st1"/> </g> - <g id="shape50-67" v:mID="50" v:groupContext="shape" v:layerMember="0" transform="translate(206.89,-120.293)"> + <g id="shape15-59" v:mID="15" v:groupContext="shape" v:layerMember="0" transform="translate(206.89,-120.293)"> <title>Process.160</title> <desc>;</desc> <v:custProps> @@ -170,32 +172,33 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="10.061" cy="127.24" width="20.13" height="13.4147"/> - <rect x="0" y="120.533" width="20.122" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="8.94" y="129.64" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>;</text> </g> - <g id="shape51-70" v:mID="51" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.52)"> + <v:textRect cx="10.0608" cy="127.24" width="20.14" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L17.29 133.95 A2.83472 2.83472 -180 0 0 20.12 131.11 L20.12 + 123.37 A2.83472 2.83472 -180 0 0 17.29 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + Z" class="st1"/> + <text x="8.96" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>;</text> </g> + <g id="shape16-62" v:mID="16" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.518)"> <title>Dynamic connector.161</title> <path d="M0 133.95 L5.31 133.95 A5.31496 5.31496 -180 0 0 10.63 128.63 L10.63 124.14 A5.66929 5.66929 0 0 1 16.3 118.47 - L20.98 118.47" class="st4"/> + L20.98 118.47 L20.98 118.47" class="st3"/> </g> - <g id="shape52-75" v:mID="52" v:groupContext="shape" v:layerMember="1" transform="translate(227.012,-127)"> + <g id="shape17-67" v:mID="17" v:groupContext="shape" v:layerMember="1" transform="translate(227.012,-111.518)"> <title>Dynamic connector.162</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 5.31496 0 0 1 10.63 139.26 L10.63 143.76 A5.66929 5.66929 -180 0 0 16.3 149.43 - L25.39 149.43" class="st4"/> + <path d="M0 118.47 L5.31 118.47 A5.31496 5.31496 0 0 1 10.63 123.78 L10.63 128.28 A5.66929 5.66929 -180 0 0 16.3 133.95 + L25.39 133.95 L25.39 133.95" class="st3"/> </g> - <g id="shape53-80" v:mID="53" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-104.433)"> + <g id="shape18-72" v:mID="18" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.521)"> <title>Dynamic connector.163</title> - <path d="M0 126.86 L69.25 126.86" class="st4"/> + <path d="M0 133.95 L69.25 133.95 L69.25 133.95" class="st3"/> </g> - <g id="shape54-85" v:mID="54" v:groupContext="shape" v:layerMember="1;0" transform="translate(0.24,-105.651)"> + <g id="shape19-77" v:mID="19" v:groupContext="shape" v:layerMember="1;0" transform="translate(0.240176,-105.649)"> <title>On-page reference.164</title> <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <path d="M0 128.08 A5.86892 5.86892 0 0 1 11.74 128.08 A5.86892 5.86892 0 0 1 0 128.08 Z" class="st1"/> + <path d="M0 128.08 A5.87 5.87 0 0 1 11.74 128.08 A5.87 5.87 0 1 1 0 128.08 Z" class="st1"/> </g> - <g id="shape58-87" v:mID="58" v:groupContext="shape" v:layerMember="0" transform="translate(145.346,-0.379282)"> + <g id="shape20-79" v:mID="20" v:groupContext="shape" v:layerMember="0" transform="translate(145.346,-0.379582)"> <title>Process.201</title> <desc>duration-value (ms)</desc> <v:custProps> @@ -207,14 +210,16 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="48.6282" cy="127.24" width="97.26" height="13.4147"/> - <rect x="0" y="120.533" width="97.2563" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> + <v:textRect cx="48.6281" cy="127.24" width="97.27" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L94.42 133.95 A2.83472 2.83472 -180 0 0 97.26 131.11 L97.26 + 123.37 A2.83472 2.83472 -180 0 0 94.42 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + Z" class="st1"/> <text x="14.17" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>duration-value (ms)</text> </g> - <g id="shape59-90" v:mID="59" v:groupContext="shape" v:layerMember="1" transform="translate(242.602,-7.08661)"> + <g id="shape21-82" v:mID="21" v:groupContext="shape" v:layerMember="1" transform="translate(242.602,-7.08461)"> <title>Dynamic connector.202</title> - <path d="M0 133.95 L12.76 133.95 A5.66929 5.66929 -180 0 0 18.43 128.28 L18.43 38.14" class="st4"/> + <path d="M0 133.95 L12.76 133.95 A5.66929 5.66929 -180 0 0 18.43 128.28 L18.43 38.14 L18.43 38.14" class="st3"/> </g> - <g id="shape60-95" v:mID="60" v:groupContext="shape" v:layerMember="0" transform="translate(51.4584,-25.5118)"> + <g id="shape22-87" v:mID="22" v:groupContext="shape" v:layerMember="0" transform="translate(51.0236,-51.7821)"> <title>Process.60</title> <desc>‘auto-focus’</desc> <v:custProps> @@ -226,19 +231,47 @@ <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="36.8641" cy="127.24" width="73.73" height="13.4147"/> - <rect x="0" y="120.533" width="73.7282" height="13.4147" rx="2.83465" ry="2.83465" class="st1"/> - <text x="16.42" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘<tspan class="st3" - v:langID="2057">auto</tspan><tspan class="st3" v:langID="2057">-</tspan><tspan class="st3" v:langID="2057">focus</tspan>’</text> </g> - <g id="shape61-101" v:mID="61" v:groupContext="shape" v:layerMember="1" transform="translate(11.9778,-111.52)"> + <v:textRect cx="36.8639" cy="127.24" width="73.74" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L70.89 133.95 A2.83472 2.83472 -180 0 0 73.73 131.11 L73.73 + 123.37 A2.83472 2.83472 -180 0 0 70.89 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 + Z" class="st1"/> + <text x="16.42" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘auto-focus’</text> </g> + <g id="shape23-90" v:mID="23" v:groupContext="shape" v:layerMember="1" transform="translate(11.978,-59.5276)"> <title>Dynamic connector.61</title> - <path d="M0 133.95 L18.19 133.95 A5.66929 5.66929 0 0 1 23.86 139.62 L23.86 207.58 A5.66929 5.66929 -180 0 0 29.53 213.25 - L36.72 213.25" class="st4"/> + <path d="M0 81.96 L18.19 81.96 A5.66929 3.71689 0 0 1 23.86 85.67 L23.86 130.23 A5.66929 3.71689 -180 0 0 29.53 133.95 + L36.72 133.95 L36.72 133.95" class="st3"/> </g> - <g id="shape62-106" v:mID="62" v:groupContext="shape" v:layerMember="1" transform="translate(125.187,-32.2191)"> + <g id="shape24-95" v:mID="24" v:groupContext="shape" v:layerMember="1" transform="translate(125.187,-56.6929)"> <title>Dynamic connector.62</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 5.31496 -180 0 0 10.63 128.63 L10.63 59.81 A5.16762 5.16762 0 0 1 15.8 54.65 - L18.21 54.65" class="st4"/> + <path d="M0 133.95 L5.31 133.95 A5.31496 3.67451 -180 0 0 10.63 130.27 L10.63 82.69 A5.16762 3.57265 0 0 1 15.8 79.12 + L18.21 79.12 L18.21 79.12" class="st3"/> </g> + <g id="shape25-100" v:mID="25" v:groupContext="shape" v:layerMember="0" transform="translate(52.4409,-31.1811)"> + <title>Process.25</title> + <desc>‘auto-focus’</desc> + <v:custProps> + <v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/> + <v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/> + <v:cp v:nameU="Resources" v:lbl="Resources" v:langID="1033"/> + </v:custProps> + <v:userDefs> + <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> + </v:userDefs> + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> + <v:textRect cx="36.8639" cy="127.24" width="73.74" height="13.4147"/> + <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L70.89 133.95 A2.83472 2.83472 -180 0 0 73.73 131.11 L73.73 + 123.37 A2.83472 2.83472 -180 0 0 70.89 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 + Z" class="st1"/> + <text x="17.98" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘xor-group’</text> </g> + <g id="shape26-103" v:mID="26" v:groupContext="shape" v:layerMember="1" transform="translate(11.7798,-36.8504)"> + <title>Dynamic connector.26</title> + <path d="M0 59.28 L18.19 59.28 A5.66929 5.33812 0 0 1 23.86 64.62 L23.86 128.61 A5.66929 5.33812 -180 0 0 29.53 133.95 + L36.72 133.95 L36.72 133.95" class="st3"/> + </g> + <g id="shape27-108" v:mID="27" v:groupContext="shape" v:layerMember="1" transform="translate(125.197,-41.1024)"> + <title>Dynamic connector.27</title> + <path d="M0 133.95 L5.31 133.95 A5.31496 4.74969 -180 0 0 10.63 129.19 L10.63 67.69 A5.16762 4.61802 0 0 1 15.8 63.08 + L18.21 63.08 L18.21 63.08" class="st3"/> + </g> </g> </svg> |
From: <jbo...@li...> - 2006-05-10 03:19:49
|
Author: mic...@jb... Date: 2006-05-09 23:19:40 -0400 (Tue, 09 May 2006) New Revision: 4169 Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/scanners/DRLScanner.java Log: got rid of a silly comment rule Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/scanners/DRLScanner.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/scanners/DRLScanner.java 2006-05-10 03:03:56 UTC (rev 4168) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/scanners/DRLScanner.java 2006-05-10 03:19:40 UTC (rev 4169) @@ -55,7 +55,7 @@ rules.add(new SingleLineRule("'", "'", string, '\\')); //for unfilled "holes" - rules.add(new SingleLineRule("{", "}", comment)); + //rules.add(new SingleLineRule("{", "}", comment)); // Add generic whitespace rule. rules.add(new WhitespaceRule(new WhitespaceDetector())); |
From: <jbo...@li...> - 2006-05-10 03:04:08
|
Author: mic...@jb... Date: 2006-05-09 23:03:56 -0400 (Tue, 09 May 2006) New Revision: 4168 Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/keywords.properties Log: added xor group Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-05-10 02:58:25 UTC (rev 4167) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-05-10 03:03:56 UTC (rev 4168) @@ -150,6 +150,7 @@ list.add(new RuleCompletionProposal(prefix.length(), "duration", "duration ", droolsIcon)); list.add(new RuleCompletionProposal(prefix.length(), "auto-focus", "auto-focus ", droolsIcon)); list.add(new RuleCompletionProposal(prefix.length(), "when", "when\n\t ", droolsIcon)); + list.add(new RuleCompletionProposal(prefix.length(), "xor-group", "xor-group ", droolsIcon)); } private void addDSLProposals(final List list, Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/keywords.properties =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/keywords.properties 2006-05-10 02:58:25 UTC (rev 4167) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/keywords.properties 2006-05-10 03:03:56 UTC (rev 4168) @@ -12,9 +12,6 @@ package function global -new -return -language query exists eval @@ -24,3 +21,4 @@ -> not auto-focus +xor-group |
From: <jbo...@li...> - 2006-05-10 02:58:29
|
Author: bagerman Date: 2006-05-09 22:58:25 -0400 (Tue, 09 May 2006) New Revision: 4167 Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java Log: To resolve NPE that is being caused by array copy with wrong length on source array Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java =================================================================== --- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java 2006-05-10 02:39:55 UTC (rev 4166) +++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java 2006-05-10 02:58:25 UTC (rev 4167) @@ -224,7 +224,7 @@ 0, newIndex, 0, - newSize - 1 ); + (newSize > this.pageIndex.length) ? this.pageIndex.length : newSize); this.pageIndex = newIndex; } |
From: <jbo...@li...> - 2006-05-10 02:40:01
|
Author: mic...@jb... Date: 2006-05-09 22:39:55 -0400 (Tue, 09 May 2006) New Revision: 4166 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml Log: Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml 2006-05-10 01:23:03 UTC (rev 4165) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml 2006-05-10 02:39:55 UTC (rev 4166) @@ -36,7 +36,8 @@ control what "parameters" of rules can be edited, without exposing the rules directly.</para> - <para>Decision tables also provide a degree of insulation from the underlying object model.</para> + <para>Decision tables also provide a degree of insulation from the + underlying object model.</para> </section> <section> @@ -344,6 +345,17 @@ </row> <row> + <entry>XOR-GROUP</entry> + + <entry>Cell values in this column mean that the rule-row belongs + to the given XOR group. An Xor group means that only one rule in + the named group will fire (ie the first one to fire cancells the + other rules activations).</entry> + + <entry>optional</entry> + </row> + + <row> <entry>Worksheet</entry> <entry>By default, the first worksheet is only looked at for |
From: <jbo...@li...> - 2006-05-10 01:23:09
|
Author: mic...@jb... Date: 2006-05-09 21:23:03 -0400 (Tue, 09 May 2006) New Revision: 4165 Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java Log: extra assertion Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java =================================================================== --- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-05-10 00:22:53 UTC (rev 4164) +++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-05-10 01:23:03 UTC (rev 4165) @@ -239,6 +239,8 @@ assertEquals(1, list.size()); state.setState( "finished" ); + assertEquals(1, list.size()); + workingMemory.fireAllRules(); assertEquals(2, list.size()); |
Author: mic...@jb... Date: 2006-05-09 20:22:53 -0400 (Tue, 09 May 2006) New Revision: 4164 Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParser.java labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/drl.g labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/latin-sample.drl labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/latin.dsl Log: moved latin into ID Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParser.java =================================================================== --- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParser.java 2006-05-09 22:08:11 UTC (rev 4163) +++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParser.java 2006-05-10 00:22:53 UTC (rev 4164) @@ -1,4 +1,4 @@ -// $ANTLR 3.0ea8 C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g 2006-05-09 20:55:12 +// $ANTLR 3.0ea8 C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g 2006-05-10 10:15:08 package org.drools.lang; import java.util.List; Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java =================================================================== --- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java 2006-05-09 22:08:11 UTC (rev 4163) +++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java 2006-05-10 00:22:53 UTC (rev 4164) @@ -1,4 +1,4 @@ -// $ANTLR 3.0ea8 C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g 2006-05-09 20:55:13 +// $ANTLR 3.0ea8 C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g 2006-05-10 10:15:09 package org.drools.lang; @@ -1345,8 +1345,8 @@ int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 48) ) { return ; } - // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1009:17: ( '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '|' | ',' | '{' | '}' | '[' | ']' | '=' | '/' | '(' | ')' | '\'' | '\\' | '||' | '&&' | '<<<' | '++' | '--' | '>>>' | '==' | '+=' | '=+' | '-=' | '=-' | '*=' | '=*' | '/=' | '=/' | '>>=' | '\u00c0' .. '\u00ff' ) - int alt1=39; + // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1009:17: ( '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '|' | ',' | '{' | '}' | '[' | ']' | '=' | '/' | '(' | ')' | '\'' | '\\' | '||' | '&&' | '<<<' | '++' | '--' | '>>>' | '==' | '+=' | '=+' | '-=' | '=-' | '*=' | '=*' | '/=' | '=/' | '>>=' ) + int alt1=38; switch ( input.LA(1) ) { case '!': alt1=1; @@ -1476,17 +1476,17 @@ case '>': int LA1_24 = input.LA(2); if ( LA1_24=='>' ) { - int LA1_46 = input.LA(3); - if ( LA1_46=='=' ) { + int LA1_45 = input.LA(3); + if ( LA1_45=='=' ) { alt1=38; } - else if ( LA1_46=='>' ) { + else if ( LA1_45=='>' ) { alt1=28; } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = - new NoViableAltException("1008:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' | \'\\u00c0\' .. \'\\u00ff\' );", 1, 46, input); + new NoViableAltException("1008:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 45, input); throw nvae; } @@ -1494,81 +1494,15 @@ else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = - new NoViableAltException("1008:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' | \'\\u00c0\' .. \'\\u00ff\' );", 1, 24, input); + new NoViableAltException("1008:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 24, input); throw nvae; } break; - case '\u00C0': - case '\u00C1': - case '\u00C2': - case '\u00C3': - case '\u00C4': - case '\u00C5': - case '\u00C6': - case '\u00C7': - case '\u00C8': - case '\u00C9': - case '\u00CA': - case '\u00CB': - case '\u00CC': - case '\u00CD': - case '\u00CE': - case '\u00CF': - case '\u00D0': - case '\u00D1': - case '\u00D2': - case '\u00D3': - case '\u00D4': - case '\u00D5': - case '\u00D6': - case '\u00D7': - case '\u00D8': - case '\u00D9': - case '\u00DA': - case '\u00DB': - case '\u00DC': - case '\u00DD': - case '\u00DE': - case '\u00DF': - case '\u00E0': - case '\u00E1': - case '\u00E2': - case '\u00E3': - case '\u00E4': - case '\u00E5': - case '\u00E6': - case '\u00E7': - case '\u00E8': - case '\u00E9': - case '\u00EA': - case '\u00EB': - case '\u00EC': - case '\u00ED': - case '\u00EE': - case '\u00EF': - case '\u00F0': - case '\u00F1': - case '\u00F2': - case '\u00F3': - case '\u00F4': - case '\u00F5': - case '\u00F6': - case '\u00F7': - case '\u00F8': - case '\u00F9': - case '\u00FA': - case '\u00FB': - case '\u00FC': - case '\u00FD': - case '\u00FE': - case '\u00FF': - alt1=39; - break; default: if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = - new NoViableAltException("1008:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' | \'\\u00c0\' .. \'\\u00ff\' );", 1, 0, input); + new NoViableAltException("1008:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 0, input); throw nvae; } @@ -1856,14 +1790,7 @@ } break; - case 39 : - // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1012:41: '\u00c0' .. '\u00ff' - { - matchRange('\u00c0','\u00ff'); if (failed) return ; - } - break; - } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } @@ -2372,10 +2299,10 @@ int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 55) ) { return ; } - // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:17: ( ('a'..'z'|'A'..'Z'|'_'|'$') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))* ) - // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:17: ('a'..'z'|'A'..'Z'|'_'|'$') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))* + // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:17: ( ('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff'))* ) + // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:17: ('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff'))* { - if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) { input.consume(); failed=false; } @@ -2386,21 +2313,21 @@ recover(mse); throw mse; } - // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:44: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))* + // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:65: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff'))* loop12: do { int alt12=2; int LA12_0 = input.LA(1); - if ( (LA12_0>='0' && LA12_0<='9')||(LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='z') ) { + if ( (LA12_0>='0' && LA12_0<='9')||(LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='z')||(LA12_0>='\u00C0' && LA12_0<='\u00FF') ) { alt12=1; } switch (alt12) { case 1 : - // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:45: ('a'..'z'|'A'..'Z'|'_'|'0'..'9') + // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:1047:66: ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff') { - if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) { input.consume(); failed=false; } @@ -3068,310 +2995,310 @@ return predict(input, s0); } DFA.State s1 = new DFA.State() {{alt=1;}}; - DFA.State s461 = new DFA.State() {{alt=2;}}; - DFA.State s52 = new DFA.State() {{alt=55;}}; - DFA.State s425 = new DFA.State() { + DFA.State s460 = new DFA.State() {{alt=2;}}; + DFA.State s51 = new DFA.State() {{alt=55;}}; + DFA.State s424 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_425 = input.LA(1); - if ( (LA16_425>='0' && LA16_425<='9')||(LA16_425>='A' && LA16_425<='Z')||LA16_425=='_'||(LA16_425>='a' && LA16_425<='z') ) {return s52;} - return s461; + int LA16_424 = input.LA(1); + if ( (LA16_424>='0' && LA16_424<='9')||(LA16_424>='A' && LA16_424<='Z')||LA16_424=='_'||(LA16_424>='a' && LA16_424<='z')||(LA16_424>='\u00C0' && LA16_424<='\u00FF') ) {return s51;} + return s460; } }; - DFA.State s382 = new DFA.State() { + DFA.State s381 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_382 = input.LA(1); - if ( LA16_382=='e' ) {return s425;} - return s52; + int LA16_381 = input.LA(1); + if ( LA16_381=='e' ) {return s424;} + return s51; } }; - DFA.State s322 = new DFA.State() { + DFA.State s321 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_322 = input.LA(1); - if ( LA16_322=='g' ) {return s382;} - return s52; + int LA16_321 = input.LA(1); + if ( LA16_321=='g' ) {return s381;} + return s51; } }; - DFA.State s245 = new DFA.State() { + DFA.State s244 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_245 = input.LA(1); - if ( LA16_245=='a' ) {return s322;} - return s52; + int LA16_244 = input.LA(1); + if ( LA16_244=='a' ) {return s321;} + return s51; } }; - DFA.State s162 = new DFA.State() { + DFA.State s161 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_162 = input.LA(1); - if ( LA16_162=='k' ) {return s245;} - return s52; + int LA16_161 = input.LA(1); + if ( LA16_161=='k' ) {return s244;} + return s51; } }; - DFA.State s54 = new DFA.State() { + DFA.State s53 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_54 = input.LA(1); - if ( LA16_54=='c' ) {return s162;} - return s52; + int LA16_53 = input.LA(1); + if ( LA16_53=='c' ) {return s161;} + return s51; } }; DFA.State s2 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_2 = input.LA(1); - if ( LA16_2=='a' ) {return s54;} - return s52; + if ( LA16_2=='a' ) {return s53;} + return s51; } }; - DFA.State s428 = new DFA.State() {{alt=3;}}; - DFA.State s385 = new DFA.State() { + DFA.State s427 = new DFA.State() {{alt=3;}}; + DFA.State s384 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_385 = input.LA(1); - if ( (LA16_385>='0' && LA16_385<='9')||(LA16_385>='A' && LA16_385<='Z')||LA16_385=='_'||(LA16_385>='a' && LA16_385<='z') ) {return s52;} - return s428; + int LA16_384 = input.LA(1); + if ( (LA16_384>='0' && LA16_384<='9')||(LA16_384>='A' && LA16_384<='Z')||LA16_384=='_'||(LA16_384>='a' && LA16_384<='z')||(LA16_384>='\u00C0' && LA16_384<='\u00FF') ) {return s51;} + return s427; } }; - DFA.State s325 = new DFA.State() { + DFA.State s324 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_325 = input.LA(1); - if ( LA16_325=='t' ) {return s385;} - return s52; + int LA16_324 = input.LA(1); + if ( LA16_324=='t' ) {return s384;} + return s51; } }; - DFA.State s248 = new DFA.State() { + DFA.State s247 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_248 = input.LA(1); - if ( LA16_248=='r' ) {return s325;} - return s52; + int LA16_247 = input.LA(1); + if ( LA16_247=='r' ) {return s324;} + return s51; } }; - DFA.State s165 = new DFA.State() { + DFA.State s164 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_165 = input.LA(1); - if ( LA16_165=='o' ) {return s248;} - return s52; + int LA16_164 = input.LA(1); + if ( LA16_164=='o' ) {return s247;} + return s51; } }; - DFA.State s57 = new DFA.State() { + DFA.State s56 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_57 = input.LA(1); - if ( LA16_57=='p' ) {return s165;} - return s52; + int LA16_56 = input.LA(1); + if ( LA16_56=='p' ) {return s164;} + return s51; } }; DFA.State s3 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_3 = input.LA(1); - if ( LA16_3=='m' ) {return s57;} - return s52; + if ( LA16_3=='m' ) {return s56;} + return s51; } }; - DFA.State s60 = new DFA.State() {{alt=5;}}; - DFA.State s61 = new DFA.State() {{alt=4;}}; + DFA.State s59 = new DFA.State() {{alt=5;}}; + DFA.State s60 = new DFA.State() {{alt=4;}}; DFA.State s4 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_4 = input.LA(1); - if ( LA16_4=='*' ) {return s60;} - return s61; + if ( LA16_4=='*' ) {return s59;} + return s60; } }; - DFA.State s486 = new DFA.State() {{alt=6;}}; - DFA.State s463 = new DFA.State() { + DFA.State s485 = new DFA.State() {{alt=36;}}; + DFA.State s462 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_463 = input.LA(1); - if ( (LA16_463>='0' && LA16_463<='9')||(LA16_463>='A' && LA16_463<='Z')||LA16_463=='_'||(LA16_463>='a' && LA16_463<='z') ) {return s52;} - return s486; + int LA16_462 = input.LA(1); + if ( (LA16_462>='0' && LA16_462<='9')||(LA16_462>='A' && LA16_462<='Z')||LA16_462=='_'||(LA16_462>='a' && LA16_462<='z')||(LA16_462>='\u00C0' && LA16_462<='\u00FF') ) {return s51;} + return s485; } }; - DFA.State s430 = new DFA.State() { + DFA.State s429 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_430 = input.LA(1); - if ( LA16_430=='r' ) {return s463;} - return s52; + int LA16_429 = input.LA(1); + if ( LA16_429=='s' ) {return s462;} + return s51; } }; - DFA.State s388 = new DFA.State() { + DFA.State s387 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_388 = input.LA(1); - if ( LA16_388=='e' ) {return s430;} - return s52; + int LA16_387 = input.LA(1); + if ( LA16_387=='e' ) {return s429;} + return s51; } }; - DFA.State s328 = new DFA.State() { + DFA.State s327 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_328 = input.LA(1); - if ( LA16_328=='d' ) {return s388;} - return s52; + int LA16_327 = input.LA(1); + if ( LA16_327=='d' ) {return s387;} + return s51; } }; - DFA.State s251 = new DFA.State() { + DFA.State s250 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_251 = input.LA(1); - if ( LA16_251=='n' ) {return s328;} - return s52; + int LA16_250 = input.LA(1); + if ( LA16_250=='u' ) {return s327;} + return s51; } }; - DFA.State s168 = new DFA.State() { + DFA.State s167 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_168 = input.LA(1); - if ( LA16_168=='a' ) {return s251;} - return s52; + int LA16_167 = input.LA(1); + if ( LA16_167=='l' ) {return s250;} + return s51; } }; - DFA.State s433 = new DFA.State() {{alt=42;}}; - DFA.State s391 = new DFA.State() { + DFA.State s432 = new DFA.State() {{alt=42;}}; + DFA.State s390 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_391 = input.LA(1); - if ( (LA16_391>='0' && LA16_391<='9')||(LA16_391>='A' && LA16_391<='Z')||LA16_391=='_'||(LA16_391>='a' && LA16_391<='z') ) {return s52;} - return s433; + int LA16_390 = input.LA(1); + if ( (LA16_390>='0' && LA16_390<='9')||(LA16_390>='A' && LA16_390<='Z')||LA16_390=='_'||(LA16_390>='a' && LA16_390<='z')||(LA16_390>='\u00C0' && LA16_390<='\u00FF') ) {return s51;} + return s432; } }; - DFA.State s331 = new DFA.State() { + DFA.State s330 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_331 = input.LA(1); - if ( LA16_331=='s' ) {return s391;} - return s52; + int LA16_330 = input.LA(1); + if ( LA16_330=='s' ) {return s390;} + return s51; } }; - DFA.State s254 = new DFA.State() { + DFA.State s253 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_254 = input.LA(1); - if ( LA16_254=='t' ) {return s331;} - return s52; + int LA16_253 = input.LA(1); + if ( LA16_253=='t' ) {return s330;} + return s51; } }; - DFA.State s169 = new DFA.State() { + DFA.State s168 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_169 = input.LA(1); - if ( LA16_169=='s' ) {return s254;} - return s52; + int LA16_168 = input.LA(1); + if ( LA16_168=='s' ) {return s253;} + return s51; } }; - DFA.State s488 = new DFA.State() {{alt=36;}}; - DFA.State s466 = new DFA.State() { + DFA.State s487 = new DFA.State() {{alt=6;}}; + DFA.State s465 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_466 = input.LA(1); - if ( (LA16_466>='0' && LA16_466<='9')||(LA16_466>='A' && LA16_466<='Z')||LA16_466=='_'||(LA16_466>='a' && LA16_466<='z') ) {return s52;} - return s488; + int LA16_465 = input.LA(1); + if ( (LA16_465>='0' && LA16_465<='9')||(LA16_465>='A' && LA16_465<='Z')||LA16_465=='_'||(LA16_465>='a' && LA16_465<='z')||(LA16_465>='\u00C0' && LA16_465<='\u00FF') ) {return s51;} + return s487; } }; - DFA.State s435 = new DFA.State() { + DFA.State s434 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_435 = input.LA(1); - if ( LA16_435=='s' ) {return s466;} - return s52; + int LA16_434 = input.LA(1); + if ( LA16_434=='r' ) {return s465;} + return s51; } }; - DFA.State s394 = new DFA.State() { + DFA.State s393 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_394 = input.LA(1); - if ( LA16_394=='e' ) {return s435;} - return s52; + int LA16_393 = input.LA(1); + if ( LA16_393=='e' ) {return s434;} + return s51; } }; - DFA.State s334 = new DFA.State() { + DFA.State s333 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_334 = input.LA(1); - if ( LA16_334=='d' ) {return s394;} - return s52; + int LA16_333 = input.LA(1); + if ( LA16_333=='d' ) {return s393;} + return s51; } }; - DFA.State s257 = new DFA.State() { + DFA.State s256 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_257 = input.LA(1); - if ( LA16_257=='u' ) {return s334;} - return s52; + int LA16_256 = input.LA(1); + if ( LA16_256=='n' ) {return s333;} + return s51; } }; - DFA.State s170 = new DFA.State() { + DFA.State s169 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_170 = input.LA(1); - if ( LA16_170=='l' ) {return s257;} - return s52; + int LA16_169 = input.LA(1); + if ( LA16_169=='a' ) {return s256;} + return s51; } }; - DFA.State s62 = new DFA.State() { + DFA.State s61 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { - case 'p': - return s168; + case 'c': + return s167; case 'i': + return s168; + + case 'p': return s169; - case 'c': - return s170; - default: - return s52; + return s51; } } }; - DFA.State s337 = new DFA.State() {{alt=44;}}; - DFA.State s260 = new DFA.State() { + DFA.State s336 = new DFA.State() {{alt=44;}}; + DFA.State s259 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_260 = input.LA(1); - if ( (LA16_260>='0' && LA16_260<='9')||(LA16_260>='A' && LA16_260<='Z')||LA16_260=='_'||(LA16_260>='a' && LA16_260<='z') ) {return s52;} - return s337; + int LA16_259 = input.LA(1); + if ( (LA16_259>='0' && LA16_259<='9')||(LA16_259>='A' && LA16_259<='Z')||LA16_259=='_'||(LA16_259>='a' && LA16_259<='z')||(LA16_259>='\u00C0' && LA16_259<='\u00FF') ) {return s51;} + return s336; } }; - DFA.State s173 = new DFA.State() { + DFA.State s172 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_173 = input.LA(1); - if ( LA16_173=='l' ) {return s260;} - return s52; + int LA16_172 = input.LA(1); + if ( LA16_172=='l' ) {return s259;} + return s51; } }; - DFA.State s63 = new DFA.State() { + DFA.State s62 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_63 = input.LA(1); - if ( LA16_63=='a' ) {return s173;} - return s52; + int LA16_62 = input.LA(1); + if ( LA16_62=='a' ) {return s172;} + return s51; } }; - DFA.State s263 = new DFA.State() {{alt=15;}}; - DFA.State s176 = new DFA.State() { + DFA.State s262 = new DFA.State() {{alt=15;}}; + DFA.State s175 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_176 = input.LA(1); - if ( (LA16_176>='0' && LA16_176<='9')||(LA16_176>='A' && LA16_176<='Z')||LA16_176=='_'||(LA16_176>='a' && LA16_176<='z') ) {return s52;} - return s263; + int LA16_175 = input.LA(1); + if ( (LA16_175>='0' && LA16_175<='9')||(LA16_175>='A' && LA16_175<='Z')||LA16_175=='_'||(LA16_175>='a' && LA16_175<='z')||(LA16_175>='\u00C0' && LA16_175<='\u00FF') ) {return s51;} + return s262; } }; - DFA.State s64 = new DFA.State() { + DFA.State s63 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_64 = input.LA(1); - if ( LA16_64=='d' ) {return s176;} - return s52; + int LA16_63 = input.LA(1); + if ( LA16_63=='d' ) {return s175;} + return s51; } }; @@ -3379,366 +3306,366 @@ public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case 'x': - return s62; + return s61; case 'v': - return s63; + return s62; case 'n': - return s64; + return s63; default: - return s52; + return s51; } } }; - DFA.State s438 = new DFA.State() {{alt=7;}}; - DFA.State s397 = new DFA.State() { + DFA.State s437 = new DFA.State() {{alt=7;}}; + DFA.State s396 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_397 = input.LA(1); - if ( (LA16_397>='0' && LA16_397<='9')||(LA16_397>='A' && LA16_397<='Z')||LA16_397=='_'||(LA16_397>='a' && LA16_397<='z') ) {return s52;} - return s438; + int LA16_396 = input.LA(1); + if ( (LA16_396>='0' && LA16_396<='9')||(LA16_396>='A' && LA16_396<='Z')||LA16_396=='_'||(LA16_396>='a' && LA16_396<='z')||(LA16_396>='\u00C0' && LA16_396<='\u00FF') ) {return s51;} + return s437; } }; - DFA.State s339 = new DFA.State() { + DFA.State s338 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_339 = input.LA(1); - if ( LA16_339=='l' ) {return s397;} - return s52; + int LA16_338 = input.LA(1); + if ( LA16_338=='l' ) {return s396;} + return s51; } }; - DFA.State s265 = new DFA.State() { + DFA.State s264 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_265 = input.LA(1); - if ( LA16_265=='a' ) {return s339;} - return s52; + int LA16_264 = input.LA(1); + if ( LA16_264=='a' ) {return s338;} + return s51; } }; - DFA.State s179 = new DFA.State() { + DFA.State s178 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_179 = input.LA(1); - if ( LA16_179=='b' ) {return s265;} - return s52; + int LA16_178 = input.LA(1); + if ( LA16_178=='b' ) {return s264;} + return s51; } }; - DFA.State s67 = new DFA.State() { + DFA.State s66 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_67 = input.LA(1); - if ( LA16_67=='o' ) {return s179;} - return s52; + int LA16_66 = input.LA(1); + if ( LA16_66=='o' ) {return s178;} + return s51; } }; DFA.State s6 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_6 = input.LA(1); - if ( LA16_6=='l' ) {return s67;} - return s52; + if ( LA16_6=='l' ) {return s66;} + return s51; } }; - DFA.State s355 = new DFA.State() {{alt=54;}}; - DFA.State s342 = new DFA.State() { + DFA.State s489 = new DFA.State() {{alt=8;}}; + DFA.State s468 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_342 = input.LA(1); - if ( (LA16_342>='0' && LA16_342<='9')||(LA16_342>='A' && LA16_342<='Z')||LA16_342=='_'||(LA16_342>='a' && LA16_342<='z') ) {return s52;} - return s355; + int LA16_468 = input.LA(1); + if ( (LA16_468>='0' && LA16_468<='9')||(LA16_468>='A' && LA16_468<='Z')||LA16_468=='_'||(LA16_468>='a' && LA16_468<='z')||(LA16_468>='\u00C0' && LA16_468<='\u00FF') ) {return s51;} + return s489; } }; - DFA.State s268 = new DFA.State() { + DFA.State s439 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_268 = input.LA(1); - if ( LA16_268=='e' ) {return s342;} - return s52; + int LA16_439 = input.LA(1); + if ( LA16_439=='n' ) {return s468;} + return s51; } }; - DFA.State s182 = new DFA.State() { + DFA.State s399 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_182 = input.LA(1); - if ( LA16_182=='s' ) {return s268;} - return s52; + int LA16_399 = input.LA(1); + if ( LA16_399=='o' ) {return s439;} + return s51; } }; - DFA.State s70 = new DFA.State() { + DFA.State s341 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_70 = input.LA(1); - if ( LA16_70=='l' ) {return s182;} - return s52; + int LA16_341 = input.LA(1); + if ( LA16_341=='i' ) {return s399;} + return s51; } }; - DFA.State s490 = new DFA.State() {{alt=8;}}; - DFA.State s469 = new DFA.State() { + DFA.State s267 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_469 = input.LA(1); - if ( (LA16_469>='0' && LA16_469<='9')||(LA16_469>='A' && LA16_469<='Z')||LA16_469=='_'||(LA16_469>='a' && LA16_469<='z') ) {return s52;} - return s490; + int LA16_267 = input.LA(1); + if ( LA16_267=='t' ) {return s341;} + return s51; } }; - DFA.State s440 = new DFA.State() { + DFA.State s181 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_440 = input.LA(1); - if ( LA16_440=='n' ) {return s469;} - return s52; + int LA16_181 = input.LA(1); + if ( LA16_181=='c' ) {return s267;} + return s51; } }; - DFA.State s402 = new DFA.State() { + DFA.State s69 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_402 = input.LA(1); - if ( LA16_402=='o' ) {return s440;} - return s52; + int LA16_69 = input.LA(1); + if ( LA16_69=='n' ) {return s181;} + return s51; } }; - DFA.State s345 = new DFA.State() { + DFA.State s354 = new DFA.State() {{alt=54;}}; + DFA.State s344 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_345 = input.LA(1); - if ( LA16_345=='i' ) {return s402;} - return s52; + int LA16_344 = input.LA(1); + if ( (LA16_344>='0' && LA16_344<='9')||(LA16_344>='A' && LA16_344<='Z')||LA16_344=='_'||(LA16_344>='a' && LA16_344<='z')||(LA16_344>='\u00C0' && LA16_344<='\u00FF') ) {return s51;} + return s354; } }; - DFA.State s271 = new DFA.State() { + DFA.State s270 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_271 = input.LA(1); - if ( LA16_271=='t' ) {return s345;} - return s52; + int LA16_270 = input.LA(1); + if ( LA16_270=='e' ) {return s344;} + return s51; } }; - DFA.State s185 = new DFA.State() { + DFA.State s184 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_185 = input.LA(1); - if ( LA16_185=='c' ) {return s271;} - return s52; + int LA16_184 = input.LA(1); + if ( LA16_184=='s' ) {return s270;} + return s51; } }; - DFA.State s71 = new DFA.State() { + DFA.State s70 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_71 = input.LA(1); - if ( LA16_71=='n' ) {return s185;} - return s52; + int LA16_70 = input.LA(1); + if ( LA16_70=='l' ) {return s184;} + return s51; } }; DFA.State s7 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { + case 'u': + return s69; + case 'a': return s70; - case 'u': - return s71; - default: - return s52; + return s51; } } }; - DFA.State s74 = new DFA.State() {{alt=9;}}; + DFA.State s73 = new DFA.State() {{alt=9;}}; DFA.State s8 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_8 = input.LA(1); - return s74; + return s73; } }; - DFA.State s75 = new DFA.State() {{alt=10;}}; + DFA.State s74 = new DFA.State() {{alt=10;}}; DFA.State s9 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_9 = input.LA(1); - return s75; + return s74; } }; - DFA.State s76 = new DFA.State() {{alt=11;}}; + DFA.State s75 = new DFA.State() {{alt=11;}}; DFA.State s10 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_10 = input.LA(1); - return s76; + return s75; } }; - DFA.State s77 = new DFA.State() {{alt=12;}}; + DFA.State s76 = new DFA.State() {{alt=12;}}; DFA.State s11 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_11 = input.LA(1); - return s77; + return s76; } }; - DFA.State s78 = new DFA.State() {{alt=13;}}; + DFA.State s77 = new DFA.State() {{alt=13;}}; DFA.State s12 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_12 = input.LA(1); - return s78; + return s77; } }; - DFA.State s405 = new DFA.State() {{alt=14;}}; - DFA.State s348 = new DFA.State() { + DFA.State s404 = new DFA.State() {{alt=14;}}; + DFA.State s347 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_348 = input.LA(1); - if ( (LA16_348>='0' && LA16_348<='9')||(LA16_348>='A' && LA16_348<='Z')||LA16_348=='_'||(LA16_348>='a' && LA16_348<='z') ) {return s52;} - return s405; + int LA16_347 = input.LA(1); + if ( (LA16_347>='0' && LA16_347<='9')||(LA16_347>='A' && LA16_347<='Z')||LA16_347=='_'||(LA16_347>='a' && LA16_347<='z')||(LA16_347>='\u00C0' && LA16_347<='\u00FF') ) {return s51;} + return s404; } }; - DFA.State s274 = new DFA.State() { + DFA.State s273 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_274 = input.LA(1); - if ( LA16_274=='y' ) {return s348;} - return s52; + int LA16_273 = input.LA(1); + if ( LA16_273=='y' ) {return s347;} + return s51; } }; - DFA.State s188 = new DFA.State() { + DFA.State s187 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_188 = input.LA(1); - if ( LA16_188=='r' ) {return s274;} - return s52; + int LA16_187 = input.LA(1); + if ( LA16_187=='r' ) {return s273;} + return s51; } }; - DFA.State s79 = new DFA.State() { + DFA.State s78 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_79 = input.LA(1); - if ( LA16_79=='e' ) {return s188;} - return s52; + int LA16_78 = input.LA(1); + if ( LA16_78=='e' ) {return s187;} + return s51; } }; DFA.State s13 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_13 = input.LA(1); - if ( LA16_13=='u' ) {return s79;} - return s52; + if ( LA16_13=='u' ) {return s78;} + return s51; } }; - DFA.State s351 = new DFA.State() {{alt=16;}}; - DFA.State s277 = new DFA.State() { + DFA.State s350 = new DFA.State() {{alt=16;}}; + DFA.State s276 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_277 = input.LA(1); - if ( (LA16_277>='0' && LA16_277<='9')||(LA16_277>='A' && LA16_277<='Z')||LA16_277=='_'||(LA16_277>='a' && LA16_277<='z') ) {return s52;} - return s351; + int LA16_276 = input.LA(1); + if ( (LA16_276>='0' && LA16_276<='9')||(LA16_276>='A' && LA16_276<='Z')||LA16_276=='_'||(LA16_276>='a' && LA16_276<='z')||(LA16_276>='\u00C0' && LA16_276<='\u00FF') ) {return s51;} + return s350; } }; - DFA.State s191 = new DFA.State() { + DFA.State s190 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_191 = input.LA(1); - if ( LA16_191=='e' ) {return s277;} - return s52; + int LA16_190 = input.LA(1); + if ( LA16_190=='e' ) {return s276;} + return s51; } }; - DFA.State s82 = new DFA.State() { + DFA.State s81 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_82 = input.LA(1); - if ( LA16_82=='l' ) {return s191;} - return s52; + int LA16_81 = input.LA(1); + if ( LA16_81=='l' ) {return s190;} + return s51; } }; DFA.State s14 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_14 = input.LA(1); - if ( LA16_14=='u' ) {return s82;} - return s52; + if ( LA16_14=='u' ) {return s81;} + return s51; } }; - DFA.State s353 = new DFA.State() {{alt=17;}}; - DFA.State s280 = new DFA.State() { + DFA.State s352 = new DFA.State() {{alt=17;}}; + DFA.State s279 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_280 = input.LA(1); - if ( (LA16_280>='0' && LA16_280<='9')||(LA16_280>='A' && LA16_280<='Z')||LA16_280=='_'||(LA16_280>='a' && LA16_280<='z') ) {return s52;} - return s353; + int LA16_279 = input.LA(1); + if ( (LA16_279>='0' && LA16_279<='9')||(LA16_279>='A' && LA16_279<='Z')||LA16_279=='_'||(LA16_279>='a' && LA16_279<='z')||(LA16_279>='\u00C0' && LA16_279<='\u00FF') ) {return s51;} + return s352; } }; - DFA.State s194 = new DFA.State() { + DFA.State s193 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_194 = input.LA(1); - if ( LA16_194=='n' ) {return s280;} - return s52; + int LA16_193 = input.LA(1); + if ( LA16_193=='n' ) {return s279;} + return s51; } }; - DFA.State s85 = new DFA.State() { + DFA.State s84 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_85 = input.LA(1); - if ( LA16_85=='e' ) {return s194;} - return s52; + int LA16_84 = input.LA(1); + if ( LA16_84=='e' ) {return s193;} + return s51; } }; DFA.State s15 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { int LA16_15 = input.LA(1); - if ( LA16_15=='h' ) {return s85;} - return s52; + if ( LA16_15=='h' ) {return s84;} + return s51; } }; DFA.State s16 = new DFA.State() {{alt=18;}}; - DFA.State s283 = new DFA.State() { + DFA.State s282 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_283 = input.LA(1); - if ( (LA16_283>='0' && LA16_283<='9')||(LA16_283>='A' && LA16_283<='Z')||LA16_283=='_'||(LA16_283>='a' && LA16_283<='z') ) {return s52;} - return s355; + int LA16_282 = input.LA(1); + if ( (LA16_282>='0' && LA16_282<='9')||(LA16_282>='A' && LA16_282<='Z')||LA16_282=='_'||(LA16_282>='a' && LA16_282<='z')||(LA16_282>='\u00C0' && LA16_282<='\u00FF') ) {return s51;} + return s354; } }; - DFA.State s197 = new DFA.State() { + DFA.State s196 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_197 = input.LA(1); - if ( LA16_197=='e' ) {return s283;} - return s52; + int LA16_196 = input.LA(1); + if ( LA16_196=='e' ) {return s282;} + return s51; } }; - DFA.State s88 = new DFA.State() { + DFA.State s87 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_88 = input.LA(1); - if ( LA16_88=='u' ) {return s197;} - return s52; + int LA16_87 = input.LA(1); + if ( LA16_87=='u' ) {return s196;} + return s51; } }; - DFA.State s357 = new DFA.State() {{alt=19;}}; - DFA.State s286 = new DFA.State() { + DFA.State s356 = new DFA.State() {{alt=19;}}; + DFA.State s285 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_286 = input.LA(1); - if ( (LA16_286>='0' && LA16_286<='9')||(LA16_286>='A' && LA16_286<='Z')||LA16_286=='_'||(LA16_286>='a' && LA16_286<='z') ) {return s52;} - return s357; + int LA16_285 = input.LA(1); + if ( (LA16_285>='0' && LA16_285<='9')||(LA16_285>='A' && LA16_285<='Z')||LA16_285=='_'||(LA16_285>='a' && LA16_285<='z')||(LA16_285>='\u00C0' && LA16_285<='\u00FF') ) {return s51;} + return s356; } }; - DFA.State s200 = new DFA.State() { + DFA.State s199 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_200 = input.LA(1); - if ( LA16_200=='n' ) {return s286;} - return s52; + int LA16_199 = input.LA(1); + if ( LA16_199=='n' ) {return s285;} + return s51; } }; - DFA.State s89 = new DFA.State() { + DFA.State s88 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_89 = input.LA(1); - if ( LA16_89=='e' ) {return s200;} - return s52; + int LA16_88 = input.LA(1); + if ( LA16_88=='e' ) {return s199;} + return s51; } }; @@ -3746,169 +3673,169 @@ public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case 'r': - return s88; + return s87; case 'h': - return s89; + return s88; default: - return s52; + return s51; } } }; - DFA.State s289 = new DFA.State() {{alt=40;}}; - DFA.State s203 = new DFA.State() { + DFA.State s288 = new DFA.State() {{alt=40;}}; + DFA.State s202 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_203 = input.LA(1); - if ( (LA16_203>='0' && LA16_203<='9')||(LA16_203>='A' && LA16_203<='Z')||LA16_203=='_'||(LA16_203>='a' && LA16_203<='z') ) {return s52;} - return s289; + int LA16_202 = input.LA(1); + if ( (LA16_202>='0' && LA16_202<='9')||(LA16_202>='A' && LA16_202<='Z')||LA16_202=='_'||(LA16_202>='a' && LA16_202<='z')||(LA16_202>='\u00C0' && LA16_202<='\u00FF') ) {return s51;} + return s288; } }; - DFA.State s92 = new DFA.State() { + DFA.State s91 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_92 = input.LA(1); - if ( LA16_92=='d' ) {return s203;} - return s52; + int LA16_91 = input.LA(1); + if ( LA16_91=='d' ) {return s202;} + return s51; } }; - DFA.State s504 = new DFA.State() {{alt=20;}}; - DFA.State s501 = new DFA.State() { + DFA.State s442 = new DFA.State() {{alt=25;}}; + DFA.State s406 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_501 = input.LA(1); - if ( (LA16_501>='0' && LA16_501<='9')||(LA16_501>='A' && LA16_501<='Z')||LA16_501=='_'||(LA16_501>='a' && LA16_501<='z') ) {return s52;} - return s504; + int LA16_406 = input.LA(1); + if ( LA16_406=='-' ) {return s442;} + return s51; } }; - DFA.State s492 = new DFA.State() { + DFA.State s358 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_492 = input.LA(1); - if ( LA16_492=='s' ) {return s501;} - return s52; + int LA16_358 = input.LA(1); + if ( LA16_358=='a' ) {return s406;} + return s51; } }; - DFA.State s472 = new DFA.State() { + DFA.State s290 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_472 = input.LA(1); - if ( LA16_472=='e' ) {return s492;} - return s52; + int LA16_290 = input.LA(1); + if ( LA16_290=='d' ) {return s358;} + return s51; } }; - DFA.State s443 = new DFA.State() { + DFA.State s205 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_443 = input.LA(1); - if ( LA16_443=='t' ) {return s472;} - return s52; + int LA16_205 = input.LA(1); + if ( LA16_205=='n' ) {return s290;} + return s51; } }; - DFA.State s407 = new DFA.State() { + DFA.State s92 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_407 = input.LA(1); - if ( LA16_407=='u' ) {return s443;} - return s52; + int LA16_92 = input.LA(1); + if ( LA16_92=='e' ) {return s205;} + return s51; } }; - DFA.State s359 = new DFA.State() { + DFA.State s503 = new DFA.State() {{alt=20;}}; + DFA.State s500 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_359 = input.LA(1); - if ( LA16_359=='b' ) {return s407;} - return s52; + int LA16_500 = input.LA(1); + if ( (LA16_500>='0' && LA16_500<='9')||(LA16_500>='A' && LA16_500<='Z')||LA16_500=='_'||(LA16_500>='a' && LA16_500<='z')||(LA16_500>='\u00C0' && LA16_500<='\u00FF') ) {return s51;} + return s503; } }; - DFA.State s291 = new DFA.State() { + DFA.State s491 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_291 = input.LA(1); - if ( LA16_291=='i' ) {return s359;} - return s52; + int LA16_491 = input.LA(1); + if ( LA16_491=='s' ) {return s500;} + return s51; } }; - DFA.State s206 = new DFA.State() { + DFA.State s471 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_206 = input.LA(1); - if ( LA16_206=='r' ) {return s291;} - return s52; + int LA16_471 = input.LA(1); + if ( LA16_471=='e' ) {return s491;} + return s51; } }; - DFA.State s93 = new DFA.State() { + DFA.State s445 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_93 = input.LA(1); - if ( LA16_93=='t' ) {return s206;} - return s52; + int LA16_445 = input.LA(1); + if ( LA16_445=='t' ) {return s471;} + return s51; } }; - DFA.State s446 = new DFA.State() {{alt=25;}}; - DFA.State s410 = new DFA.State() { + DFA.State s409 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_410 = input.LA(1); - if ( LA16_410=='-' ) {return s446;} - return s52; + int LA16_409 = input.LA(1); + if ( LA16_409=='u' ) {return s445;} + return s51; } }; - DFA.State s362 = new DFA.State() { + DFA.State s361 = new DFA.State() { public DFA.State transition(IntStream input) throws RecognitionException { - int LA16_362 = input.LA(1); - if ( LA16_362=='a' ) {return s410;} - return s52; + int LA16_361 = input.LA(1); + if ( LA16_361=='b' ) {return s409;} + ret... [truncated message content] |
From: <jbo...@li...> - 2006-05-09 22:08:20
|
Author: szimano Date: 2006-05-09 18:08:11 -0400 (Tue, 09 May 2006) New Revision: 4163 Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForge.jsp labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForgeNew.jsp Log: new page jsps Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForge.jsp =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForge.jsp 2006-05-09 21:23:49 UTC (rev 4162) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForge.jsp 2006-05-09 22:08:11 UTC (rev 4163) @@ -14,71 +14,27 @@ <link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/print.css" type="text/css" media="print"> <link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/common.css" type="text/css" media="all"> --> -<link rel="stylesheet" href="/jbossForge/screen.css" type="text/css" media="screen"> -<link rel="stylesheet" href="/jbossForge/print.css" type="text/css" media="print"> -<link rel="stylesheet" href="/jbossForge/common.css" type="text/css" media="all"> -<link rel="stylesheet" href="/jbossForge/jboss-forge.css" type="text/css" media="all"> -<link rel="stylesheet" href="/jbossForge/jboss-forge-forums.css" type="text/css" media="all"> -<link rel="stylesheet" href="/jbossForge/portlet.css" type="text/css" media="all"> +<link rel="stylesheet" href="/file-access/default/theme/css/screen.css" type="text/css" media="screen" /> +<link rel="stylesheet" href="/file-access/default/theme/css/print.css" type="text/css" media="print" /> +<link rel="stylesheet" href="/file-access/default/theme/css/common.css" type="text/css" media="all" /> +<link rel="stylesheet" href="/file-access/default/theme/css/jboss-forge.css" type="text/css" media="all" /> +<link rel="stylesheet" href="/file-access/default/theme/css/jboss-forge-forums.css" type="text/css" media="all" /> +<link rel="stylesheet" href="/file-access/default/theme/css/portlet.css" type="text/css" media="all" /> +<!-- <link rel="stylesheet" href="/file-access/default/theme/css/graphs.css" type="text/css" media="all" /> --> + +<link rel="stylesheet" href="/file-access/default/theme/css/podcasts.css" type="text/css" media="all" /> +<link rel="stylesheet" href="/file-access/default/theme/css/primates.css" type="text/css" media="all" /> +<link rel="stylesheet" href="/file-access/default/theme/css/blog.css" type="text/css" media="all" /> <!-- insert the dynamically determined theme elements here, or use the 'simple-sample' theme by default --> <!-- <p:theme themeName='jboss-forge' /> --> +<script type='text/javascript' language='JavaScript' src='/file-access/default/theme/js/elqNow/elqCfg.js'></script> +<script type='text/javascript' language='JavaScript' src='/file-access/default/theme/js/elqNow/elqImg.js'></script> -<SCRIPT TYPE='text/javascript' LANGUAGE='JavaScript' SRC='/jbossForge/elqNow/elqCfg.js'></SCRIPT> -<SCRIPT TYPE='text/javascript' LANGUAGE='JavaScript' SRC='/jbossForge/elqNow/elqImg.js'></SCRIPT> - <!-- speller script --> -<script src="/speller/pages/spellChecker.js"></script> +<script type='text/javascript' language='JavaScript' src="/speller/pages/spellChecker.js"></script> -<script> -// -// openSpellChecker() -// -// this function is an example that illustrates the various ways you can invoke -// the the Speller Pages spell-checking process -// -function openSpellChecker() { - - // example 1. - // Pass in the text inputs or textarea inputs that you - // want to spell-check to the object's constructor, - // then call the openChecker() method. - /*var text1 = document.form1.text1; - var textarea1 = document.form1.textarea1; - var speller = new spellChecker( text1, textarea1 ); - speller.openChecker();*/ - - // example 2. - // Rather than passing in the form elements to the object's - // constructor, populate the object's textInputs property, - // then call the openChecker() method. - - /* - var speller = new spellChecker(); - var spellerInputs = new Array(); - for( var i = 0 ; i < document.form1.elements.length; i++ ) { - if( document.form1.elements[i].type.match( /^text/ )) { - spellerInputs[spellerInputs.length] = document.form1.elements[i]; - } - } - speller.textInputs = spellerInputs; - speller.openChecker(); - */ - - // example 3. - // use the spellCheckAll() method to check every text input - // and textarea input in every form in the HTML document. - // You can also use the checkTextBoxes() method or checkTextAreas() - // method instead of spellCheckAll() to check only text inputs - // or textarea inputs, respectively - - var speller = new spellChecker(); - speller.spellCheckAll(); - -} - -</script> - +<script type='text/javascript' language='JavaScript' src='/file-access/default/theme/js/speller.js'></script> <!-- end speller script --> </head> @@ -91,7 +47,7 @@ <div class="brand_FED" id="container"> <div id="TopLogo"> - <img src="http://jboss.com/themes/jbosstheme/img/logo.gif" alt="JBoss - The Professional Open Source Company"> + <img src="http://jboss.com/themes/jbosstheme/img/logo.gif" alt="JBoss - The Professional Open Source Company" /> </div> <div id="TopMenu"> <table cellpadding="0" cellspacing="0"> @@ -106,13 +62,23 @@ <div id="ControlMenu"> <form id="TopSearch" action="http://www.jboss.com/search.jsp"> <ul> - <li><a href="/portal/authsec">Login</a></li> + <li><a href="<% + + String url = request.getRequestURL().append((request.getQueryString() != null && request.getQueryString().length() > 0) ? "?" + request.getQueryString() : "").toString(); + + if (url.contains("/authsec") || url.contains("/auth")) { + out.print(url); + } + else { + out.print(url.replace("/portal","/portal/authsec")); + }%>">Login</a></li> + <li><a href="http://www.jboss.com/index.html?op=checkage&module=user">Register</a></li> <li><a href="http://www.jboss.com/careers">Careers</a></li> <li><a href="http://www.jboss.com/company/contact">Contact Us</a></li> <li> <input style="border: 1px solid #6e6e6e; font: 10px Verdana, Helvetica, Arial, sans-serif; padding-left: 2px; margin-left: 10px;" name="query" onfocus="SearchFocus(this)" onblur="SearchBlur(this)" value="Search..." /> - <input class="searchbutton" type="image" src="/jbossForge/images/spacer.gif" value="go" align="middle" /> + <input class="searchbutton" type="image" src="/file-access/default/theme/images/spacer.gif" value="go" align="middle" /> </li> </ul> </form> @@ -122,20 +88,25 @@ <!-- main page table --> <table id="BodyTable" border="0" cellpadding="0" cellspacing="0"> -<tbody><tr> - <td colspan="2" class="topheader"></td> - </tr> - <tr> - <td class="leftside"><p:region regionName='left'/></td> - <td class="bodycell"><p:region regionName='center'/></td> - <td ><p:region regionName='right'/></td> - -</tr> -</tbody></table> +<tbody> + <tr> + <td colspan="4" class="topheader"></td> + </tr> + <tr> + <td class="leftside" rowspan="2"><p:region regionName='left'/></td> + <td class="bodycell" colspan="2"><p:region regionName='center'/></td> + <td class="rightside" rowspan="2"><p:region regionName='right'/></td> + </tr> + <tr> + <td class="innerleft"><p:region regionName='innerleft'/></td> + <td class="innerright"><p:region regionName='innerright'/></td> + </tr> +</tbody> +</table> <div id="jbfPageFooter"> <div id="Copyright"> - JBoss is a registered trademark and servicemark of JBoss Inc. 2002-2005 JBoss Inc. All rights reserved.<br> + JBoss is a registered trademark and servicemark of JBoss Inc. 2002-2005 JBoss Inc. All rights reserved.<br /> Theme made by <a href="http://mamut.net.pl">Szimano</a> </div> </div> Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForgeNew.jsp =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForgeNew.jsp 2006-05-09 21:23:49 UTC (rev 4162) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-theme/jbossForgeLayout.war/layouts/jbossForgeNew.jsp 2006-05-09 22:08:11 UTC (rev 4163) @@ -6,7 +6,7 @@ Distributable under LGPL license. See terms of license at gnu.org. --> -<head><title>JBoss.ORG</title> +<head><title>JBoss Labs</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <!-- changed to local CSS for now @@ -20,14 +20,12 @@ <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/jboss-forge.css" type="text/css" media="all" /> <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/jboss-forge-forums.css" type="text/css" media="all" /> <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/portlet.css" type="text/css" media="all" /> -<link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/graphs.css" type="text/css" media="all" /> +<!-- <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/graphs.css" type="text/css" media="all" /> --> <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/podcasts.css" type="text/css" media="all" /> <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/primates.css" type="text/css" media="all" /> <link rel="stylesheet" href="/jbossForge/repo-access/default/theme/css/blog.css" type="text/css" media="all" /> -<link rel="alternate" type="rss+xml" title="RSS" href="/feeds/all/rss2" /> - <script type='text/javascript' language='JavaScript' src='/jbossForge/repo-access/default/theme/js/elqNow/elqCfg.js'></script> <script type='text/javascript' language='JavaScript' src='/jbossForge/repo-access/default/theme/js/elqNow/elqImg.js'></script> @@ -95,13 +93,13 @@ <div class="brand_FED" id="container"> <div id="TopLogo"> - <a href="/portal"><img src="/jbossForge/repo-access/default/theme/images/JBossORG-Medium.gif" alt="JBoss - The Professional Open Source Company" /></a> + <img src="/jbossForge/repo-access/default/theme/images/JBossORG-Medium.gif" alt="JBoss - The Professional Open Source Company" /> </div> <div id="TopMenu"> <table cellpadding="0" cellspacing="0"> <tbody><tr> - <td class="menu_JBnetwork"><a href="http://network.jboss.com/"><img src="/jbossForge/repo-access/default/theme/images/TopSupportButton.gif" alt="Support" border="0" /></a></td> + <td class="menu_JBnetwork"><a href="http://network.jboss.com/"><img src="/jbossForge/repo-access/default/theme/images/JBossONButton.gif" alt="JBossON" border="0" /></a></td> <td class="menu_JBjems"><a href="http://www.jboss.com/products/index"><img src="/jbossForge/repo-access/default/theme/images/JEMSProductsButton.gif" alt="JEMS Products" border="0" /></a></td> <td class="menu_JBcom"><a href="http://www.jboss.com/index"><img src="/jbossForge/repo-access/default/theme/images/JBossCOMButton.gif" alt="JBoss.com" border="0" /></a></td> <td class="menu_JBfed"><a href="http://www.jboss.com/federation/index"><img src="/jbossForge/repo-access/default/theme/images/JBossORGButton.gif" alt="JBoss.ORG" border="0" /></a></td> @@ -130,12 +128,12 @@ </tr> <tr> <td class="leftside"> - <p:region regionName='left'/> + <p:region regionName='left' regionID='left'/> <!-- 'right' is historic name - nowe it's placed under navigation and ads --> <p:region regionName='right'/> </td> <td class="bodycell"> - <p:region regionName='center'/> + <p:region regionName='center' regionID='center'/> </td> </tr> @@ -148,4 +146,4 @@ </div> </div> -</div></body></html> +</div></body></html> \ No newline at end of file |
Author: soh...@jb... Date: 2006-05-09 17:23:49 -0400 (Tue, 09 May 2006) New Revision: 4162 Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/ForumUtil.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/category/viewcategory_body.xhtml Log: http://jira.jboss.com/jira/browse/JBFORUMS-72 - Display a Category of Forums Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/ForumUtil.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/ForumUtil.java 2006-05-09 20:36:08 UTC (rev 4161) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/ForumUtil.java 2006-05-09 21:23:49 UTC (rev 4162) @@ -22,6 +22,7 @@ package org.jboss.portlet.forums.ui; import java.text.DecimalFormat; +import java.util.Date; import javax.portlet.ActionRequest; @@ -75,4 +76,21 @@ return percent; } + + /** + * + * + */ + public static String getDateStr(Date date) + { + String dateStr = ""; + + if(date!=null) + { + dateStr = PortalUtil.getSDF().format(date); + } + + + return dateStr; + } } Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml 2006-05-09 20:36:08 UTC (rev 4161) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml 2006-05-09 21:23:49 UTC (rev 4162) @@ -61,7 +61,15 @@ <function-signature>java.lang.String getPercentStr(double)</function-signature> </function> + <!-- + --> + <function> + <function-name>dateStr</function-name> + <function-class>org.jboss.portlet.forums.ui.ForumUtil</function-class> + <function-signature>java.lang.String getDateStr(java.util.Date)</function-signature> + </function> + <!-- application specific functions --> <!-- function calculates the vote percent for the specified poll option Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/category/viewcategory_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/category/viewcategory_body.xhtml 2006-05-09 20:36:08 UTC (rev 4161) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/category/viewcategory_body.xhtml 2006-05-09 21:23:49 UTC (rev 4162) @@ -90,21 +90,32 @@ <!-- display last post information for this forum --> <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall"> - <c:if test="#{forumrow.lastPost!=null}"> - <!-- TODO: hookup real data here...need to extract out the hardcoded html code from the original portlet --> - ${forumrow.lastPost.createDate}<br/> - <c:if test="#{category.anonymous}"> - POSTER_INFO - </c:if> - <c:if test="#{!category.anonymous}"> - ${forumrow.lastPost.poster.user.userName} - </c:if> - <!-- TODO: LINK TO LAST POST NEEDED --> - <a href="link to lastPost"><img border="0" src="#{forums:themeURL('resourceIconLatestReplyURL')}"/></a> - </c:if> - <c:if test="#{forumrow.lastPost==null}"> - #{resource.No_Posts} - </c:if> + <c:choose> + <c:when test="#{forumrow.lastPost!=null}"> + #{forums:dateStr(forumrow.lastPost.createDate)} + <br/> + <c:choose> + <c:when test="#{category.anonymous}"> + ${forumrow.lastPost.poster.user.userName} + </c:when> + <c:otherwise> + <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}"> + <f:param name="uid" value="#{forumrow.lastPost.poster.user.id}"/> + <h:outputText value="${forumrow.lastPost.poster.user.userName}"/> + </h:outputLink> + </c:otherwise> + </c:choose> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" style="text-decoration: none;"> + <f:param name="t" value="#{forumrow.lastPost.topic.id}"/> + <f:verbatim> + <img border="0" src="#{forums:themeURL('resourceIconLatestReplyURL')}"/> + </f:verbatim> + </h:outputLink> + </c:when> + <c:otherwise> + #{resource.No_Posts} + </c:otherwise> + </c:choose> </span> </td> </tr> |
From: <jbo...@li...> - 2006-05-09 20:36:18
|
Author: szimano Date: 2006-05-09 16:36:08 -0400 (Tue, 09 May 2006) New Revision: 4161 Added: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/CharResponseWrapper.java labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/TitleChangeFilter.java labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/src/app/META-INF/jboss-service.xml Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/project.xml labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/to-copy/jboss-portal.sar/portal-server.war/WEB-INF/web.xml labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/project.properties Log: JBLAB-669 modifications to get title and timestamnp work in 2.0 Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/project.xml =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/project.xml 2006-05-09 18:25:59 UTC (rev 4160) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/project.xml 2006-05-09 20:36:08 UTC (rev 4161) @@ -38,6 +38,13 @@ </dependency> <dependency> + <groupId>shotoku</groupId> + <artifactId>shotoku-base</artifactId> + <version>1.0</version> + <jar>shotoku-base.jar</jar> + </dependency> + + <dependency> <groupId>jboss</groupId> <artifactId>jboss-common</artifactId> <version>1.0</version> Added: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/CharResponseWrapper.java =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/CharResponseWrapper.java 2006-05-09 18:25:59 UTC (rev 4160) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/CharResponseWrapper.java 2006-05-09 20:36:08 UTC (rev 4161) @@ -0,0 +1,45 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.forge.portal; + +import java.io.CharArrayWriter; +import java.io.PrintWriter; + +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServletResponseWrapper; + +public class CharResponseWrapper extends HttpServletResponseWrapper { + private CharArrayWriter output; + + public String toString() { + return output.toString(); + } + + public CharResponseWrapper(HttpServletResponse response) { + super(response); + output = new CharArrayWriter(); + } + + public PrintWriter getWriter() { + return new PrintWriter(output); + } +} Added: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/TitleChangeFilter.java =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/TitleChangeFilter.java 2006-05-09 18:25:59 UTC (rev 4160) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/src/java/org/jboss/forge/portal/TitleChangeFilter.java 2006-05-09 20:36:08 UTC (rev 4161) @@ -0,0 +1,137 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.forge.portal; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.jboss.shotoku.ContentManager; +import org.jboss.shotoku.Node; +import org.jboss.shotoku.exceptions.RepositoryException; +import org.jboss.shotoku.exceptions.ResourceDoesNotExist; + +public class TitleChangeFilter implements Filter { + + private static final String TITLE_START_TAG = "<title>"; + + private static final String TITLE_END_TAG = "</title>"; + + private static final String PORTAL_CONTEXT = "/portal/"; + + private static final String SHOT_PREF = "/default/members/"; + + private static final String FREEZONE = "/freezone"; + + public void init(FilterConfig conf) throws ServletException { + + } + + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + + HttpServletResponse hResp = (HttpServletResponse) response; + HttpServletRequest hReq = (HttpServletRequest)request; + + String uri = hReq.getRequestURI(); + + setTimestamp(uri, hResp); + + CharResponseWrapper wrapper = new CharResponseWrapper( + (HttpServletResponse) response); + chain.doFilter(request, wrapper); + + if (wrapper.getContentType().startsWith("text/html")) { + + PrintWriter out = response.getWriter(); + + out.write(changePageTitle(wrapper.toString())); + + out.close(); + } + } + + private void setTimestamp(String uri, HttpServletResponse resp) { + if (uri.startsWith(PORTAL_CONTEXT)) { + uri = uri.substring(PORTAL_CONTEXT.length()); + + if (uri.indexOf('/') != -1) { + StringBuffer uriBuffer = new StringBuffer(uri); + uriBuffer.insert(uri.indexOf('/'), FREEZONE); + + uriBuffer.insert(0, SHOT_PREF); + + uri = uriBuffer.toString(); + + try { + Node node = ContentManager.getContentManager().getNode(uri); + + resp.setDateHeader("Last-Modified", node.getLastModification()); + } catch (RepositoryException e) { + e.printStackTrace(); + } catch (ResourceDoesNotExist e) { + //it's not a shotoku element. ignore. + } + } + } + } + + public void destroy() { + + } + + private String changePageTitle(String content) { + String pageContent = content.toLowerCase(); + + int titleIndx = pageContent.indexOf(TITLE_START_TAG); + int titleEnd = pageContent.indexOf(TITLE_END_TAG, titleIndx); + + if (titleIndx != -1) { + int titleToUse; + int endOfTitleTag; + + if ((titleToUse = pageContent.indexOf(TITLE_START_TAG, + titleIndx + 1)) != -1 + && (endOfTitleTag = pageContent.indexOf(TITLE_END_TAG, + titleToUse + 1)) != -1 && titleEnd != endOfTitleTag) { + return content.substring(0, titleIndx + + TITLE_START_TAG.length()) + + content.substring(titleToUse + + TITLE_START_TAG.length(), endOfTitleTag) + + content.substring(titleEnd, + content.length() - 1); + } else { + return content; + } + } else { + return content; + } + } +} Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/to-copy/jboss-portal.sar/portal-server.war/WEB-INF/web.xml =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/to-copy/jboss-portal.sar/portal-server.war/WEB-INF/web.xml 2006-05-09 18:25:59 UTC (rev 4160) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-portal-attr/to-copy/jboss-portal.sar/portal-server.war/WEB-INF/web.xml 2006-05-09 20:36:08 UTC (rev 4161) @@ -4,8 +4,18 @@ "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <description>JBoss Portal</description> - + <!-- Title and timestamp Change --> + <filter> + <filter-name>titleFilter</filter-name> + <filter-class>org.jboss.forge.portal.TitleChangeFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>titleFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <!-- The server manager located by the main servlet. --> <context-param> <param-name>org.jboss.portal.server#SERVER_MANAGER</param-name> Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/project.properties =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/project.properties 2006-05-09 18:25:59 UTC (rev 4160) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/project.properties 2006-05-09 20:36:08 UTC (rev 4161) @@ -4,4 +4,4 @@ maven.ejb.excludes=**/*Listener*,**/listener maven.war.classes.excludes=**/*Bean* -shotoku.ear.dir=00shotoku.ear \ No newline at end of file +shotoku.ear.dir=00shotoku.sar Added: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/src/app/META-INF/jboss-service.xml =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/src/app/META-INF/jboss-service.xml 2006-05-09 18:25:59 UTC (rev 4160) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/shotoku/shotoku-svn/src/app/META-INF/jboss-service.xml 2006-05-09 20:36:08 UTC (rev 4161) @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> +<server> +</server> |
Author: soh...@jb... Date: 2006-05-09 13:01:41 -0400 (Tue, 09 May 2006) New Revision: 4159 Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/delete_poll.xhtml Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/NewTopic.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PollController.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml Log: http://jira.jboss.com/jira/browse/JBFORUMS-68 - Delete the poll on the topic Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java 2006-05-09 17:01:41 UTC (rev 4159) @@ -120,6 +120,31 @@ * * */ + public String deletePoll() + { + String navState = null; + try + { + //cleanout poll related data from this controller + this.question = null; + this.options = new ArrayList(); + this.activeDuration = 0; + + navState = Constants.SUCCESS; + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + + return navState; + } + + + /** + * + * + */ public String execute() { String navState = null; Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/NewTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/NewTopic.java 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/NewTopic.java 2006-05-09 17:01:41 UTC (rev 4159) @@ -88,14 +88,7 @@ this.forumId = forumId; //get the poll title if one was specified - this.question = ForumUtil.getParameter(Constants.p_poll_title); - - //set the proper poll delete activation status - String activatePollDel = ForumUtil.getParameter(Constants.p_poll_delete); - if(activatePollDel!=null && activatePollDel.trim().length()>0) - { - this.deletePollActivated = true; - } + this.question = ForumUtil.getParameter(Constants.p_poll_title); } navState = Constants.START_NEW_TOPIC; Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PollController.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PollController.java 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PollController.java 2006-05-09 17:01:41 UTC (rev 4159) @@ -71,8 +71,7 @@ //dont process a vote return null; } - - + Topic topic = this.getForumsModule().findTopicById(new Integer(topicId)); Poll poll = topic.getPoll(); PollOption selectedOption = (PollOption)poll.getOptions().get(voteIndex); @@ -91,5 +90,5 @@ JSFUtil.handleException(e); } return navState; - } + } } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java 2006-05-09 17:01:41 UTC (rev 4159) @@ -58,9 +58,8 @@ protected String question = null; protected Collection options = new ArrayList(); protected int activeDuration = 0; - protected boolean deletePoll = false; - protected boolean deletePollActivated = false; + //attachment related view data protected String attachmentComment = null; protected UploadedFile attachment = null; @@ -195,36 +194,8 @@ { return this.options; } - + /** - * - * @return - */ - public boolean getDeletePoll() - { - return this.deletePoll; - } - - /** - * - * @param deletePoll - */ - public void setDeletePoll(boolean deletePoll) - { - this.deletePoll = deletePoll; - } - - /** - * - * @return - */ - public boolean isDeletePollActivated() - { - return this.deletePollActivated; - } - - - /** * @return Returns the attachmentComment. */ public String getAttachmentComment() @@ -356,8 +327,6 @@ this.question = null; this.options = new ArrayList(); this.activeDuration = 0; - this.deletePoll = false; - this.deletePollActivated = false; //cleanup attachment related data this.attachment = null; Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-09 17:01:41 UTC (rev 4159) @@ -215,6 +215,14 @@ <to-view-id>/views/topics/viewtopic_body.xhtml</to-view-id> </navigation-case> </navigation-rule> + <navigation-rule> + <from-view-id>/views/topics/delete_poll.xhtml</from-view-id> + <!-- represents delete of the selected poll was successfull --> + <navigation-case> + <from-outcome>success</from-outcome> + <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> + </navigation-case> + </navigation-rule> <!-- managedBean for the viewTopic usecase --> <managed-bean> @@ -283,5 +291,5 @@ <managed-bean-name>pollController</managed-bean-name> <managed-bean-class>org.jboss.portlet.forums.ui.action.PollController</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> - </managed-bean> + </managed-bean> </faces-config> \ No newline at end of file Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/delete_poll.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/delete_poll.xhtml 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/delete_poll.xhtml 2006-05-09 17:01:41 UTC (rev 4159) @@ -0,0 +1,61 @@ +<!-- +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +--> + +<div xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:c="http://java.sun.com/jstl/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:t="http://myfaces.apache.org/tomahawk" + xmlns:forums="http://www.jboss.com/products/jbossportal/forums" + class="bb" +> + +<ui:composition template="/views/common/common.xhtml"> +<ui:define name="mainContent"> + + <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0"> + <tr> + <th class="thHead" height="25" valign="middle"><span class="tableTitle">Information</span></th> + </tr> + <tr> + <td class="row1" align="center"> + <h:form> + <span class="gen"><br/> + Are you sure you want to delete this poll? + <br/><br/> + <h:commandButton type="submit" value="Yes" styleClass="mainoption" action="#{editPost.deletePoll}"/> + &nbsp;&nbsp; + <h:commandButton type="button" value="No" styleClass="liteoption" onclick="javascript:history.back();"/> + </span> + </h:form> + </td> + </tr> + </table> + + +</ui:define> +</ui:composition> + +</div> \ No newline at end of file Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml 2006-05-09 17:01:41 UTC (rev 4159) @@ -476,16 +476,13 @@ </td> </tr> - <c:if test="#{true}"> + <c:if test="#{editPost.pollPresent}"> <!-- poll ui --> <!-- TODO: security check to make sure this user has permission to "ADD/EDIT" "Poll" in the Post --> <!-- title --> <tr> <th class="thHead" colspan="2">${resource.Add_poll}</th> - </tr> - <tr> - <td class="row1" colspan="2"><span class="gensmall">${resource.Add_poll_explain}</span></td> - </tr> + </tr> <!-- setup poll question --> <tr> @@ -541,15 +538,13 @@ <!-- enable/disable delete option --> <!-- TODO: security check to make sure this user has permission to "EDIT" "Post" in the Forum --> - <c:if test="#{editPost.deletePollActivated}"> - <tr> - <td class="row1"><span class="gen"><b>${resource.Delete_poll}</b></span></td> - <td class="row2"> - <h:selectBooleanCheckbox value="#{editPost.deletePoll}"/> - </td> - </tr> - </c:if> - </c:if> + <tr> + <td colspan="2" align="center"> + <input type="button" value="${resource.Delete_poll}" + onclick="javascript:document.location='#{forums:outputLink('/views/topics/delete_poll.jsf',true)}';"/> + </td> + </tr> + </c:if> <!-- attachment ui --> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml 2006-05-09 16:29:16 UTC (rev 4158) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml 2006-05-09 17:01:41 UTC (rev 4159) @@ -540,20 +540,7 @@ </td> </tr> - - <!-- enable/disable delete option --> - <!-- TODO: security check to make sure this user has permission to "EDIT" "Post" in the Forum --> - <c:if test="#{newTopic.deletePollActivated}"> - <tr> - <td class="row1"><span class="gen"><b>${resource.Delete_poll}</b></span></td> - <td class="row2"> - <h:selectBooleanCheckbox value="#{newTopic.deletePoll}"/> - </td> - </tr> - </c:if> - - - + <!-- attachment ui --> <!-- TODO: security check to make sure this user has permission to "AddAttachmentInPost" --> <tr> |
Author: adamw Date: 2006-05-09 12:29:16 -0400 (Tue, 09 May 2006) New Revision: 4158 Added: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/test/ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/test/VariablesTest.java labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/MultiValueVariableResolver.java labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/Substitution.java labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/TypeVariableResolver.java labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/VariableResolver.java Modified: labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/FeedsDescriptor.java Log: http://jira.jboss.com/jira/browse/JBSHOTOKU-36 Modified: labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml =================================================================== --- labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml 2006-05-09 16:29:16 UTC (rev 4158) @@ -16,6 +16,7 @@ <orderEntry type="library" name="jboss" level="application" /> <orderEntry type="library" name="commons" level="application" /> <orderEntry type="library" name="velocity" level="application" /> + <orderEntry type="library" name="junit" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/FeedsDescriptor.java =================================================================== --- labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/FeedsDescriptor.java 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/FeedsDescriptor.java 2006-05-09 16:29:16 UTC (rev 4158) @@ -42,9 +42,7 @@ import org.apache.velocity.VelocityContext; import org.apache.xerces.parsers.DOMParser; -import org.jboss.shotoku.feeds.FeedsHelper; import org.jboss.shotoku.tools.XmlTools; -import org.jboss.shotoku.feeds.SiteHelper; import org.jboss.logging.Logger; import org.jboss.shotoku.ContentManager; import org.jboss.shotoku.tools.Pair; @@ -103,8 +101,8 @@ @CacheItem private static FeedsCache feedsCache; - static synchronized FeedsDescriptor getInstance(final String baseServerAddress) { - return feedsCache.get(baseServerAddress); + static synchronized FeedsDescriptor getInstance(String id, String baseServerAddress) { + return feedsCache.get(new Pair<String, String>(id, baseServerAddress)); } /** Added: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/test/VariablesTest.java =================================================================== --- labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/test/VariablesTest.java 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/test/VariablesTest.java 2006-05-09 16:29:16 UTC (rev 4158) @@ -0,0 +1,64 @@ +package org.jboss.shotoku.feeds.test; + +import junit.framework.TestCase; +import org.jboss.shotoku.feeds.variables.Substitution; +import org.jboss.shotoku.feeds.variables.VariableResolver; +import org.jboss.shotoku.feeds.variables.MultiValueVariableResolver; + +import java.util.Set; +import java.util.HashSet; + +/** + * @author Adam Warski (ad...@as...) + */ +public class VariablesTest extends TestCase { + public void testSubstitution1() { + Substitution sub = new Substitution(); + sub.add("xxx", "bbb"); + sub.add("ff", "m78"); + + assertEquals(sub.make("__xxx__ff__xxx"), "__bbb__m78__bbb"); + } + + public void testSubstitution2() { + Substitution sub = new Substitution(); + sub.add("${var1}", "213kf*@"); + sub.add("${var2}", "://&&.,"); + + assertEquals(sub.make("${var1}${var2}var1var2${var2}${var3}${var1}"), + "213kf*@://&&.,var1var2://&&.,${var3}213kf*@"); + + sub.add("${var3}", "#14';[]"); + + assertEquals(sub.make("${var1}${var2}var1var2${var2}${var3}${var1}"), + "213kf*@://&&.,var1var2://&&.,#14';[]213kf*@"); + } + + public void testMultiValResover() { + VariableResolver vr = new MultiValueVariableResolver() { + protected String getVarName() { + return "${var}"; + } + + protected String[] getValues() { + return new String[] { "a", "bb", "ccc" }; + } + }; + + Set<Substitution> subs = Substitution.newEmptySubstitionsSet(); + Set<String> vars = new HashSet<String>(); + vars.add("${var}"); + vr.expandSubstitutionsSet(vars, subs); + + Set<String> result = new HashSet<String>(); + + for (Substitution s : subs) { + result.add(s.make("xx${var}xx")); + } + + assertEquals(result.size(), 3); + assertTrue(result.contains("xxaxx")); + assertTrue(result.contains("xxbbxx")); + assertTrue(result.contains("xxcccxx")); + } +} Added: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/MultiValueVariableResolver.java =================================================================== --- labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/MultiValueVariableResolver.java 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/MultiValueVariableResolver.java 2006-05-09 16:29:16 UTC (rev 4158) @@ -0,0 +1,27 @@ +package org.jboss.shotoku.feeds.variables; + +import java.util.Set; +import java.util.HashSet; + +/** + * @author Adam Warski (ad...@as...) + */ +abstract public class MultiValueVariableResolver implements VariableResolver { + abstract protected String getVarName(); + abstract protected String[] getValues(); + + public void expandSubstitutionsSet(Set<String> variables, Set<Substitution> substitutions) { + Set<Substitution> newSubs = new HashSet<Substitution>(); + + for (Substitution s : substitutions) { + for (String value : getValues()) { + Substitution newSub = s.clone(); + newSub.add(getVarName(), value); + newSubs.add(newSub); + } + } + + substitutions.clear(); + substitutions.addAll(newSubs); + } +} Added: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/Substitution.java =================================================================== --- labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/Substitution.java 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/Substitution.java 2006-05-09 16:29:16 UTC (rev 4158) @@ -0,0 +1,66 @@ +package org.jboss.shotoku.feeds.variables; + +import java.util.regex.Pattern; +import java.util.regex.Matcher; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; + +/** + * Not thread-safe. + * @author Adam Warski (ad...@as...) + */ +public class Substitution implements Cloneable { + private Map<Pattern, String> substitutions; + + public Substitution() { + substitutions = new HashMap<Pattern, String>(); + } + + public void add(String pattern, String substitution) { + substitutions.put(Pattern.compile(Pattern.quote(pattern)), substitution); + } + + public String make(String original) { + StringBuffer result = new StringBuffer(original); + StringBuffer work = new StringBuffer(); + for (Map.Entry<Pattern, String> e : substitutions.entrySet()) { + Matcher m = e.getKey().matcher(result); + + work.setLength(0); + String replacement = e.getValue(); + while (m.find()) { + m.appendReplacement(work, replacement); + } + + m.appendTail(work); + + result.setLength(0); + result.append(work); + } + + return result.toString(); + } + + public Substitution clone() { + Substitution ret = null; + try { + ret = (Substitution) super.clone(); + } catch (CloneNotSupportedException e) { + // We know we support cloning. + } + ret.substitutions = new HashMap<Pattern, String>(substitutions); + + return ret; + } + + // --- + + public static Set<Substitution> newEmptySubstitionsSet() { + Set<Substitution> ret = new HashSet<Substitution>(); + ret.add(new Substitution()); + + return ret; + } +} Added: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/TypeVariableResolver.java =================================================================== --- labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/TypeVariableResolver.java 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/TypeVariableResolver.java 2006-05-09 16:29:16 UTC (rev 4158) @@ -0,0 +1,16 @@ +package org.jboss.shotoku.feeds.variables; + +/** + * @author Adam Warski (ad...@as...) + */ +public class TypeVariableResolver extends MultiValueVariableResolver { + private static final String[] values = { "rss2", "atom", "rdf" }; + + protected String getVarName() { + return "${type}"; + } + + protected String[] getValues() { + return values; + } +} Added: labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/VariableResolver.java =================================================================== --- labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/VariableResolver.java 2006-05-09 14:51:59 UTC (rev 4157) +++ labs/shotoku/trunk/shotoku-feeds/src/java/org/jboss/shotoku/feeds/variables/VariableResolver.java 2006-05-09 16:29:16 UTC (rev 4158) @@ -0,0 +1,20 @@ +package org.jboss.shotoku.feeds.variables; + +import java.util.Set; + +/** + * @author Adam Warski (ad...@as...) + */ +public interface VariableResolver { + /** + * Expands each substitution in the given substitutions set to expand + * some variables that are (1) contained in the variables set and + * (2) handled by this variable resolver. Expanded variables should be + * removed from the variables set. Only variables that are in the variables + * set should be expanded. + * @param variables All variables that should be expanded. + * @param substitutions Current substitutions, which are to be expanded. + */ + public void expandSubstitutionsSet(Set<String> variables, + Set<Substitution> substitutions); +} |
From: <jbo...@li...> - 2006-05-09 14:52:03
|
Author: jfr...@jb... Date: 2006-05-09 10:51:59 -0400 (Tue, 09 May 2006) New Revision: 4157 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: get it build on i686 (dev03). Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-09 14:10:32 UTC (rev 4156) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-09 14:51:59 UTC (rev 4157) @@ -67,6 +67,34 @@ " ADDFLAGS="-fPIC" ;; + dev03*) + EXTTYPE=static + ADDCONF="\ + --with-jpeg-dir \ + --with-png-dir \ + --with-freetype-dir \ + --with-t1lib=no \ + \ + --disable-libxml \ + --disable-dom \ + --disable-simplexml \ + --disable-soap \ + --disable-wddx \ + --disable-xmlreader \ + --disable-xmlwriter \ + --disable-xml \ + --with-xmlrpc=no \ + --without-pear \ + \ + --with-bz2=no \ + --with-xpm-dir=no \ + --with-ldap=no \ + --with-mysql=no \ + --with-mysqli=no \ + --with-pdo-mysql=no \ + " + ADDFLAGS="-I $JAVA_HOME/include/linux" + ;; *) EXTTYPE=static ADDCONF="\ @@ -196,6 +224,7 @@ (cd ../php5servlet gcc -c $ADDFLAGS \ + -I $JAVA_HOME/include \ -I $TOOLS/PHP/include/php/main \ -I $TOOLS/PHP/include/php/Zend \ -I $TOOLS/PHP/include/php/TSRM \ |
From: <jbo...@li...> - 2006-05-09 14:10:41
|
Author: kev...@jb... Date: 2006-05-09 10:10:32 -0400 (Tue, 09 May 2006) New Revision: 4156 Modified: labs/jbosstm/trunk/build.xml Log: Fixed build.xml for jbossjts target Modified: labs/jbosstm/trunk/build.xml =================================================================== --- labs/jbosstm/trunk/build.xml 2006-05-09 14:09:48 UTC (rev 4155) +++ labs/jbosstm/trunk/build.xml 2006-05-09 14:10:32 UTC (rev 4156) @@ -53,9 +53,7 @@ <target name="core" depends="install_core"/> - <target name="jbossjts" if="jts.present"> - <antcall target="init_integration"/> - <antcall target="install_jts"/> + <target name="jbossjts" if="jts.present" depends="init_integration, install_jts"> <antcall target="install_integration"/> </target> |
From: <jbo...@li...> - 2006-05-09 14:09:58
|
Author: kev...@jb... Date: 2006-05-09 10:09:48 -0400 (Tue, 09 May 2006) New Revision: 4155 Removed: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/jta/exceptions/InactiveTransactionException.java Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java Log: Backed out Mark's modifications Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java =================================================================== --- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2006-05-09 13:27:03 UTC (rev 4154) +++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2006-05-09 14:09:48 UTC (rev 4155) @@ -1,1553 +1,1552 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2006, JBoss Inc., and others contributors as indicated - * by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - * - * (C) 2005-2006, - * @author JBoss Inc. - */ -/* - * Copyright (C) 2002, - * - * Hewlett-Packard Arjuna Labs, - * Newcastle upon Tyne, - * Tyne and Wear, - * UK. - * - * $Id: TransactionImple.java 2342 2006-03-30 13:06:17Z kconner $ - */ - -package com.arjuna.ats.internal.jta.transaction.arjunacore; - -import com.arjuna.ats.internal.jta.xa.TxInfo; -import com.arjuna.ats.internal.jta.utils.*; -import com.arjuna.ats.internal.jta.utils.arjunacore.StatusConverter; -import com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple; -import com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord; - -import com.arjuna.ats.jta.utils.XAHelper; -import com.arjuna.ats.jta.xa.XidImple; -import com.arjuna.ats.jta.exceptions.InactiveTransactionException; -import com.arjuna.ats.jta.logging.*; -import com.arjuna.ats.jta.xa.XAModifier; - -import com.arjuna.ats.arjuna.coordinator.ActionStatus; -import com.arjuna.ats.arjuna.coordinator.BasicAction; -import com.arjuna.ats.arjuna.coordinator.AddOutcome; -import com.arjuna.ats.arjuna.common.*; - -import com.arjuna.common.util.logging.*; - -import javax.transaction.xa.*; - -import java.util.Hashtable; -import java.util.Enumeration; - -import javax.transaction.RollbackException; -import java.lang.IllegalStateException; - -/* - * Is given an AtomicAction, but uses the TwoPhaseCoordinator aspects of it - * to ensure that the thread association continues. - */ - -/** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.inactive - * [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The - * transaction is not active! - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.nullres - * [com.arjuna.ats.internal.jta.transaction.arjunacore.nullres] - * Resource paramater is null! - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.illresstate - * [com.arjuna.ats.internal.jta.transaction.arjunacore.illresstate] - * illegal resource state - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.notatomicaction - * [com.arjuna.ats.internal.jta.transaction.arjunacore.notatomicaction] - * Current transaction is not an AtomicAction! - */ - -public class TransactionImple implements javax.transaction.Transaction, - com.arjuna.ats.jta.transaction.Transaction -{ - - /* - * Only works with AtomicAction and TwoPhaseCoordinator. - */ - - /** - * Create a new transaction with the specified timeout. - */ - - public TransactionImple(int timeout) - { - _theTransaction = new AtomicAction(); - - _theTransaction.begin(timeout); - - _resources = new Hashtable(); - _duplicateResources = new Hashtable(); - _suspendCount = 0; - } - - /** - * Overloads Object.equals() - */ - - public boolean equals(Object obj) - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.equals"); - } - - if (obj == null) - return false; - - if (obj == this) - return true; - - if (obj instanceof TransactionImple) - { - /* - * If we can't get either coordinator to compare, then assume - * transactions are different. - */ - - try - { - TransactionImple tx = (TransactionImple) obj; - - return tx.get_uid().equals(_theTransaction.get_uid()); - } - catch (Exception e) - { - } - } - - return false; - } - - /** - * Return -1 if we fail. - */ - - public int hashCode() - { - if (_theTransaction == null) - return -1; - else - return _theTransaction.get_uid().hashCode(); - } - - /** - * The JTA specification is vague on whether the calling thread can have any - * transaction associated with it. It does say that it need not have the - * same transaction as this one. We could call suspend prior to making these - * calls, but for now we do nothing. - */ - - /** - * We should never throw a HeuristicRollbackException because if we get a - * HeuristicRollback from a resource, and can successfully rollback the - * other resources, this is then the same as having simply been forced to - * rollback the transaction during phase 1. - * - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate - * [com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate] - * Invalid transaction state - */ - - public void commit() throws javax.transaction.RollbackException, - javax.transaction.HeuristicMixedException, - javax.transaction.HeuristicRollbackException, - java.lang.SecurityException, javax.transaction.SystemException, - java.lang.IllegalStateException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.commit"); - } - - if (_theTransaction != null) - { - switch (status = _theTransaction.status()) - { - case ActionStatus.RUNNING: - case ActionStatus.ABORT_ONLY: - break; - default: - throw new InactiveTransactionException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - /* - * Call end on any suspended resources. If this fails, then the - * transaction will be rolled back. - */ - - if (!endSuspendedRMs()) - _theTransaction.preventCommit(); - - // use end of TwoPhaseCoordinator to avoid thread changes. - - int status = _theTransaction.end(true); - - TransactionImple.removeTransaction(this); - - switch (status) - { - case ActionStatus.COMMITTED: - case ActionStatus.COMMITTING: // in case of async commit - break; - case ActionStatus.H_MIXED: - throw new javax.transaction.HeuristicMixedException(); - case ActionStatus.H_HAZARD: - throw new javax.transaction.HeuristicMixedException(); - case ActionStatus.H_ROLLBACK: - case ActionStatus.ABORTED: - throw new RollbackException(); - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate")); - } - } - else - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - /** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus - * [com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus] - * Transaction rollback status is: - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed1 - * [com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed1] - * Ending suspended RMs failed when rolling back the transaction! - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed2 - * [com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed2] - * Ending suspended RMs failed when rolling back the transaction, - * but transaction rolled back. - */ - - public void rollback() throws java.lang.IllegalStateException, - java.lang.SecurityException, javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.rollback"); - } - - if (_theTransaction != null) - { - switch (_theTransaction.status()) - { - case ActionStatus.RUNNING: - case ActionStatus.ABORT_ONLY: - break; - default: - throw new InactiveTransactionException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - /* - * Call end on any suspended resources. If this fails, then there's - * not a lot else we can do because the transaction is about to roll - * back anyway! - */ - - boolean endSuspendedFailed = !endSuspendedRMs(); - - if (endSuspendedFailed) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed1"); - } - } - - int outcome = _theTransaction.cancel(); // use cancel of - // TwoPhaseCoordinator to - // avoid thread changes. - - TransactionImple.removeTransaction(this); - - switch (outcome) - { - case ActionStatus.ABORTED: - case ActionStatus.ABORTING: // in case of async rollback - break; - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus") - + ActionStatus.stringForm(outcome)); - } - - if (endSuspendedFailed) - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed2")); - } - else - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - public void setRollbackOnly() throws java.lang.IllegalStateException, - javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.setRollbackOnly"); - } - - if (_theTransaction != null) - { - if (!_theTransaction.preventCommit()) - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - else - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - public int getStatus () throws javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.getStatus"); - } - - int status = javax.transaction.Status.STATUS_NO_TRANSACTION; - - if (_theTransaction != null) - { - return StatusConverter.convert(_theTransaction.status()); - } - - return status; - } - - /** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.nullparam - * [com.arjuna.ats.internal.jta.transaction.arjunacore.nullparam] - * null synchronization parameter! - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.syncsnotallowed - * [com.arjuna.ats.internal.jta.transaction.arjunacore.syncsnotallowed] - * Synchronizations are not allowed! - */ - - public void registerSynchronization(javax.transaction.Synchronization sync) - throws javax.transaction.RollbackException, - java.lang.IllegalStateException, javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.registerSynchronization"); - } - - if (sync == null) - throw new javax.transaction.SystemException( - "TransactionImple.registerSynchronization - " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.nullparam")); - - if (_theTransaction != null) - { - SynchronizationImple s = new SynchronizationImple(sync); - - if (_theTransaction.addSynchronization(s) != AddOutcome.AR_ADDED) - { - int status = _theTransaction.status(); - - switch (status) - { - case ActionStatus.ABORTED: - throw new javax.transaction.RollbackException(); - case ActionStatus.CREATED: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.syncsnotallowed")); - } - } - } - else - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - /** - * This is the JTA compliant version of the method. However, you had better - * know that your XAResource and family are truly compliant implementations. - * If they aren't then we may fail gracefully (e.g., some versions of Oracle - * don't work with arbitrary Xid implementations!) - * - * If the family isn't compliant, then you should use the other method and - * pass through a relevant XAModifier, which should address the issues we - * have already come across. - */ - - public boolean enlistResource(XAResource xaRes) throws RollbackException, - IllegalStateException, javax.transaction.SystemException - { - return enlistResource(xaRes, null); - } - - /** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror - * [com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror] - * {0} - caught: {1} - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror[com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror] - * {0} setTransactionTimeout caught: {1} - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror - * [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] - * {0} - XAResource.start returned: {1} for {2} - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister - * [com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister] - * could not register transaction - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.xastart - * [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] {0} - - * caught: {1} for {2} - */ - - public boolean enlistResource(XAResource xaRes, Object[] params) - throws RollbackException, IllegalStateException, - javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.enlistResource ( " - + xaRes + " )"); - } - - if (xaRes == null) - throw new javax.transaction.SystemException( - "TransactionImple.enlistResource - " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.nullres")); - - int status = getStatus(); - - switch (status) - { - case javax.transaction.Status.STATUS_MARKED_ROLLBACK: - throw new RollbackException(); - case javax.transaction.Status.STATUS_ACTIVE: - break; - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - XAModifier theModifier = null; - - if (params != null) - { - if (params.length >= XAMODIFIER + 1) - { - if (params[XAMODIFIER] instanceof XAModifier) - { - theModifier = (XAModifier) params[XAMODIFIER]; - } - } - } - - try - { - /* - * For each transaction we maintain a list of resources registered - * with it. Each element on this list also contains a list of - * threads which have registered this resource, and what their XID - * was for that registration. - */ - - TxInfo info = null; - - /* - * Have we seen this specific resource instance before? Do this - * trawl first before checking the RM instance later. Saves time. - */ - - try - { - synchronized (this) - { - info = (TxInfo) _resources.get(xaRes); - - if (info == null) - { - /* - * Null info means it's not in the main resources list, - * but may be in the duplicates. - */ - - info = (TxInfo) _duplicateResources.get(xaRes); - } - } - - if (info != null) - { - switch (info.getState()) - { - case TxInfo.ASSOCIATION_SUSPENDED: - { - /* - * Have seen resource before, so do a resume. The - * Resource instance will still be registered with the - * transaction though. - */ - - int xaStartResume = ((theModifier == null) ? XAResource.TMRESUME - : theModifier.xaStartParameters(XAResource.TMRESUME)); - - xaRes.start(info.xid(), xaStartResume); - - info.setState(TxInfo.ASSOCIATED); - - synchronized (this) - { - _suspendCount--; - } - - return true; // already registered resource with this - // transaction! - } - case TxInfo.ASSOCIATED: - { - /* - * Already active on this transaction. - */ - - return true; - } - case TxInfo.NOT_ASSOCIATED: - { - /* - * Resource was associated, but was presumably delisted. - */ - - int xaStartJoin = ((theModifier == null) ? XAResource.TMJOIN - : theModifier.xaStartParameters(XAResource.TMJOIN)); - - xaRes.start(info.xid(), xaStartJoin); - - info.setState(TxInfo.ASSOCIATED); - - return true; - } - default: - { - // Note: this exception will be caught by our catch - // block - - throw new IllegalStateException( - "TransactionImple.enlistResource - " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.illresstate") - + ":" + info.getState()); - } - } - } - } - catch (IllegalStateException ex) - { - throw ex; // we threw it in the first place - } - catch (XAException exp) - { - if (info != null) - info.setState(TxInfo.FAILED); - - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror", new Object[] - { "TransactionImple.enlistResource", XAHelper.printXAErrorCode(exp) }); - } - - return false; - } - - // if (threadIsActive(xaRes)) - // return true; // this thread has already registered a resource for - // this db - - /* - * We definitely haven't seen this specific resource instance - * before, but that doesn't mean that we haven't seen the RM it is - * connected to. - */ - - Xid xid = null; - TxInfo existingRM = isNewRM(xaRes); - - if (existingRM == null) - { - /* - * New RM, so create xid with new branch. - */ - - boolean branchRequired = true; - - synchronized (this) - { - if (_resources.size() == 0)// first ever, so no need for - // branch - { - //branchRequired = false; - branchRequired = true; - } - } - - xid = createXid(branchRequired, theModifier); - - boolean associatedWork = false; - int retry = 20; - - /* - * If another process has (or is about to) create the same - * transaction association then we will probably get a failure - * during start with XAER_DUPID. We know this must be due to - * another server, since we keep track of our own registrations. - * So, if this happens we create a new transaction branch and - * try again. - * - * To save time we could always just create branches by default. - * - * Is there a benefit to a zero branch? - */ - - while (!associatedWork) - { - try - { - int xaStartNormal = ((theModifier == null) ? XAResource.TMNOFLAGS - : theModifier.xaStartParameters(XAResource.TMNOFLAGS)); - - xaRes.start(xid, xaStartNormal); - - int timeout = _theTransaction.getTimeout(); - - if (timeout > 0) - { - try - { - xaRes.setTransactionTimeout(timeout); - } - catch (XAException te) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror", new Object[] - { "TransactionImple.enlistResource", XAHelper.printXAErrorCode(te), xid }); - } - } - } - - associatedWork = true; - - _resources.put(xaRes, new TxInfo(xid)); - } - catch (XAException e) - { - // transaction already created by another server - - if ((e.errorCode == XAException.XAER_DUPID) - || (e.errorCode == XAException.XAER_RMERR)) - { - if (retry > 0) - xid = createXid(true, theModifier); - - retry--; - } - else - { - /* - * Can't do start, so set transaction to rollback - * only. - */ - - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror", new Object[] - { "TransactionImple.enlistResource", XAHelper.printXAErrorCode(e), xid }); - } - - markRollbackOnly(); - - throw e; - } - - if (retry < 0) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.enliststartfailed", new Object[] - { "TransactionImple.enlistResource", xid }); - } - - markRollbackOnly(); - - throw new javax.transaction.SystemException( - "TransactionImple.enlistResource - XAResource.start " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister") - + ": " + xid); - } - } - } - } - else - { - /* - * Have seen this RM before, so ignore this instance. The first - * registered RM instance will be used to drive the transaction - * completion. We add it to the duplicateResource list so we can - * delist it correctly later though. - */ - - /* - * Re-create xid. - */ - - xid = existingRM.xid(); - - try - { - int xaStartJoin = ((theModifier == null) ? XAResource.TMJOIN - : theModifier.xaStartParameters(XAResource.TMJOIN)); - - xaRes.start(xid, xaStartJoin); - } - catch (XAException ex) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.xastart", new Object[] - { "TransactionImple.enlistResource - xa_start ", XAHelper.printXAErrorCode(ex), xid }); - } - - markRollbackOnly(); - - throw ex; - } - - /* - * Add to duplicate resources list so we can keep track of it - * (particularly if we later have to delist). - */ - - _duplicateResources.put(xaRes, new TxInfo(xid)); - - return true; - } - - /* - * Control and Coordinator should be set, or we would not have - * gotten this far! - */ - - XAResourceRecord res = new XAResourceRecord(this, xaRes, xid, - params); - - if (_theTransaction.add(res) != AddOutcome.AR_ADDED) - { - markRollbackOnly(); - - return false; - } - else - return true; - } - catch (Exception e) - { - e.printStackTrace(); - - /* - * Some exceptional condition arose and we probably could not enlist - * the resouce. So, for safety mark the transaction as rollback - * only. - */ - - markRollbackOnly(); - - return false; - } - } - - /* - * Do we have to unregister resources? Assume not as it would not make much - * sense otherwise! - */ - - /** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.unknownresource - * [com.arjuna.ats.internal.jta.transaction.arjunacore.unknownresource] - * {0} - unknown resource - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.delistresource - * [com.arjuna.ats.internal.jta.transaction.arjunacore.delistresource] - * {0} - caught exception during delist : {1} - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.delistgeneral - * [com.arjuna.ats.internal.jta.transaction.arjunacore.delistgeneral] - * {0} caught exception {1} - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.ressuspended - * [com.arjuna.ats.internal.jta.transaction.arjunacore.ressuspended] - * resource already suspended. - */ - - public boolean delistResource(XAResource xaRes, int flags) - throws IllegalStateException, javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.delistResource ( " - + xaRes + " )"); - } - - if (xaRes == null) - throw new javax.transaction.SystemException( - "TransactionImple.delistResource - " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.nullres")); - - int status = getStatus(); - - switch (status) - { - case javax.transaction.Status.STATUS_ACTIVE: - break; - case javax.transaction.Status.STATUS_MARKED_ROLLBACK: - break; - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - - TxInfo info = null; - - try - { - synchronized (this) - { - info = (TxInfo) _resources.get(xaRes); - - if (info == null) - info = (TxInfo) _duplicateResources.get(xaRes); - } - - if (info == null) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.unknownresource", new Object[] - { "TransactionImple.delistResource" }); - } - - return false; - } - else - { - boolean optimizedRollback = false; - - try - { - /* - * If we know the transaction is going to rollback, then we - * can try to rollback the RM now. Just an optimisation. - */ - - if (status == javax.transaction.Status.STATUS_MARKED_ROLLBACK) - { - if (XAUtils.canOptimizeDelist(xaRes)) - { - xaRes.end(info.xid(), XAResource.TMFAIL); - xaRes.rollback(info.xid()); - - info.setState(TxInfo.OPTIMIZED_ROLLBACK); - - optimizedRollback = true; - } - } - } - catch (Exception e) - { - // failed, so try again when transaction does rollback - } - - switch (info.getState()) - { - case TxInfo.ASSOCIATED: - { - if ((flags & XAResource.TMSUCCESS) != 0) - { - xaRes.end(info.xid(), XAResource.TMSUCCESS); - info.setState(TxInfo.NOT_ASSOCIATED); - } - else - { - if ((flags & XAResource.TMSUSPEND) != 0) - { - xaRes.end(info.xid(), XAResource.TMSUSPEND); - info.setState(TxInfo.ASSOCIATION_SUSPENDED); - - synchronized (this) - { - _suspendCount++; - } - } - else - { - xaRes.end(info.xid(), XAResource.TMFAIL); - info.setState(TxInfo.FAILED); - } - } - } - break; - case TxInfo.ASSOCIATION_SUSPENDED: - { - if ((flags & XAResource.TMSUCCESS) != 0) - { - // Oracle barfs if we don't send resume first, despite - // what XA says! - - if (XAUtils.mustEndSuspendedRMs(xaRes)) - xaRes.start(info.xid(), XAResource.TMRESUME); - - xaRes.end(info.xid(), XAResource.TMSUCCESS); - info.setState(TxInfo.NOT_ASSOCIATED); - - synchronized (this) - { - _suspendCount--; - } - } - else - { - if ((flags & XAResource.TMSUSPEND) != 0) - { - // Note: this exception will be caught by our catch - // block - - throw new IllegalStateException( - "TransactionImple.delistResource - " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.ressuspended")); - } - else - { - xaRes.end(info.xid(), XAResource.TMFAIL); - info.setState(TxInfo.FAILED); - - synchronized (this) - { - _suspendCount--; - } - } - } - } - break; - default: - { - if (!optimizedRollback) - throw new IllegalStateException( - "TransactionImple.delistResource - " - + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.illresstate") - + ":" + info.getState()); - } - } - - info = null; - - return true; - } - } - catch (IllegalStateException ex) - { - throw ex; - } - catch (XAException exp) - { - if (info != null) - info.setState(TxInfo.FAILED); - - /* - * For safety mark the transaction as rollback only. - */ - - markRollbackOnly(); - - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.delistresource", new Object[] - { "TransactionImple.delistResource", XAHelper.printXAErrorCode(exp) }); - } - - return false; - } - catch (Exception e) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.delistgeneral", new Object[] - { "TransactionImple.delistResource", e }); - } - - /* - * Some exception occurred and we probably could not delist the - * resource. So, for safety mark the transaction as rollback only. - */ - - markRollbackOnly(); - - return false; - } - } - - public final Uid get_uid() - { - return _theTransaction.get_uid(); - } - - public String toString() - { - if (_theTransaction == null) - return "TransactionImple < ac, NoTransaction >"; - else - { - return "TransactionImple < ac, " + _theTransaction + " >"; - } - } - - public int getXAResourceState(XAResource xaRes) - { - int state = TxInfo.UNKNOWN; - - if (xaRes != null) - { - TxInfo info = (TxInfo) _resources.get(xaRes); - - if (info == null) - { - info = (TxInfo) _duplicateResources.get(xaRes); - } - - if (info != null) - state = info.getState(); - } - - return state; - } - - public static final TransactionImple getTransaction() - { - TransactionImple tx = null; - - final BasicAction current = BasicAction.Current() ; - if (current != null) - { - final Uid txid = current.get_uid(); - - tx = (TransactionImple) _transactions.get(txid); - if (tx == null) - tx = new TransactionImple(current) ; - } - - return tx; - } - - public static final TransactionImple getTransaction(Uid id) - { - try - { - if (id != null) - return (TransactionImple) _transactions.get(id); - else - return null; - } - catch (Exception e) - { - return new TransactionImple(null); - } - } - - protected TransactionImple () - { - this(null); - } - - /** - * Create a new TransactionImple representation of a specified - * transaction. - */ - - protected TransactionImple (BasicAction curr) - { - try - { - if (curr == null) - { - _theTransaction = (com.arjuna.ats.arjuna.AtomicAction) BasicAction.Current(); - } - else - _theTransaction = (com.arjuna.ats.arjuna.AtomicAction) curr; - } - catch (ClassCastException ex) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.notatomicaction"); - } - } - - if (_theTransaction != null) - { - _resources = new Hashtable(); - _duplicateResources = new Hashtable(); - } - else - { - _resources = null; - _duplicateResources = null; - } - - _suspendCount = 0; - } - - final com.arjuna.ats.arjuna.AtomicAction getAtomicAction() - { - return _theTransaction; - } - - /** - * Does the same as commit, but also changes the thread-to-tx association. - */ - - protected void commitAndDisassociate() - throws javax.transaction.RollbackException, - javax.transaction.HeuristicMixedException, - javax.transaction.HeuristicRollbackException, - java.lang.SecurityException, javax.transaction.SystemException, - java.lang.IllegalStateException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.commitAndDisassociate"); - } - - if (_theTransaction != null) - { - switch (_theTransaction.status()) - { - case ActionStatus.RUNNING: - case ActionStatus.ABORT_ONLY: - break; - default: - throw new InactiveTransactionException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - } - - try - { - if (_theTransaction != null) - { - switch (_theTransaction.commit(true)) - { - case ActionStatus.COMMITTED: - case ActionStatus.COMMITTING: // in case of async commit - break; - case ActionStatus.H_MIXED: - throw new javax.transaction.HeuristicMixedException(); - case ActionStatus.H_HAZARD: - throw new javax.transaction.HeuristicMixedException(); - case ActionStatus.H_ROLLBACK: - case ActionStatus.ABORTED: - throw new RollbackException(); - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate")); - } - } - else - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - catch (javax.transaction.HeuristicMixedException ex) - { - throw ex; - } - catch (RollbackException ex) - { - throw ex; - } - catch (IllegalStateException ex) - { - throw ex; - } - finally - { - TransactionImple.removeTransaction(this); - } - } - - /** - * If this is an imported transaction (via JCA) then this will be the Xid - * we are pretending to be. Otherwise, it will be null. - * - * @return null if we are a local transaction, a valid Xid if we have been - * imported. - */ - - protected Xid baseXid () - { - return null; - } - - /** - * Does the same as rollback, but also changes the thread-to-tx association. - */ - - protected void rollbackAndDisassociate() - throws java.lang.IllegalStateException, - java.lang.SecurityException, javax.transaction.SystemException - { - if (jtaLogger.logger.isDebugEnabled()) - { - jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.rollbackAndDisassociate"); - } - - if (_theTransaction != null) - { - switch (_theTransaction.status()) - { - case ActionStatus.RUNNING: - case ActionStatus.ABORT_ONLY: - break; - default: - throw new InactiveTransactionException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - } - - try - { - if (_theTransaction != null) - { - int outcome = _theTransaction.abort(); - - switch (outcome) - { - case ActionStatus.ABORTED: - case ActionStatus.ABORTING: // in case of async rollback - break; - default: - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus") - + ActionStatus.stringForm(outcome)); - } - } - else - throw new IllegalStateException( - jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); - } - catch (IllegalStateException ex) - { - throw ex; - } - finally - { - TransactionImple.removeTransaction(this); - } - } - - /** - * If there are any suspended RMs then we should call end on them before the - * transaction is terminated. - * - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.xaenderror - * [com.arjuna.ats.internal.jta.transaction.arjunacore.xaenderror] - * Could not call end on a suspended resource! - */ - - private boolean endSuspendedRMs() - { - boolean result = true; - - if (_suspendCount > 0) - { - Enumeration el = _resources.keys(); - - /* - * Loop over all registered resources. Those that are in a suspended - * state must have end called on them. If this fails, then we will - * eventually roll back the transaction, but we will continue down - * the list to try to end any other suspended resources. - */ - - if (el != null) - { - try - { - /* - * Would it gain us much to just loop for _suspendCount? - */ - - while (el.hasMoreElements()) - { - /* - * Get the XAResource in case we have to call end on it. - */ - - XAResource xaRes = (XAResource) el.nextElement(); - TxInfo info = (TxInfo) _resources.get(xaRes); - - if (info.getState() == TxInfo.ASSOCIATION_SUSPENDED) - { - if (XAUtils.mustEndSuspendedRMs(xaRes)) - xaRes.start(info.xid(), XAResource.TMRESUME); - - xaRes.end(info.xid(), XAResource.TMSUCCESS); - info.setState(TxInfo.NOT_ASSOCIATED); - } - } - } - catch (XAException ex) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.xaenderror"); - } - - result = false; - } - } - - _suspendCount = 0; - } - - return result; - } - - /* - * If this thread has already registered a resource for the same db then - * don't use this copy. For some databases it would actually be ok for us to - * use the resource (at least to do an xa_start equivalent on it), but for - * Oracle 8.1.6 it causes their JDBC driver to crash! - */ - - /** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.threadexception - * [com.arjuna.ats.internal.jta.transaction.arjunacore.threadexception] - * Caught the following error: {0} - */ - - private final boolean threadIsActive(XAResource xaRes) - { - Thread t = Thread.currentThread(); - - try - { - Enumeration el = _resources.keys(); - - if (el != null) - { - while (el.hasMoreElements()) - { - XAResource x = (XAResource) el.nextElement(); - - if (x.isSameRM(xaRes)) - { - TxInfo info = (TxInfo) _resources.get(x); - - if (info.thread() == t) - return true; - } - } - } - - el = _duplicateResources.keys(); - - if (el != null) - { - while (el.hasMoreElements()) - { - XAResource x = (XAResource) el.nextElement(); - - if (x.isSameRM(xaRes)) - { - TxInfo info = (TxInfo) _resources.get(x); - - if (info.thread() == t) - return true; - } - } - } - } - catch (Exception e) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.threadexception", new Object[] - { e }); - } - - throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString()); - } - - return false; - } - - /** - * isNewRM returns an existing TxInfo for the same RM, if present. Null - * otherwise. - * - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.newtmerror - * [com.arjuna.ats.internal.jta.transaction.arjunacore.newtmerror] - * {0} caught XAException: {0} - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.isnewrm - * [com.arjuna.ats.internal.jta.transaction.arjunacore.isnewrm] - * Caught unexpected exception: {0} - */ - - private final TxInfo isNewRM(XAResource xaRes) - { - try - { - synchronized (this) - { - Enumeration el = _resources.keys(); - - if (el != null) - { - while (el.hasMoreElements()) - { - XAResource x = (XAResource) el.nextElement(); - - if (x.isSameRM(xaRes)) - { - return (TxInfo) _resources.get(x); - } - } - } - - el = _duplicateResources.keys(); - - if (el != null) - { - while (el.hasMoreElements()) - { - XAResource x = (XAResource) el.nextElement(); - - if (x.isSameRM(xaRes)) - { - return (TxInfo) _duplicateResources.get(x); - } - } - } - } - } - catch (XAException ex) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.newtmerror", new Object[] - { "TransactionImple.isNewRM", XAHelper.printXAErrorCode(ex) }); - } - - throw new com.arjuna.ats.arjuna.exceptions.FatalError(ex.toString()); - } - catch (Exception e) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.newtmerror", new Object[] - { e }); - } - - throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString()); - } - - return null; - } - - private final Xid createXid(boolean branch, XAModifier theModifier) - { - Xid xid = baseXid(); - - if (xid != null) - return xid; - - xid = new XidImple(_theTransaction, branch); - - if (theModifier != null) - { - try - { - xid = theModifier.createXid((XidImple) xid); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - return xid; - } - - /* - * This method calls setRollbackOnly and catches any exceptions it may throw - * and issues a warning. We use this in places wherew we need to force the - * outcome of the transaction but already have an exception to throw back to - * the application, so a failure here will only be masked. - */ - - /** - * @message com.arjuna.ats.internal.jta.transaction.arjunacore.markrollback - * [com.arjuna.ats.internal.jta.transaction.arjunacore.markrollback] - * {0} - could not mark {0} as rollback only - */ - - private final void markRollbackOnly() - { - if (_theTransaction != null) - { - if (!_theTransaction.preventCommit()) - { - if (jtaLogger.loggerI18N.isWarnEnabled()) - { - jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.markrollback", new Object[] - { "TransactionImple.markRollbackOnly", _theTransaction }); - } - } - } - } - - /* - * Add and remove transactions from list. - */ - - static final protected void putTransaction(TransactionImple tx) - { - _transactions.put(tx.get_uid(), tx); - } - - static final protected void removeTransaction(TransactionImple tx) - { - _transactions.remove(tx.get_uid()); - } - - protected com.arjuna.ats.arjuna.AtomicAction _theTransaction; - - private Hashtable _resources; - private Hashtable _duplicateResources; - private int _suspendCount; - - private static Hashtable _transactions = new Hashtable(); - -} +/* + * JBoss, Home of Professional Open Source + * Copyright 2006, JBoss Inc., and others contributors as indicated + * by the @authors tag. All rights reserved. + * See the copyright.txt in the distribution for a + * full listing of individual contributors. + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License, v. 2.1. + * This program is distributed in the hope that it will be useful, but WITHOUT A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License, + * v.2.1 along with this distribution; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * (C) 2005-2006, + * @author JBoss Inc. + */ +/* + * Copyright (C) 2002, + * + * Hewlett-Packard Arjuna Labs, + * Newcastle upon Tyne, + * Tyne and Wear, + * UK. + * + * $Id: TransactionImple.java 2342 2006-03-30 13:06:17Z $ + */ + +package com.arjuna.ats.internal.jta.transaction.arjunacore; + +import com.arjuna.ats.internal.jta.xa.TxInfo; +import com.arjuna.ats.internal.jta.utils.*; +import com.arjuna.ats.internal.jta.utils.arjunacore.StatusConverter; +import com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple; +import com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord; + +import com.arjuna.ats.jta.utils.XAHelper; +import com.arjuna.ats.jta.xa.XidImple; +import com.arjuna.ats.jta.logging.*; +import com.arjuna.ats.jta.xa.XAModifier; + +import com.arjuna.ats.arjuna.coordinator.ActionStatus; +import com.arjuna.ats.arjuna.coordinator.BasicAction; +import com.arjuna.ats.arjuna.coordinator.AddOutcome; +import com.arjuna.ats.arjuna.common.*; + +import com.arjuna.common.util.logging.*; + +import javax.transaction.xa.*; + +import java.util.Hashtable; +import java.util.Enumeration; + +import javax.transaction.RollbackException; +import java.lang.IllegalStateException; + +/* + * Is given an AtomicAction, but uses the TwoPhaseCoordinator aspects of it + * to ensure that the thread association continues. + */ + +/** + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.inactive + * [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The + * transaction is not active! + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.nullres + * [com.arjuna.ats.internal.jta.transaction.arjunacore.nullres] + * Resource paramater is null! + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.illresstate + * [com.arjuna.ats.internal.jta.transaction.arjunacore.illresstate] + * illegal resource state + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.notatomicaction + * [com.arjuna.ats.internal.jta.transaction.arjunacore.notatomicaction] + * Current transaction is not an AtomicAction! + */ + +public class TransactionImple implements javax.transaction.Transaction, + com.arjuna.ats.jta.transaction.Transaction +{ + + /* + * Only works with AtomicAction and TwoPhaseCoordinator. + */ + + /** + * Create a new transaction with the specified timeout. + */ + + public TransactionImple(int timeout) + { + _theTransaction = new AtomicAction(); + + _theTransaction.begin(timeout); + + _resources = new Hashtable(); + _duplicateResources = new Hashtable(); + _suspendCount = 0; + } + + /** + * Overloads Object.equals() + */ + + public boolean equals(Object obj) + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.equals"); + } + + if (obj == null) + return false; + + if (obj == this) + return true; + + if (obj instanceof TransactionImple) + { + /* + * If we can't get either coordinator to compare, then assume + * transactions are different. + */ + + try + { + TransactionImple tx = (TransactionImple) obj; + + return tx.get_uid().equals(_theTransaction.get_uid()); + } + catch (Exception e) + { + } + } + + return false; + } + + /** + * Return -1 if we fail. + */ + + public int hashCode() + { + if (_theTransaction == null) + return -1; + else + return _theTransaction.get_uid().hashCode(); + } + + /** + * The JTA specification is vague on whether the calling thread can have any + * transaction associated with it. It does say that it need not have the + * same transaction as this one. We could call suspend prior to making these + * calls, but for now we do nothing. + */ + + /** + * We should never throw a HeuristicRollbackException because if we get a + * HeuristicRollback from a resource, and can successfully rollback the + * other resources, this is then the same as having simply been forced to + * rollback the transaction during phase 1. + * + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate + * [com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate] + * Invalid transaction state + */ + + public void commit() throws javax.transaction.RollbackException, + javax.transaction.HeuristicMixedException, + javax.transaction.HeuristicRollbackException, + java.lang.SecurityException, javax.transaction.SystemException, + java.lang.IllegalStateException + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.commit"); + } + + if (_theTransaction != null) + { + switch (_theTransaction.status()) + { + case ActionStatus.RUNNING: + case ActionStatus.ABORT_ONLY: + break; + default: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + /* + * Call end on any suspended resources. If this fails, then the + * transaction will be rolled back. + */ + + if (!endSuspendedRMs()) + _theTransaction.preventCommit(); + + // use end of TwoPhaseCoordinator to avoid thread changes. + + int status = _theTransaction.end(true); + + TransactionImple.removeTransaction(this); + + switch (status) + { + case ActionStatus.COMMITTED: + case ActionStatus.COMMITTING: // in case of async commit + break; + case ActionStatus.H_MIXED: + throw new javax.transaction.HeuristicMixedException(); + case ActionStatus.H_HAZARD: + throw new javax.transaction.HeuristicMixedException(); + case ActionStatus.H_ROLLBACK: + case ActionStatus.ABORTED: + throw new RollbackException(); + default: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate")); + } + } + else + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + /** + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus + * [com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus] + * Transaction rollback status is: + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed1 + * [com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed1] + * Ending suspended RMs failed when rolling back the transaction! + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed2 + * [com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed2] + * Ending suspended RMs failed when rolling back the transaction, + * but transaction rolled back. + */ + + public void rollback() throws java.lang.IllegalStateException, + java.lang.SecurityException, javax.transaction.SystemException + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.rollback"); + } + + if (_theTransaction != null) + { + switch (_theTransaction.status()) + { + case ActionStatus.RUNNING: + case ActionStatus.ABORT_ONLY: + break; + default: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + /* + * Call end on any suspended resources. If this fails, then there's + * not a lot else we can do because the transaction is about to roll + * back anyway! + */ + + boolean endSuspendedFailed = !endSuspendedRMs(); + + if (endSuspendedFailed) + { + if (jtaLogger.loggerI18N.isWarnEnabled()) + { + jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed1"); + } + } + + int outcome = _theTransaction.cancel(); // use cancel of + // TwoPhaseCoordinator to + // avoid thread changes. + + TransactionImple.removeTransaction(this); + + switch (outcome) + { + case ActionStatus.ABORTED: + case ActionStatus.ABORTING: // in case of async rollback + break; + default: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.rollbackstatus") + + ActionStatus.stringForm(outcome)); + } + + if (endSuspendedFailed) + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.endsuspendfailed2")); + } + else + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + public void setRollbackOnly() throws java.lang.IllegalStateException, + javax.transaction.SystemException + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.setRollbackOnly"); + } + + if (_theTransaction != null) + { + if (!_theTransaction.preventCommit()) + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + else + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + public int getStatus () throws javax.transaction.SystemException + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.getStatus"); + } + + int status = javax.transaction.Status.STATUS_NO_TRANSACTION; + + if (_theTransaction != null) + { + return StatusConverter.convert(_theTransaction.status()); + } + + return status; + } + + /** + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.nullparam + * [com.arjuna.ats.internal.jta.transaction.arjunacore.nullparam] + * null synchronization parameter! + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.syncsnotallowed + * [com.arjuna.ats.internal.jta.transaction.arjunacore.syncsnotallowed] + * Synchronizations are not allowed! + */ + + public void registerSynchronization(javax.transaction.Synchronization sync) + throws javax.transaction.RollbackException, + java.lang.IllegalStateException, javax.transaction.SystemException + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.registerSynchronization"); + } + + if (sync == null) + throw new javax.transaction.SystemException( + "TransactionImple.registerSynchronization - " + + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.nullparam")); + + if (_theTransaction != null) + { + SynchronizationImple s = new SynchronizationImple(sync); + + if (_theTransaction.addSynchronization(s) != AddOutcome.AR_ADDED) + { + int status = _theTransaction.status(); + + switch (status) + { + case ActionStatus.ABORTED: + throw new javax.transaction.RollbackException(); + case ActionStatus.CREATED: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + default: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.syncsnotallowed")); + } + } + } + else + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + /** + * This is the JTA compliant version of the method. However, you had better + * know that your XAResource and family are truly compliant implementations. + * If they aren't then we may fail gracefully (e.g., some versions of Oracle + * don't work with arbitrary Xid implementations!) + * + * If the family isn't compliant, then you should use the other method and + * pass through a relevant XAModifier, which should address the issues we + * have already come across. + */ + + public boolean enlistResource(XAResource xaRes) throws RollbackException, + IllegalStateException, javax.transaction.SystemException + { + return enlistResource(xaRes, null); + } + + /** + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror + * [com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror] + * {0} - caught: {1} + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror[com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror] + * {0} setTransactionTimeout caught: {1} + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror + * [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] + * {0} - XAResource.start returned: {1} for {2} + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister + * [com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister] + * could not register transaction + * @message com.arjuna.ats.internal.jta.transaction.arjunacore.xastart + * [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] {0} - + * caught: {1} for {2} + */ + + public boolean enlistResource(XAResource xaRes, Object[] params) + throws RollbackException, IllegalStateException, + javax.transaction.SystemException + { + if (jtaLogger.logger.isDebugEnabled()) + { + jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionImple.enlistResource ( " + + xaRes + " )"); + } + + if (xaRes == null) + throw new javax.transaction.SystemException( + "TransactionImple.enlistResource - " + + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.nullres")); + + int status = getStatus(); + + switch (status) + { + case javax.transaction.Status.STATUS_MARKED_ROLLBACK: + throw new RollbackException(); + case javax.transaction.Status.STATUS_ACTIVE: + break; + default: + throw new IllegalStateException( + jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.inactive")); + } + + XAModifier theModifier = null; + + if (params != null) + { + if (params.length >= XAMODIFIER + 1) + { + if (params[XAMODIFIER] instanceof XAModifier) + { + theModifier = (XAModifier) params[XAMODIFIER]; + } + } + } + + try + { + /* + * For each transaction we maintain a list of resources registered + * with it. Each element on this list also contains a list of + * threads which have registered this resource, and what their XID + * was for that registration. + */ + + TxInfo info = null; + + /* + * Have we seen this specific resource instance before? Do this + * trawl first before checking the RM instance later. Saves time. + */ + + try + { + synchronized (this) + { + info = (TxInfo) _resources.get(xaRes); + + if (info == null) + { + /* + * Null info means it's not in the main resources list, + * but may be in the duplicates. + */ + + info ... [truncated message content] |
From: <jbo...@li...> - 2006-05-09 13:27:07
|
Author: kev...@jb... Date: 2006-05-09 09:27:03 -0400 (Tue, 09 May 2006) New Revision: 4154 Added: labs/jbosstm/branches/mark/ Log: Copying Mark's changes Copied: labs/jbosstm/branches/mark (from rev 4152, labs/jbosstm/trunk) |