[jboss-svn-commits] JBL Code SVN: r5492 - in labs/jbossesb/branches/refactor: . product product/core/common/src/org/jboss/soa/esb product/core/common/src/org/jboss/soa/esb/common product/core/common/src/org/jboss/soa/esb/connection product/core/common/src/org/jboss/soa/esb/connection/exception product/core/common/src/org/jboss/soa/esb/helpers product/core/common/src/org/jboss/soa/esb/helpers/persist product/core/common/src/org/jboss/soa/esb/parameters product/core/common/src/org/jboss/soa/esb/services product/core/common/src/org/jboss/soa/esb/util product/core/common/tests product/core/common/tests/resources product/core/common/tests/resources/conf product/core/common/tests/src/org/jboss/soa/esb product/core/common/tests/src/org/jboss/soa/esb/common/tests product/core/common/tests/src/org/jboss/soa/esb/connection product/core/common/tests/src/org/jboss/soa/esb/helpers product/core/common/tests/src/org/jboss/soa/esb/notification product/core/common/tests/src/org/jboss/soa/esb/parameter! s product/core/common/tests/src/org/jboss/soa/esb/util product/core/listeners/src/org/jboss/soa/esb/listeners product/core/listeners/tests product/core/processors/src/org/jboss/soa/esb/processors product/core/processors/tests product/core/processors/tests/src/org/jboss/soa/esb/processors/tests product/core/services product/core/services/src/META-INF product/core/services/src/org/jboss/soa/esb/services product/core/services/src/org/jboss/soa/esb/services/EJB product/core/services/src/org/jboss/soa/esb/services/msglistener product/core/services/tests product/core/services/tests/src/org/jboss/soa/esb/services product/core/services/tests/src/org/jboss/soa/esb/services/EJB product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test product/core/services/tests/src/org/jboss/soa/esb/services/tests product/lib product/lib/deploy product/lib/ejb3 product/lib/ejb3_embedded product/lib/ext
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Aug 5 06:56:49 EDT 2006
Author: arvinder
Date: 2006-08-05 06:54:35 -0400 (Sat, 05 Aug 2006)
New Revision: 5492
Added:
labs/jbossesb/branches/refactor/.classpath
labs/jbossesb/branches/refactor/.project
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/BaseException.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamFileRepository.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepository.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/util/StreamUtils.java
labs/jbossesb/branches/refactor/product/core/common/tests/resources/
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/default.persistence.properties
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/embedded-jboss-beans.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/jboss-jms-beans.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/log4j.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/login-config.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/security-beans.xml
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/EJBContainerSetup.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/HashPasswordDecoder.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/TestConnectionPool.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/TestPasswordDecoder.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java
labs/jbossesb/branches/refactor/product/deployment.properties-example
labs/jbossesb/branches/refactor/product/lib/deploy/
labs/jbossesb/branches/refactor/product/lib/deploy/postgresql-8.1-407.jdbc3.jar
labs/jbossesb/branches/refactor/product/lib/ejb3/
labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-annotations-ejb3.jar
labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-ejb3x.jar
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/hibernate-all.jar
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/jboss-ejb3-all.jar
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/thirdparty-all.jar
Removed:
labs/jbossesb/branches/refactor/ant.bat
labs/jbossesb/branches/refactor/product/ant.bat
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/DefaultReposFactory.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsReposUtil.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsRepository.java
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/default.persistence.properties
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/embedded-jboss-beans.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/jboss-jms-beans.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/log4j.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/login-config.xml
labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/security-beans.xml
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/parameters/
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/ConnectionPoolFuncTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderFuncTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderTestImpl.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java
labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/Zap.java
labs/jbossesb/branches/refactor/product/core/services/src/META-INF/ejb-jar.xml
labs/jbossesb/branches/refactor/product/core/services/src/META-INF/jboss.xml
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerHome.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocal.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocalHome.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerHome.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocal.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocalHome.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerHome.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocal.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocalHome.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/Zap.java
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java
labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/tests/notification/
labs/jbossesb/branches/refactor/product/lib/deploy/postgresql-8.1-407.jdbc3.jar
labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-annotations-ejb3.jar
labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-ejb3x.jar
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/hibernate-all.jar
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/jboss-ejb3-all.jar
labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/thirdparty-all.jar
labs/jbossesb/branches/refactor/product/lib/ext/mysql-connector-java-3.1.13-bin.jar
Modified:
labs/jbossesb/branches/refactor/
labs/jbossesb/branches/refactor/product/
labs/jbossesb/branches/refactor/product/build.xml
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/common/SystemProperties.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/AppServerContext.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlField.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IbatchHandler.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/InotificationHandler.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IpersistHandler.java
labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java
labs/jbossesb/branches/refactor/product/core/common/tests/
labs/jbossesb/branches/refactor/product/core/common/tests/build.xml
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java
labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java
labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java
labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java
labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/OldDirListener.java
labs/jbossesb/branches/refactor/product/core/listeners/tests/
labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/AbstractProcessor.java
labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/FileProcessor.java
labs/jbossesb/branches/refactor/product/core/processors/tests/
labs/jbossesb/branches/refactor/product/core/processors/tests/src/org/jboss/soa/esb/processors/tests/DummyUnitTest.java
labs/jbossesb/branches/refactor/product/core/services/build.xml
labs/jbossesb/branches/refactor/product/core/services/src/META-INF/application.xml
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateLocal.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateRemote.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerFactory.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandler.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerBean.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandler.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerBean.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandler.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerBean.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateLocal.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateRemote.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateLocal.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateRemote.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerFactory.java
labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/msglistener/AbstractEsbMsgDrivenBean.java
labs/jbossesb/branches/refactor/product/core/services/tests/
labs/jbossesb/branches/refactor/product/core/services/tests/build.xml
labs/jbossesb/branches/refactor/product/lib/ext/jbossall-client.jar
Log:
sync with trunk with docs/* excluded
Property changes on: labs/jbossesb/branches/refactor
___________________________________________________________________
Name: svn:ignore
-
.settings
.classpath
.project
+
.settings
.classpath
.project
bin
.packaging
build
Copied: labs/jbossesb/branches/refactor/.classpath (from rev 5491, labs/jbossesb/trunk/.classpath)
Copied: labs/jbossesb/branches/refactor/.project (from rev 5491, labs/jbossesb/trunk/.project)
Deleted: labs/jbossesb/branches/refactor/ant.bat
===================================================================
--- labs/jbossesb/branches/refactor/ant.bat 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/ant.bat 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,18 +0,0 @@
- at echo off
-
-set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_07
-set ANT_HOME=H:\apache-ant-1.6.5
-set JBOSS_HOME=H:\jboss-4.0.4.GA
-set XDOCLET_HOME=H:\xdoclet-1.2.3
-
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-:doneStart
-%ANT_HOME%\bin\ant %ANT_CMD_LINE_ARGS%
-
Property changes on: labs/jbossesb/branches/refactor/product
___________________________________________________________________
Name: svn:ignore
-
build
+
build
deployment.properties
Deleted: labs/jbossesb/branches/refactor/product/ant.bat
===================================================================
--- labs/jbossesb/branches/refactor/product/ant.bat 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/ant.bat 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,18 +0,0 @@
- at echo off
-
-set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_07
-set ANT_HOME=H:\apache-ant-1.6.5
-set JBOSS_HOME=H:\jboss-4.0.4.GA
-set XDOCLET_HOME=H:\xdoclet-1.2.3
-
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-:doneStart
-%ANT_HOME%\bin\ant %ANT_CMD_LINE_ARGS%
-
Modified: labs/jbossesb/branches/refactor/product/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/build.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/build.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -58,7 +58,7 @@
<property name="org.jboss.esb.internal.core" value="esb"/>
<property name="org.jboss.esb.internal.dest" value="${basedir}/build"/>
<property name="org.jboss.esb.internal.jar.dest" value="${basedir}/lib"/>
- <property name="org.jboss.esb.internal.javadocs.dest" value="javadocs"/>
+ <property name="org.jboss.esb.internal.javadocs.dest" value="${basedir}/build/dist/javadocs"/>
<!-- Initialisation -->
<target name="org.jboss.esb.internal.init">
@@ -88,11 +88,12 @@
<ant dir="core" target="org.jboss.esb.core.test"/>
</target>
-
-
<!-- javadocs paths -->
<path id="org.jboss.esb.javadocs.path">
- <pathelement path="esb/classes"/>
+ <pathelement path="core/common/src"/>
+ <pathelement path="core/listeners/src"/>
+ <pathelement path="core/processors/src"/>
+ <pathelement path="core/services/src"/>
</path>
<property name="org.jboss.esb.javadocs.list"
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/BaseException.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/BaseException.java)
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/common/SystemProperties.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/common/SystemProperties.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/common/SystemProperties.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -38,7 +38,7 @@
public static final String JNDI_SERVER_URL = "org.jboss.soa.esb.jndi.server.url";
- public static final String PARAMS_REPOS_FACTORY_CLASS = "org.jboss.soa.esb.paramsRepository.factory.class";
+ public static final String PARAMS_REPOS_IMPL_CLASS = "org.jboss.soa.esb.paramsRepository.class";
public static final String OBJECT_STORE_CONFIG_FILE = "org.jboss.soa.esb.objStore.configfile";
@@ -61,8 +61,8 @@
new KeyValuePair(SMTP_PORT, getSmtpPort()),
new KeyValuePair(JNDI_SERVER_TYPE, getJndiServerType()),
new KeyValuePair(JNDI_SERVER_URL, getJndiServerURL()),
- new KeyValuePair(PARAMS_REPOS_FACTORY_CLASS,
- getParamsReposFactoryClass()),
+ new KeyValuePair(PARAMS_REPOS_IMPL_CLASS,
+ getParamRepositoryImplClass()),
new KeyValuePair(OBJECT_STORE_CONFIG_FILE, getObjStoreConfigFile()),
new KeyValuePair(ENCRYPT_FACTORY_CLASS, getEncryptionFactoryClass())
@@ -101,10 +101,8 @@
return System.getProperty(JNDI_SERVER_URL, SystemProperties.DEFAULT_HOST);
}
- public static String getParamsReposFactoryClass() {
- return System.getProperty(PARAMS_REPOS_FACTORY_CLASS,
- org.jboss.soa.esb.parameters.DefaultReposFactory.class
- .getName());
+ public static String getParamRepositoryImplClass() {
+ return System.getProperty(PARAMS_REPOS_IMPL_CLASS);
}
public static String getObjStoreConfigFile() {
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,50 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import java.util.TimerTask;
-
-/**
- * Timer task which will run at scheduled times based on the property set by the user.
- * This task will remove all unused connections which have elapsed a certain period of time
- * @author MohitK
- * Date: Jul 26, 2006
- */
-public class AbandonedConnectionTimerTask extends TimerTask {
-
- private DefaultConnectionPoolImpl m_oPool;
-
- /**
- * Constructor which takes the pool implementation
- * @param pool
- */
- public AbandonedConnectionTimerTask(DefaultConnectionPoolImpl pool){
- this.m_oPool = pool;
- }
-
- public void run() {
- synchronized(m_oPool){
- m_oPool.releaseAbandonedConnections();
- }
- }
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/AbandonedConnectionTimerTask.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-/**
- * Factory interface for creating connections based on different sources such as DataSource, DriverConnection
- * @author MohitK
- * Date: Jul 18, 2006
- */
-public interface ConnectionFactory {
- /**
- * Creates a new JDBC Connection. The implementation is left to the classes.
- * @return Connection
- * @throws SQLException
- */
- public Connection createConnection() throws SQLException;
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/ConnectionFactory.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,62 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.jboss.soa.esb.connection.exception.ConnectionException;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-/**
- * TODO
- * @author MohitK
- * Date: Jul 18, 2006
- */
-public interface ConnectionPool {
- /**
- * This method is used to create the connection pool and keep it ready
- * @param prop Properties for the connection pool including connection properties
- * @throws ConnectionException
- */
- public void createPool(ConnectionProperties prop) throws ConnectionException;
-
- /**
- * This method is called whenever a connection is needed from the pool.
- * @return Connection to be used
- * @throws SQLException
- */
- public Connection getConnection() throws SQLException;
-
- /**
- * This method closes an open connection and returns the connection to the pool.
- * @param connectionToClose The connection to be returned to the pool.
- * @throws SQLException
- */
- public void closeConnection(Connection connectionToClose) throws SQLException;
-
- /**
- * This method is called when the pool needs to be destroyed effectively closing all open connections
- * @throws SQLException
- */
- public void releasePool() throws SQLException;
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPool.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.connection.exception.ConnectionException;
-
-/**
- * Factory class to create the connection pool.
- *
- * @author MohitK
- * Date: Jul 19, 2006
- */
-public class ConnectionPoolFactory {
-
-
- private static Logger Log = Logger.getLogger(ConnectionPoolFactory.class);
-
- /**
- * Factory method to create and return a connection pool based on the property set for the connection pool
- * implementation. The factory also registers a shut down hook with the JVM so that the connections in the pool
- * are closed and released with causing connections leaks.
- *
- * @param connProperties Properties for the connection pool
- * @return Connection Pool
- * @throws ConnectionException
- */
- public static ConnectionPool createPool(ConnectionProperties connProperties) throws ConnectionException {
- String connectionPoolClassName = connProperties.getConnectionPoolClass();
- try {
- ConnectionPool pool = (ConnectionPool) Class.forName(connectionPoolClassName).newInstance();
- pool.createPool(connProperties);
- FreeConnectionPoolResources freeResourcesThread = new FreeConnectionPoolResources(pool);
- Runtime.getRuntime().addShutdownHook(freeResourcesThread);
- return pool;
- } catch (Throwable t) {
- Log.error("ConnectionPoolFactory: Error in Connection Pool",t);
- throw new ConnectionException(t);
- }
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/ConnectionPoolFactory.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,251 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.apache.log4j.Logger;
-
-import java.util.Properties;
-
-/**
- * Connection Property class which stores all connection and connection pool properties. It keeps the properties ready
- * so that is can be used by the pool and connection factory
- *
- * @author MohitK
- * Date: Jul 18, 2006
- */
-public class ConnectionProperties {
-
- private static Logger Log = Logger.getLogger(ConnectionProperties.class);
-
- private Properties _connectionProperties;
-
- public static final String DRIVER_CLASSNAME = "driver-class";
- public static final String CONNECTION_URL = "connection-url";
- public static final String USERNAME = "user-name";
- public static final String PASSWORD = "password";
- public static final String AUTO_COMMIT = "auto-commit";
- public static final String ISOLATION_LEVEL = "isolation";
- public static final String MIN_POOL_SIZE = "min-pool-size";
- public static final String MAX_POOL_SIZE = "max-pool-size";
- public static final String BLOCKING_CONNECTION_TIME = "blocking-timeout-millis";
- public static final String CONNECTION_POOL_CLASS = "connection-pool-class";
- public static final String PASSWORD_DECODER = "password-decrypter";
- public static final String ABANDONED_CONNECTION_TIMEOUT = "abandoned-connection-timeout";
- public static final String ABANDONED_CONNECTION_CHECK_INTERVAL = "abandoned-connection-time-interval";
-
- private boolean _autoCommit;
- private Integer _isolationLvl;
- private int _minPoolSize;
- private int _maxPoolSize;
- private long _connBlockTime;
- private String _connectionPoolClass;
- private String _user;
- private String _password;
- private String _connectionUrl;
- private long _abandonedConnectionTimeout;
- private long _abandonedConnectionCheckInterval;
- private String _driverClassName;
-
-
- public static final String DEFAULT_MIN_POOL_SIZE = "5";
- public static final String DEFAULT_MAX_POOL_SIZE = "10";
- public static final String DEFAULT_CONN_BLOCK_TIME_MILLIS = "5000";
- public static final String DEFAULT_CONNECTION_POOL_CLASS = DefaultConnectionPoolImpl.class.getName();
- public static final String DEFAULT_ABANDONED_CONNECTION_TIMEOUT = "10000";
- public static final String DEFAULT_ABANDONED_CONNECTION_CHECK_INTERVAL = "30000";
-
- public ConnectionProperties(Properties connectionProperties) {
- this._connectionProperties = connectionProperties;
- setDriverClassName();
- setConnectionUrl();
- setUser();
- setPassword();
- setConnectionPoolClass();
- setAutoCommit();
- setIsolationLevel();
- setMinPoolSize();
- setMaxPoolSize();
- setBlockingConnectionTime();
- setAbandonedConnectionTimeOut();
- setAbandonedConnectionCheckInterval();
- }
-
- private void setDriverClassName() {
- _driverClassName = _connectionProperties.getProperty(DRIVER_CLASSNAME);
- if (_driverClassName == null) {
- _driverClassName = System.getProperty(DRIVER_CLASSNAME);
- }
- }
-
- protected String getDriverClassName() {
- return _driverClassName;
- }
-
- protected String getConnectionUrl() {
- return _connectionUrl;
- }
-
- private void setConnectionUrl() {
- _connectionUrl = _connectionProperties.getProperty(CONNECTION_URL);
- if (_connectionUrl == null) {
- _connectionUrl = System.getProperty(CONNECTION_URL);
- }
- }
-
- protected boolean getAutoCommit() {
- return _autoCommit;
- }
-
- protected Integer getIsolationLevel() {
- return _isolationLvl;
- }
-
- private void setIsolationLevel() {
- String isolation = (String) _connectionProperties.get(ISOLATION_LEVEL);
- if (isolation == null) {
- isolation = System.getProperty(ISOLATION_LEVEL);
- }
- this._isolationLvl = (isolation != null) ? new Integer(isolation) : null;
- }
-
- protected int getMinPoolSize() {
- return _minPoolSize;
- }
-
- protected int getMaxPoolSize() {
- return _maxPoolSize;
- }
-
- private void setMinPoolSize() {
- String strPoolSize = _connectionProperties.getProperty(MIN_POOL_SIZE);
- if (strPoolSize == null) {
- strPoolSize = System.getProperty(MIN_POOL_SIZE, DEFAULT_MIN_POOL_SIZE);
- this._minPoolSize = Integer.parseInt(strPoolSize);
- }
- }
-
- private void setMaxPoolSize() {
- String strPoolSize = (String) _connectionProperties.get(MAX_POOL_SIZE);
- if (strPoolSize == null) {
- strPoolSize = System.getProperty(MAX_POOL_SIZE, DEFAULT_MAX_POOL_SIZE);
- this._maxPoolSize = Integer.parseInt(strPoolSize);
- }
- }
-
- private void setBlockingConnectionTime() {
- String strBlockTimeMillis = (String) _connectionProperties.get(BLOCKING_CONNECTION_TIME);
- if (strBlockTimeMillis == null) {
- strBlockTimeMillis = System.getProperty(BLOCKING_CONNECTION_TIME, DEFAULT_CONN_BLOCK_TIME_MILLIS);
- this._connBlockTime = Integer.parseInt(strBlockTimeMillis);
- }
- }
-
- protected long getConnectionBlockTimeInMillis() {
- return _connBlockTime;
- }
-
- private void setAutoCommit() {
- String autoCommit = (String) _connectionProperties.get(AUTO_COMMIT);
- if (autoCommit == null || autoCommit.equals("false")) {
- _autoCommit = Boolean.FALSE;
- } else {
- _autoCommit = Boolean.TRUE;
- }
- }
-
- private void setConnectionPoolClass() {
- _connectionPoolClass = _connectionProperties.getProperty(CONNECTION_POOL_CLASS);
- if (_connectionPoolClass == null) {
- _connectionPoolClass = System.getProperty(CONNECTION_POOL_CLASS, DEFAULT_CONNECTION_POOL_CLASS);
- }
- }
-
-
- protected String getUser() {
- return _user;
- }
-
- public void setUser() {
- this._user = _connectionProperties.getProperty(USERNAME);
- if (_user == null) {
- _user = System.getProperty(USERNAME);
- }
- }
-
- protected String getPassword() {
- return _password;
- }
-
- protected void setPassword() {
- this._password = _connectionProperties.getProperty(PASSWORD);
- if (_password == null) {
- _password = System.getProperty(PASSWORD);
- }
- String strPasswordDecoder = _connectionProperties.getProperty(PASSWORD_DECODER);
- if (strPasswordDecoder == null) {
- strPasswordDecoder = System.getProperty(PASSWORD_DECODER);
- }
- if (strPasswordDecoder != null) {
- try {
- PasswordDecoder decoder = (PasswordDecoder) Class.forName(strPasswordDecoder).newInstance();
- this._password = decoder.decode(_password);
- } catch (InstantiationException e) {
- Log.error("Error in creating instance of Password Decoder Class:-" + strPasswordDecoder,e);
- } catch (IllegalAccessException e) {
- Log.error("Error in creating instance of Password Decoder Class:-" + strPasswordDecoder,e);
- } catch (ClassNotFoundException e) {
- Log.error("Password Decoder Class:-" + strPasswordDecoder + " not found in Classpath");
- Log.error("Please check the property:-" + PASSWORD_DECODER);
- Log.error(e);
- }
- }
- }
-
- protected String getConnectionPoolClass() {
- return _connectionPoolClass;
- }
-
- private void setAbandonedConnectionTimeOut() {
- String strAbandonedConnectionTimeout = _connectionProperties.getProperty(ABANDONED_CONNECTION_TIMEOUT);
- if (strAbandonedConnectionTimeout == null) {
- strAbandonedConnectionTimeout = System.getProperty(ABANDONED_CONNECTION_TIMEOUT, DEFAULT_ABANDONED_CONNECTION_TIMEOUT);
- }
- this._abandonedConnectionTimeout = Long.parseLong(strAbandonedConnectionTimeout);
- }
-
- private void setAbandonedConnectionCheckInterval() {
- String strAbandonedConnectionCheckInterval = _connectionProperties.getProperty(ABANDONED_CONNECTION_CHECK_INTERVAL);
- if (strAbandonedConnectionCheckInterval == null || strAbandonedConnectionCheckInterval.trim().length() == 0) {
- strAbandonedConnectionCheckInterval = System.getProperty(ABANDONED_CONNECTION_CHECK_INTERVAL, DEFAULT_ABANDONED_CONNECTION_CHECK_INTERVAL);
- }
- this._abandonedConnectionCheckInterval = Long.parseLong(strAbandonedConnectionCheckInterval);
- }
-
- protected long getAbandonedConnectionTimeOut() {
- return this._abandonedConnectionTimeout;
- }
-
- protected long getAbandonedConnectionCheckInterval() {
- return this._abandonedConnectionCheckInterval;
- }
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/ConnectionProperties.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,319 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import java.sql.*;
-import java.util.Map;
-
-/**
- * Wrapper class which encapsulates @link Connection
- * @author MohitK
- * Date: Jul 18, 2006
- */
-public class ConnectionWrapper implements Connection {
-
- private Connection _originalHeavyConnection;
- private ConnectionPool _connectionPool;
- private boolean _isClosed = false;
- private long _activatedTime;
-
- public ConnectionWrapper(Connection originalHeavyConnection, ConnectionPool pool) throws SQLException {
- if (originalHeavyConnection == null) {
- throw new SQLException("Original Connection is Null");
- }
- this._originalHeavyConnection = originalHeavyConnection;
- if (pool == null) {
- throw new SQLException("Connection Pool is null");
- }
- this._connectionPool = pool;
- }
-
- public Statement createStatement() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.createStatement();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public PreparedStatement prepareStatement(String sql) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareStatement(sql);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public CallableStatement prepareCall(String sql) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareCall(sql);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public String nativeSQL(String sql) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.nativeSQL(sql);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void setAutoCommit(boolean autoCommit) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.setAutoCommit(autoCommit);
- } else
- throw new SQLException("Connection closed due to inactivity");
-
- }
-
- public boolean getAutoCommit() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getAutoCommit();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void commit() throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.commit();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void rollback() throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.rollback();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public synchronized void close() throws SQLException {
- if (_originalHeavyConnection != null) {
- _connectionPool.closeConnection(this);
- }
- this._isClosed = true;
- }
-
- public boolean isClosed() throws SQLException {
- return _isClosed;
- }
-
- public DatabaseMetaData getMetaData() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getMetaData();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void setReadOnly(boolean readOnly) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.setReadOnly(readOnly);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public boolean isReadOnly() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.isReadOnly();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void setCatalog(String catalog) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.setCatalog(catalog);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public String getCatalog() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getCatalog();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void setTransactionIsolation(int level) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.setTransactionIsolation(level);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public int getTransactionIsolation() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getTransactionIsolation();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public SQLWarning getWarnings() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getWarnings();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void clearWarnings() throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.clearWarnings();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.createStatement(resultSetType, resultSetConcurrency);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareStatement(sql, resultSetType, resultSetConcurrency);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareCall(sql, resultSetType, resultSetConcurrency);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public Map<String, Class<?>> getTypeMap() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getTypeMap();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.setTypeMap(map);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void setHoldability(int holdability) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.setHoldability(holdability);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public int getHoldability() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.getHoldability();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public Savepoint setSavepoint() throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.setSavepoint();
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public Savepoint setSavepoint(String name) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.setSavepoint(name);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void rollback(Savepoint savepoint) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.rollback(savepoint);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public void releaseSavepoint(Savepoint savepoint) throws SQLException {
- if (_originalHeavyConnection != null) {
- _originalHeavyConnection.releaseSavepoint(savepoint);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareStatement(sql, autoGeneratedKeys);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public PreparedStatement prepareStatement(String sql, int columnIndexes[]) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareStatement(sql, columnIndexes);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- public PreparedStatement prepareStatement(String sql, String columnNames[]) throws SQLException {
- if (_originalHeavyConnection != null) {
- return _originalHeavyConnection.prepareStatement(sql, columnNames);
- } else
- throw new SQLException("Connection closed due to inactivity");
- }
-
- protected synchronized Connection getActualConnection() {
- return _originalHeavyConnection;
- }
-
- protected long getActivatedTime() {
- return _activatedTime;
- }
-
- protected void setActivatedTime(long activedTime) {
- this._activatedTime = activedTime;
- }
-
- protected String getName() {
- return _originalHeavyConnection.toString();
- }
-
- protected void setOriginalConnection(Connection conn) {
- this._originalHeavyConnection = conn;
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/ConnectionWrapper.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,202 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.jboss.soa.esb.connection.exception.ConnectionException;
-import org.apache.log4j.Logger;
-
-import java.sql.Connection;
-import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.Enumeration;
-import java.util.Properties;
-import java.util.Stack;
-import java.util.Timer;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Default connection pool implementation class when none is specified by the user in @link ConnectionProperties
- * @author MohitK
- * Date: Jul 18, 2006
- */
-public class DefaultConnectionPoolImpl implements ConnectionPool {
-
- private static Logger Log = Logger.getLogger(DefaultConnectionPoolImpl.class);
-
- private final Stack<ConnectionWrapper> m_oConnectionStack = new Stack<ConnectionWrapper>();
- private final ConcurrentHashMap<String, ConnectionWrapper> m_oUsedConnectionMap = new ConcurrentHashMap<String, ConnectionWrapper>();
- private int m_iConnCountInPool;
- private ConnectionProperties m_oConnProperties;
- private ConnectionFactory _connectionFactory;
-
- /**
- * @see org.jboss.soa.esb.connection.ConnectionPool#createPool(ConnectionProperties)
- *
- */
- public void createPool(ConnectionProperties prop) throws ConnectionException {
- this.m_oConnProperties = prop;
- try {
- initPool();
- AbandonedConnectionTimerTask abandonedConnTask = new AbandonedConnectionTimerTask(this);
- Timer abandonedTimer = new Timer(":AbandonedConnectionPoolScheduler:@" + this.toString(), true);
- abandonedTimer.schedule(abandonedConnTask, prop.getAbandonedConnectionCheckInterval(), prop.getAbandonedConnectionCheckInterval());
- } catch (SQLException e) {
- throw new ConnectionException("DefaultConnectionPoolImpl: Error in creating Connection Pool", e);
- }
- }
-
- private void initPool() throws SQLException {
-
- if (_connectionFactory == null) {
- Properties properties = new Properties();
- properties.put("user", m_oConnProperties.getUser());
- properties.put("password", m_oConnProperties.getPassword());
- _connectionFactory = new DriverConnectionFactory(getDriver(m_oConnProperties.getDriverClassName()), m_oConnProperties.getConnectionUrl(), properties);
- }
- while (m_iConnCountInPool < m_oConnProperties.getMinPoolSize()) {
- synchronized (m_oConnectionStack) {
- m_oConnectionStack.add(new ConnectionWrapper(_connectionFactory.createConnection(), this));
- m_iConnCountInPool++;
- }
- }
- }
-
- private Driver getDriver(String driverClassName) throws SQLException {
- if (driverClassName != null) {
- try {
- Class.forName(driverClassName);
- } catch (Throwable e) {
- Log.error("DefaultConnectionPoolImpl: Error in loading class " + driverClassName + " to create connection pool",e);
- throw new SQLException("DefaultConnectionPoolImpl: Error in loading class " + driverClassName + " to create connection pool");
- }
- return DriverManager.getDriver(m_oConnProperties.getConnectionUrl());
- }
- throw new SQLException("DefaultConnectionPoolImpl: Driver Class could not be loaded");
- }
-
- /**
- * @see org.jboss.soa.esb.connection.ConnectionPool#getConnection()
- *
- */
- public synchronized Connection getConnection() throws SQLException {
- ConnectionWrapper newPoolConnection;
- if (!m_oConnectionStack.isEmpty()) {
- newPoolConnection = m_oConnectionStack.pop();
- m_oUsedConnectionMap.put(newPoolConnection.getName(), newPoolConnection);
- } else if (m_iConnCountInPool < m_oConnProperties.getMaxPoolSize()) {
- newPoolConnection = new ConnectionWrapper(_connectionFactory.createConnection(), this);
- m_oUsedConnectionMap.put(newPoolConnection.getName(), newPoolConnection);
- m_iConnCountInPool++;
- } else {
- try {
- Thread.sleep(m_oConnProperties.getConnectionBlockTimeInMillis());
- } catch (InterruptedException e) {
- //Do Nothing
- }
- if (!m_oConnectionStack.empty()) {
- newPoolConnection = m_oConnectionStack.pop();
- m_oUsedConnectionMap.put(newPoolConnection.getName(), newPoolConnection);
- } else {
- throw new SQLException("Connection Pool exhausted. Please increase number of connections");
- }
-
- }
- Integer isolation = m_oConnProperties.getIsolationLevel();
- if (isolation != null) newPoolConnection.setTransactionIsolation(isolation);
- newPoolConnection.setAutoCommit(m_oConnProperties.getAutoCommit());
- newPoolConnection.setActivatedTime(System.currentTimeMillis());
- return newPoolConnection;
- }
-
- /**
- * @see ConnectionPool;
- */
- public void closeConnection(Connection connectionToClose) {
- synchronized (m_oConnectionStack) {
- m_oConnectionStack.push((ConnectionWrapper) connectionToClose);
- }
- m_oUsedConnectionMap.remove(connectionToClose);
- }
-
- /**
- * @see ConnectionPool#releasePool()
- */
- public void releasePool() {
- try {
- synchronized (m_oConnectionStack) {
- for (ConnectionWrapper connection : m_oConnectionStack) {
- Connection origConn = connection.getActualConnection();
- origConn.close();
- m_iConnCountInPool--;
- }
- }
- Enumeration<ConnectionWrapper> connectionWrapperEnum = m_oUsedConnectionMap.elements();
- while (connectionWrapperEnum.hasMoreElements()) {
- ConnectionWrapper connectionWrapper = connectionWrapperEnum.nextElement();
- Connection con = connectionWrapper.getActualConnection();
- String name = connectionWrapper.getName();
- if (con != null && !con.isClosed()) {
- con.close();
- }
- m_iConnCountInPool--;
- m_oUsedConnectionMap.remove(name);
- }
- } catch (SQLException e) {
- Log.error("DefaultConnectionPoolImpl: Error in closing physical Connection",e);
- }
- }
-
- protected void finalize() throws Throwable {
- super.finalize();
- releasePool();
- }
-
- /**
- * This method will release all abandoned connections from the pool.
- *
- */
- protected synchronized void releaseAbandonedConnections() {
-
- Enumeration<ConnectionWrapper> connectionWrapperEnum = m_oUsedConnectionMap.elements();
- while (connectionWrapperEnum.hasMoreElements()) {
- ConnectionWrapper connectionWrapper = connectionWrapperEnum.nextElement();
- long activedTime = connectionWrapper.getActivatedTime();
- long currentTime = System.currentTimeMillis();
- if ((currentTime - activedTime) > m_oConnProperties.getAbandonedConnectionTimeOut()) {
- try {
- Log.info("Removing abandoned Connection:-" + connectionWrapper);
- Connection actualConnection = connectionWrapper.getActualConnection();
- m_oUsedConnectionMap.remove(connectionWrapper.getName());
- connectionWrapper.setOriginalConnection(null);
- connectionWrapper = null;
- connectionWrapper = new ConnectionWrapper(actualConnection, this);
- synchronized (m_oConnectionStack) {
- m_oConnectionStack.push(connectionWrapper);
- }
- } catch (SQLException e) {
- Log.error("Error in releasing abandoned connection from Pool",e);
- }
- }
- }
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/DefaultConnectionPoolImpl.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,55 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Driver;
-import java.util.Properties;
-
-/**
- * Driver implementation of Connection Factory
- * @author MohitK
- * Date: Jul 18, 2006
- */
-public class DriverConnectionFactory implements ConnectionFactory{
-
- private Driver _driver;
- private String _driverUrl;
- private Properties _properties;
-
- public DriverConnectionFactory(Driver driver,String driverUrl,Properties connectionProps){
- this._driver=driver;
- this._driverUrl=driverUrl;
- this._properties=connectionProps;
-
- }
-
- /**
- *
- * @see org.jboss.soa.esb.connection.ConnectionFactory#createConnection()
- */
- public Connection createConnection() throws SQLException {
- return _driver.connect(_driverUrl,_properties);
- }
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/DriverConnectionFactory.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,51 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.apache.log4j.Logger;
-
-/**
- * Shutdown Hook into the JVM. The class will be invoked by the JVM when the JVM is shutting down.
- * Used to free connection resources and destroy the connection pool.
- *
- * @author MohitK
- * Date: Jul 22, 2006
- */
-public class FreeConnectionPoolResources extends Thread {
-
- private static Logger Log = Logger.getLogger(FreeConnectionPoolResources.class);
-
- ConnectionPool pool;
-
- public FreeConnectionPoolResources(ConnectionPool pool) {
- this.pool = pool;
- }
-
- public void run() {
- try {
- pool.releasePool();
- } catch (Exception e) {
- Log.error("Error in freeing resources");
- }
- }
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/FreeConnectionPoolResources.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-/**
- * Interface to be implemented by classes when they need to return the DB password for the connection by using their own
- * algorithm. Called by the connection pool
- * @author MohitK
- * Date: Jul 21, 2006
- */
-public interface PasswordDecoder {
- /**
- * This method decodes the password for JDBC Connection, it will be called when setting JDBC connection properties.
- * Users who need to decode the password need to implement this interface and write their own
- * decoding logic to send the actual DB password. If this method returns null
- * @param encodedPassword The encoded password sent by JDBC framework
- * @return Decoded password.
- */
- public String decode(String encodedPassword);
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/PasswordDecoder.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,116 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.jboss.soa.esb.connection.exception.ConnectionException;
-import org.apache.log4j.Logger;
-
-import javax.sql.DataSource;
-import java.io.PrintWriter;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.Properties;
-
-/**
- * Implementation if Datasource for getting connections from pool.
- * @author MohitK
- * Date: Jul 19, 2006
- */
-public class PoolDataSource implements DataSource {
-
- private static Logger Log = Logger.getLogger(PoolDataSource.class);
-
- private ConnectionPool _pool;
- private PrintWriter _logWriter = new PrintWriter(System.out);
- private int _loginTimeOut;
- private final Properties _connProps = new Properties();
- ConnectionProperties _connectionProperties;
-
- private synchronized ConnectionPool createConnectionPool() throws SQLException {
- if (_pool == null) {
- try {
- if (_connProps != null) {
- _connectionProperties = new ConnectionProperties(_connProps);
- _pool = ConnectionPoolFactory.createPool(_connectionProperties);
- }
- } catch (ConnectionException e) {
- Log.error("PoolDataSource: Error in creating Connection Pool",e);
- throw new SQLException("Error in Connection Pool Creation");
- }
- }
- return _pool;
- }
-
-
- public Properties getConnectionProperties() {
- return _connProps;
- }
-
- public void setConnectionProperties(Properties _connProperties) {
- _connProps.putAll(_connProperties);
- }
-
- /**
- * @see javax.sql.DataSource#getConnection()
- */
- public Connection getConnection() throws SQLException {
- return createConnectionPool().getConnection();
- }
-
- /**
- * @see javax.sql.DataSource#getConnection(String, String)
- */
- public Connection getConnection(String username, String password) throws SQLException {
- synchronized(_connProps){
- _connProps.setProperty(ConnectionProperties.USERNAME, username);
- _connProps.setProperty(ConnectionProperties.PASSWORD, password);
- }
- return createConnectionPool().getConnection();
- }
-
- /**
- * @see javax.sql.DataSource#getLogWriter()
- */
- public PrintWriter getLogWriter() throws SQLException {
- return null;
- }
- /**
- * @see javax.sql.DataSource#setLogWriter(java.io.PrintWriter)
- */
- public void setLogWriter(PrintWriter out) throws SQLException {
- this._logWriter = out;
- }
- /**
- * @see javax.sql.DataSource#setLoginTimeout(int)
- */
- public void setLoginTimeout(int seconds) throws SQLException {
- this._loginTimeOut = seconds;
- }
-
- /**
- * @see javax.sql.DataSource#getLoginTimeout()
- */
- public int getLoginTimeout() throws SQLException {
- return _loginTimeOut;
- }
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/PoolDataSource.java)
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/exception)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,45 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection.exception;
-
-/**
- * This exception is thrown when Connection Pool fails to initialize
- * User: MohitK
- * Date: Jul 21, 2006
- */
-public class ESBConnectionException extends Exception{
- public ESBConnectionException() {
- super();
- }
-
- public ESBConnectionException(String message) {
- super(message);
- }
-
- public ESBConnectionException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ESBConnectionException(Throwable cause) {
- super(cause);
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/connection/exception/ESBConnectionException.java)
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/AppServerContext.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/AppServerContext.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/AppServerContext.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -80,7 +80,7 @@
oPr.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
oPr.setProperty(Context.URL_PKG_PREFIXES,
- "jboss.naming:org.jnp.interfaces");
+ "org.jboss.naming:org.jnp.interfaces");
boolean bCtxOK = false;
Context oCtx = null;
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.helpers.persist;
import java.io.*;
@@ -28,80 +28,113 @@
import org.jboss.soa.esb.helpers.DomElement;
/**
- * <p>Obtain a connection that implements the DataSource interface</p>
- * <p>Description: Enable compatible use of JdbcCleanConn from outside a
- * J2EE app container</p>
+ * <p>
+ * Obtain a connection that implements the DataSource interface
+ * </p>
+ * <p>
+ * Description: Enable compatible use of JdbcCleanConn from outside a J2EE app
+ * container
+ * </p>
+ *
* @version 1.0
* @see JdbcCleanConn
* @see DomElement
*/
-public class SimpleDataSource implements DataSource
-{
- private PrintWriter m_oPW = new PrintWriter(System.out);
- private int m_iTO = 10;
- private String m_sUrl , m_sUsr, m_sPwd;
- private Connection m_oConn;
+public class SimpleDataSource implements DataSource {
+ private PrintWriter m_oPW = new PrintWriter(System.out);
- public static final String DRIVER = "driver-class";
- public static final String URL = "connection-url";
- public static final String USER = "user-name";
- public static final String PASSWORD = "password";
+ private int m_iTO = 10;
- private SimpleDataSource() {}
+ private String m_sUrl, m_sUsr, m_sPwd;
- /**
- * Obtain a DataSource by providing connection parameters. DomElement argument
- * must contain the following attributes
- * <p>
- * <li> driver-class</li>
- * <li> connection-url</li>
- * <li> user-name</li>
- * <li> password</li>
- * </p>
- * @param p_oP DomElement - Parameter tree that contains the 4 attributes needed
- * @throws Exception
- * @see DomElement
- * @see SimpleDataSource#SimpleDataSource(String,String,String,String)
- * @see javax.sql.DataSource
- */
- SimpleDataSource(DomElement p_oP)
- throws Exception
- { this (p_oP.getAttr(DRIVER) ,p_oP.getAttr(URL)
- ,p_oP.getAttr(USER) ,p_oP.getAttr(PASSWORD));
- } //________________________________
+ private Connection m_oConn;
- /**
- * Obtain a connection to a DB using the provided arguments to call
- * @param p_sDriver String - Java class of the JDBC driver to use (e.g. org.postgresql.Driver)
- * @param p_sDbURL String - The URL of the database (e.g. jdbc:postgresql://chodedb1:5432/cq3)
- * @param p_sUsr String - Username
- * @param p_sPwd String - Password
- * @throws Exception
- * @see DriverManager#getConnection(String,String,String)
- * @see javax.sql.DataSource
- */
- public SimpleDataSource(String p_sDriver, String p_sDbURL, String p_sUsr, String p_sPwd)
- throws Exception
- { Class.forName(p_sDriver);
- m_sUrl = p_sDbURL;
- getConnection(p_sUsr, p_sPwd);
- } //________________________________
+ public static final String DRIVER = "driver-class";
- public Connection getConnection() { return m_oConn; }
+ public static final String URL = "connection-url";
- public Connection getConnection(String username, String password)
- { m_sUsr = username;
- m_sPwd = password;
- try { m_oConn = DriverManager.getConnection (m_sUrl,m_sUsr,m_sPwd); }
- catch (Exception e) { m_oConn = null; }
- return m_oConn;
- } //________________________________
+ public static final String USER = "user-name";
- public int getLoginTimeout() { return m_iTO; }
+ public static final String PASSWORD = "password";
- public PrintWriter getLogWriter() { return m_oPW; }
+ private SimpleDataSource() {
+ }
- public void setLoginTimeout(int seconds) { m_iTO = seconds; }
+ /**
+ * Obtain a DataSource by providing connection parameters. DomElement
+ * argument must contain the following attributes
+ * <p>
+ * <li> driver-class</li>
+ * <li> connection-url</li>
+ * <li> user-name</li>
+ * <li> password</li>
+ * </p>
+ *
+ * @param p_oP
+ * DomElement - Parameter tree that contains the 4 attributes
+ * needed
+ * @throws Exception
+ * @see DomElement
+ * @see SimpleDataSource#SimpleDataSource(String,String,String,String)
+ * @see javax.sql.DataSource
+ */
+ SimpleDataSource(DomElement p_oP) throws Exception {
+ this(p_oP.getAttr(DRIVER), p_oP.getAttr(URL), p_oP.getAttr(USER), p_oP
+ .getAttr(PASSWORD));
+ } // ________________________________
- public void setLogWriter(PrintWriter out){ m_oPW = out; }
-} //______________________________________________________
+ /**
+ * Obtain a connection to a DB using the provided arguments to call
+ *
+ * @param p_sDriver
+ * String - Java class of the JDBC driver to use (e.g.
+ * org.postgresql.Driver)
+ * @param p_sDbURL
+ * String - The URL of the database (e.g.
+ * jdbc:postgresql://chodedb1:5432/cq3)
+ * @param p_sUsr
+ * String - Username
+ * @param p_sPwd
+ * String - Password
+ * @throws Exception
+ * @see DriverManager#getConnection(String,String,String)
+ * @see javax.sql.DataSource
+ */
+ public SimpleDataSource(String p_sDriver, String p_sDbURL, String p_sUsr,
+ String p_sPwd) throws Exception {
+ Class.forName(p_sDriver);
+ m_sUrl = p_sDbURL;
+ getConnection(p_sUsr, p_sPwd);
+ } // ________________________________
+
+ public Connection getConnection() {
+ return m_oConn;
+ }
+
+ public Connection getConnection(String username, String password) {
+ m_sUsr = username;
+ m_sPwd = password;
+ try {
+ m_oConn = DriverManager.getConnection(m_sUrl, m_sUsr, m_sPwd);
+ } catch (Exception e) {
+ m_oConn = null;
+ }
+ return m_oConn;
+ } // ________________________________
+
+ public int getLoginTimeout() {
+ return m_iTO;
+ }
+
+ public PrintWriter getLogWriter() {
+ return m_oPW;
+ }
+
+ public void setLoginTimeout(int seconds) {
+ m_iTO = seconds;
+ }
+
+ public void setLogWriter(PrintWriter out) {
+ m_oPW = out;
+ }
+} // ______________________________________________________
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,164 +1,177 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.helpers.persist;
import java.sql.*;
+public abstract class SqlDbTable {
+ protected String m_sTableName;
-public abstract class SqlDbTable
-{
- protected String m_sTableName;
- protected SqlField [] m_oaFields;
+ protected SqlField[] m_oaFields;
- protected PreparedStatement[] m_oaPS;
- private JdbcCleanConn m_oConn;
- public JdbcCleanConn getConn() { return m_oConn; }
+ protected PreparedStatement[] m_oaPS;
+ private JdbcCleanConn m_oConn;
- public final String getTableName() { return m_sTableName; }
- public final SqlField[] getAllFields() { return m_oaFields; }
+ public JdbcCleanConn getConn() {
+ return m_oConn;
+ }
- private String m_sInsertSql, m_sUpdateSql, m_sDeleteSql;
- protected String m_sSelectSql;
+ public final String getTableName() {
+ return m_sTableName;
+ }
- public SqlDbTable(JdbcCleanConn p_oC, String p_sTblNm) throws Exception
- { m_oConn = p_oC;
- m_sTableName = p_sTblNm;
- initFields();
- } //________________________________
+ public final SqlField[] getAllFields() {
+ return m_oaFields;
+ }
- public abstract int setInsValues(PreparedStatement p_PS,Object bobj) throws Exception;
- public abstract Object getFromRS(ResultSet p_oRS) throws Exception;
+ private String m_sInsertSql, m_sUpdateSql, m_sDeleteSql;
- protected abstract String getSelectFields();
+ protected String m_sSelectSql;
- public String getFldName(int p_i)
- { return (null ==m_oaFields) ? null
- : (p_i < 0) ? null
- : (p_i >= m_oaFields.length) ? null
- : m_oaFields[p_i].getFieldName();
- } //________________________________
+ public SqlDbTable(JdbcCleanConn p_oC, String p_sTblNm) throws Exception {
+ m_oConn = p_oC;
+ m_sTableName = p_sTblNm;
+ initFields();
+ } // ________________________________
- public String getSelectStatement()
- { if ( m_sSelectSql != null ) return m_sSelectSql;
- StringBuffer sb=new StringBuffer("select ").append(getSelectFields());
- m_sSelectSql = sb.append(" from ").append(getTableName()).toString();
- return m_sSelectSql;
- } //________________________________
+ public abstract int setInsValues(PreparedStatement p_PS, Object bobj)
+ throws Exception;
- public String getInsertStatement()
- {
- if ( m_sInsertSql != null ) return m_sInsertSql;
+ public abstract Object getFromRS(ResultSet p_oRS) throws Exception;
- StringBuffer sb=new StringBuffer(256);
- sb.append("insert into ").append(getTableName());
+ protected abstract String getSelectFields();
- sb.append(" values (");
- for (int i = 0; i <m_oaFields.length; i++) ((i<1)?sb:sb.append(",")).append('?');
- sb.append(')');
+ public String getFldName(int p_i) {
+ return (null == m_oaFields) ? null : (p_i < 0) ? null
+ : (p_i >= m_oaFields.length) ? null : m_oaFields[p_i]
+ .getFieldName();
+ } // ________________________________
- return (m_sInsertSql = sb.toString());
- } //________________________________
+ public String getSelectStatement() {
+ if (m_sSelectSql != null)
+ return m_sSelectSql;
+ StringBuffer sb = new StringBuffer("select ").append(getSelectFields());
+ m_sSelectSql = sb.append(" from ").append(getTableName()).toString();
+ return m_sSelectSql;
+ } // ________________________________
- public String getUpdateStatement()
- {
- if ( m_sUpdateSql != null ) return m_sUpdateSql;
+ public String getInsertStatement() {
+ if (m_sInsertSql != null)
+ return m_sInsertSql;
- StringBuffer sb=new StringBuffer(256);
- sb.append("update ").append(getTableName()).append(" set ");
+ StringBuffer sb = new StringBuffer(256);
+ sb.append("insert into ").append(getTableName());
- StringBuffer sbWhere = new StringBuffer(" where ");
+ sb.append(" values (");
+ for (int i = 0; i < m_oaFields.length; i++)
+ ((i < 1) ? sb : sb.append(",")).append('?');
+ sb.append(')');
- int iVal = 0;
- int iWh = 0;
- for (int i = 0; i <m_oaFields.length; i++)
- { SqlField oCurr = m_oaFields[i];
- if (oCurr.isPrimaryKey())
- ((iWh++<1)?sbWhere:sbWhere.append(" and "))
- .append(oCurr.getFieldName()).append(" = ?");
- else
- ((iVal++<1)?sb:sb.append(","))
- .append(oCurr.getFieldName()).append(" = ?");
- }
- sb.append(sbWhere);
+ return (m_sInsertSql = sb.toString());
+ } // ________________________________
- return (m_sUpdateSql = sb.toString());
- } //________________________________
+ public String getUpdateStatement() {
+ if (m_sUpdateSql != null)
+ return m_sUpdateSql;
- public String getDeleteStatement()
- {
- if ( m_sDeleteSql != null ) return m_sDeleteSql;
+ StringBuffer sb = new StringBuffer(256);
+ sb.append("update ").append(getTableName()).append(" set ");
- StringBuffer sb=new StringBuffer(256);
- sb.append("delete from ").append(getTableName())
- .append(" where ");
+ StringBuffer sbWhere = new StringBuffer(" where ");
- int iWh = 0;
- for (int i = 0; i <m_oaFields.length; i++)
- { SqlField oCurr = m_oaFields[i];
- if (! oCurr.isPrimaryKey()) continue;
- ((iWh++<1)?sb:sb.append(" and "))
- .append(oCurr.getFieldName()).append(" = ?");
- }
+ int iVal = 0;
+ int iWh = 0;
+ for (int i = 0; i < m_oaFields.length; i++) {
+ SqlField oCurr = m_oaFields[i];
+ if (oCurr.isPrimaryKey())
+ ((iWh++ < 1) ? sbWhere : sbWhere.append(" and ")).append(
+ oCurr.getFieldName()).append(" = ?");
+ else
+ ((iVal++ < 1) ? sb : sb.append(",")).append(
+ oCurr.getFieldName()).append(" = ?");
+ }
+ sb.append(sbWhere);
- return (m_sDeleteSql = sb.toString());
- } //________________________________
+ return (m_sUpdateSql = sb.toString());
+ } // ________________________________
- public void setObject(PreparedStatement p_PS, int p_iFld, Object p_sFldVal)
- throws SQLException
- { if (null!=p_sFldVal)
- if (p_sFldVal instanceof String)
- { String sTr = ((String)p_sFldVal).trim();
- p_sFldVal = (sTr.length()>0) ? sTr : null;
- }
- ;
- int iSqlIdx = 1 + p_iFld;
- if (null==p_sFldVal)p_PS.setNull (iSqlIdx, m_oaFields[p_iFld].getSqlType());
- else p_PS.setObject (iSqlIdx, p_sFldVal);
- } //________________________________
+ public String getDeleteStatement() {
+ if (m_sDeleteSql != null)
+ return m_sDeleteSql;
- public void setLong(PreparedStatement p_PS, int p_iFld, long p_lVal)
- throws SQLException
- { p_PS.setLong(1+p_iFld,p_lVal);
- } //________________________________
+ StringBuffer sb = new StringBuffer(256);
+ sb.append("delete from ").append(getTableName()).append(" where ");
- public void setInt(PreparedStatement p_PS, int p_iFld, int p_iVal)
- throws SQLException
- { p_PS.setInt(1+p_iFld,p_iVal);
- } //________________________________
+ int iWh = 0;
+ for (int i = 0; i < m_oaFields.length; i++) {
+ SqlField oCurr = m_oaFields[i];
+ if (!oCurr.isPrimaryKey())
+ continue;
+ ((iWh++ < 1) ? sb : sb.append(" and "))
+ .append(oCurr.getFieldName()).append(" = ?");
+ }
- private void initFields() throws Exception
- { PreparedStatement PS = m_oConn.prepareStatement(getSelectStatement());
+ return (m_sDeleteSql = sb.toString());
+ } // ________________________________
- ResultSetMetaData MD = m_oConn.execQueryWait(PS,3).getMetaData();
- m_oaFields = new SqlField[MD.getColumnCount()];
- for (int i1=0; i1<m_oaFields.length;i1++)
- { int iCol = 1+i1;
- String sFN = MD.getColumnName(iCol);
- Class oCL = Class.forName(MD.getColumnClassName(iCol));
- int iTP = MD.getColumnType(iCol);
- int iSZ = MD.getColumnDisplaySize(iCol);
- m_oaFields[i1] = new SqlField(sFN,oCL,iTP,iSZ,false);
- }
- PS.close();
- } //________________________________
-} //____________________________________________________________________________
+ public void setObject(PreparedStatement p_PS, int p_iFld, Object p_sFldVal)
+ throws SQLException {
+ if (null != p_sFldVal)
+ if (p_sFldVal instanceof String) {
+ String sTr = ((String) p_sFldVal).trim();
+ p_sFldVal = (sTr.length() > 0) ? sTr : null;
+ }
+ ;
+ int iSqlIdx = 1 + p_iFld;
+ if (null == p_sFldVal)
+ p_PS.setNull(iSqlIdx, m_oaFields[p_iFld].getSqlType());
+ else
+ p_PS.setObject(iSqlIdx, p_sFldVal);
+ } // ________________________________
+
+ public void setLong(PreparedStatement p_PS, int p_iFld, long p_lVal)
+ throws SQLException {
+ p_PS.setLong(1 + p_iFld, p_lVal);
+ } // ________________________________
+
+ public void setInt(PreparedStatement p_PS, int p_iFld, int p_iVal)
+ throws SQLException {
+ p_PS.setInt(1 + p_iFld, p_iVal);
+ } // ________________________________
+
+ private void initFields() throws Exception {
+ PreparedStatement PS = m_oConn.prepareStatement(getSelectStatement());
+
+ ResultSetMetaData MD = m_oConn.execQueryWait(PS, 3).getMetaData();
+ m_oaFields = new SqlField[MD.getColumnCount()];
+ for (int i1 = 0; i1 < m_oaFields.length; i1++) {
+ int iCol = 1 + i1;
+ String sFN = MD.getColumnName(iCol);
+ Class oCL = Class.forName(MD.getColumnClassName(iCol));
+ int iTP = MD.getColumnType(iCol);
+ int iSZ = MD.getColumnDisplaySize(iCol);
+ m_oaFields[i1] = new SqlField(sFN, oCL, iTP, iSZ, false);
+ }
+ PS.close();
+ } // ________________________________
+} // ____________________________________________________________________________
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlField.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlField.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/persist/SqlField.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,53 +1,83 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.helpers.persist;
-public class SqlField
-{
- private int m_sqlType;
- private Class m_javaType;
- private int m_sqlLength;
- private String m_fieldName;
- private boolean m_primaryKey;
+public class SqlField {
+ private int m_sqlType;
- public SqlField(String pFldName,Class pJavaType,int pSqlType
- ,int pFieldLength, boolean pk)
- {
- m_fieldName = pFldName;
- m_javaType = pJavaType;
- m_sqlType = pSqlType;
- m_sqlLength = pFieldLength;
- m_primaryKey = pk;
- }
+ private Class m_javaType;
- public int getSqlType() { return m_sqlType; }
- public Class getJavaType() { return m_javaType; }
- public int getSqlLength() { return this.m_sqlLength; }
- public String getFieldName() { return this.m_fieldName; }
- public boolean isPrimaryKey() { return this.m_primaryKey; }
+ private int m_sqlLength;
- public void setSqlType(int pSqlType) { m_sqlType = pSqlType; }
- public void setJavaType(Class pJavaType) { m_javaType = pJavaType; }
- public void setSqlLength(int pSqlLength) { m_sqlLength = pSqlLength; }
- public void setFieldName(String pFieldName) { m_fieldName = pFieldName; }
- public void setPrimaryKey(boolean pPrimaryKey) { m_primaryKey = pPrimaryKey; }
-} //____________________________________________________________________________
+ private String m_fieldName;
+
+ private boolean m_primaryKey;
+
+ public SqlField(String pFldName, Class pJavaType, int pSqlType,
+ int pFieldLength, boolean pk) {
+ m_fieldName = pFldName;
+ m_javaType = pJavaType;
+ m_sqlType = pSqlType;
+ m_sqlLength = pFieldLength;
+ m_primaryKey = pk;
+ }
+
+ public int getSqlType() {
+ return m_sqlType;
+ }
+
+ public Class getJavaType() {
+ return m_javaType;
+ }
+
+ public int getSqlLength() {
+ return this.m_sqlLength;
+ }
+
+ public String getFieldName() {
+ return this.m_fieldName;
+ }
+
+ public boolean isPrimaryKey() {
+ return this.m_primaryKey;
+ }
+
+ public void setSqlType(int pSqlType) {
+ m_sqlType = pSqlType;
+ }
+
+ public void setJavaType(Class pJavaType) {
+ m_javaType = pJavaType;
+ }
+
+ public void setSqlLength(int pSqlLength) {
+ m_sqlLength = pSqlLength;
+ }
+
+ public void setFieldName(String pFieldName) {
+ m_fieldName = pFieldName;
+ }
+
+ public void setPrimaryKey(boolean pPrimaryKey) {
+ m_primaryKey = pPrimaryKey;
+ }
+} // ____________________________________________________________________________
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/DefaultReposFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/DefaultReposFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/DefaultReposFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,134 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.parameters;
-
-import java.io.*;
-import java.util.Properties;
-
-import javax.naming.CompoundName;
-import javax.naming.InvalidNameException;
-import javax.naming.Name;
-
-import org.jboss.soa.esb.helpers.DomElement;
-
-public class DefaultReposFactory
-{
- public static FileReposit getRepository(Object p_o)
- {
- return new FileReposit();
-
- } //________________________________
-
- /**
- * This is a dummy class to provide basic (extremely basic)
- * storage/retrieval of parameter trees for jboss.esb
- * in a file system
- *
- * @author Esteban
- *
- */
- public static class FileReposit implements ParamsRepository
- {
- // Only this factory can instantiate an object of this class
- private FileReposit() {}
-
- public DomElement getElement(Name pName) throws Exception
- {
- return getFromFile(pName);
- } //____________________________
-
- public DomElement removeElement(Name pName) throws Exception
- {
- File oF = fileFromName(pName);
- if (! oF.exists())
- return null;
- DomElement oRet = getFromFile(oF);
- oF.delete();
- return oRet;
- } //____________________________
-
- public void removeSubree(Name pName) throws Exception
- { purgeSubTree(fileFromName(pName));
- } //____________________________
-
- public DomElement storeElement(Name pName, DomElement p_oNew)
- throws Exception
- {
- if (pName.size() < 1)
- throw new Exception("Name has no elements");
- File oF = fileFromName(pName);
- DomElement oOld = getFromFile(oF);
- if (null==p_oNew)
- { if (oF.exists())
- oF.delete();
- return oOld;
- }
- dirFromName(pName).mkdirs();
- ByteArrayOutputStream oByStr = p_oNew.toXml();
- FileOutputStream oOut = new FileOutputStream(oF);
- oOut.write(oByStr.toByteArray());
- oOut.close();
-
- return oOld;
- } //____________________________
-
- private static DomElement getFromFile(Name pName) throws Exception
- { return getFromFile(fileFromName(pName));
- } //____________________________
-
- private static DomElement getFromFile(File p_oF) throws Exception
- { if (! p_oF.exists()) return null;
- return DomElement.fromInputStream(new FileInputStream(p_oF));
- } //____________________________
-
- public static File dirFromName(Name pName)
- { int iMax = pName.size()-1;
- StringBuilder sb = new StringBuilder();
- for (int i1=0; i1<iMax; i1++)
- ((i1<1) ? sb : sb.append("/")).append(pName.get(i1));
- return new File(sb.toString());
- } //____________________________
-
- public static File fileFromName(Name pName)
- { return new File(dirFromName(pName),pName.get(-1+pName.size()));
- } //____________________________
-
- private void purgeSubTree(File oF)
- { if (! oF.exists()) return;
- if (oF.isDirectory())
- for (File oCurr : oF.listFiles())
- purgeSubTree(oCurr);
- oF.delete();
- } //____________________________
-
- private static final Properties s_oSyntax = new Properties();
- static
- { s_oSyntax.setProperty("jndi.syntax.direction","left_to_right");
- s_oSyntax.setProperty("jndi.syntax.separator","/");
- };
-
- public Name nameFromString(String p_s)
- throws InvalidNameException
- { return new CompoundName(p_s,s_oSyntax);
- } //________________________________
- } //____________________________________________________
-} //____________________________________________________________________________
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamFileRepository.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/parameters/ParamFileRepository.java)
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepository.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepository.java)
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java)
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsReposUtil.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsReposUtil.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsReposUtil.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,55 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.parameters;
-
-import java.lang.reflect.*;
-
-import org.jboss.soa.esb.common.SystemProperties;
-
-public class ParamsReposUtil
-{
- private ParamsReposUtil() {};
-
- public static ParamsRepository reposFromFactory
- (String p_sFactoryName, Object p_oFactoryParam)
- throws Exception
- {
- Class oFactClass = DefaultReposFactory.class;
- if (null!=p_sFactoryName)
- oFactClass = Class.forName(p_sFactoryName);
- Method oMth = oFactClass.getMethod("getRepository"
- ,new Class[] {Object.class});
- return (ParamsRepository) oMth.invoke(null,p_oFactoryParam);
- } //________________________________
-
- public static ParamsRepository reposFromFactory
- (Object p_oFactoryParam)
- throws Exception
- {
- String sFactClass
- = System.getProperty(SystemProperties.PARAMS_REPOS_FACTORY_CLASS);
- return reposFromFactory(sFactClass,p_oFactoryParam);
- } //________________________________
-
-} //____________________________________________________________________________
Deleted: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsRepository.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsRepository.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/parameters/ParamsRepository.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,37 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.parameters;
-
-import javax.naming.Name;
-import org.jboss.soa.esb.helpers.DomElement;
-
-public interface ParamsRepository
-{
- public Name nameFromString (String p_s) throws Exception;
- public DomElement storeElement
- (Name pName, DomElement p_oNew) throws Exception;
- public DomElement getElement (Name pName) throws Exception;
- public DomElement removeElement (Name pName) throws Exception;
- public void removeSubree (Name pName) throws Exception;
-} //____________________________________________________________________________
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IbatchHandler.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IbatchHandler.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IbatchHandler.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -31,6 +31,5 @@
public long newBatch () throws Exception;
public int addToBatch (String p_s) throws Exception;
public void finish () throws Exception;
- public void releaseHandler();
public void commitBatch(BatchProcess p_oBP) throws Exception;
} //____________________________________________________________________________
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/InotificationHandler.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/InotificationHandler.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/InotificationHandler.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -25,10 +25,37 @@
import org.jboss.soa.esb.helpers.*;
import java.io.Serializable;
+/**
+ * Use this interface to group all methods that can be useful to
+ * trigger events that can be caught by listeners, within or outside of
+ * the Rosetta framework
+ *
+ * @author Esteban
+ *
+ */
public interface InotificationHandler {
// REVIEW: Add some Javadoc for this interface!!!
-
+/**
+ * public void sendNotifications(DomElement p_oP, Serializable p_o)
+ *
+ * @param p_oP DomElement - A serialized NotificationList object (as a DomElement)
+ * @param p_o The Serializable object that will be sent to all the
+ * NotificationTarget objects contained in the NotificationList
+ *
+ * <p/>Implementations of this interface will be responsible of sending
+ * the Serializable (arg 1) to destinations determined by each
+ * NotificationTarget contained in the NotificationList represented by
+ * arg 0.
+ * <p/>Please see org.jboss.soa.esb.notification package for existing
+ * classes that extend NotificationTarget (Files, Queues, Topics, SqlTable...)
+ *
+ * <p/> Invoking processes are responsible to provide dynamic content
+ * of notification
+ * <p/> The NotificationTarget objects can define 'static' content for
+ * (suc as contents of certain columns in SQL, or message properties for
+ * JMS notification targets, etc.
+ */
public void sendNotifications(DomElement p_oP, Serializable p_o) throws Exception;
public void sendNotifications(Serializable p_o) throws Exception;
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IpersistHandler.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IpersistHandler.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/services/IpersistHandler.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -35,5 +35,4 @@
public BaseBusinessObject getObject(Class p_oCls,long p_lUid) throws Exception;
public void rplObject(BaseBusinessObject p_o) throws Exception;
public void rmvObject(Class p_oCls,long p_lUid) throws Exception;
- public void remove() throws Exception;
} //____________________________________________________________________________
Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -488,5 +488,25 @@
((BobjStdDTO) oCurr.getValue()).Dump(1 + p_iLev);
}
} // __________________________________
-
+
+ public BaseBusinessObject getBobj(String p_sObj)
+ { if (null == p_sObj) return null;
+ try
+ { BobjStdDTO oDto = this.getDTO(p_sObj);
+ return BaseBusinessObject.getFromDTO(oDto);
+ }
+ catch (Exception e) {return null; }
+ } //__________________________________
+
+ @SuppressWarnings("unchecked")
+ public void addBobj(String p_sKey, BaseBusinessObject p_oBob) throws Exception
+ { if (isList()) throw new Exception("BObjStdDTO is a List");
+ if (null == p_sKey) return;
+ m_oAtts.remove(p_sKey);
+ if (null == p_oBob) return;
+ BobjStdDTO oDto = p_oBob.toDTO();
+ if (oDto.isEmpty()) return;
+ oDto.m_sElemNm=p_sKey;
+ m_oAtts.put(p_sKey,oDto);
+ } //__________________________________
} // ____________________________________________________________________________
Copied: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/util/StreamUtils.java (from rev 5491, labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/StreamUtils.java)
Property changes on: labs/jbossesb/branches/refactor/product/core/common/tests
___________________________________________________________________
Name: svn:ignore
+
TESTS-TestSuites.xml
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/build.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/build.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -8,7 +8,7 @@
<property name="org.jboss.esb.tests.report.dir" value="${org.jboss.esb.internal.dest}/tests/junit"/>
<property name="org.jboss.esb.root.dir" value="../.."/>
<property environment="env"/>
-
+ <property name="org.jboss.esb.ejb3.lib.dir" value="../${org.jboss.esb.root.dir}/lib/ejb3_embedded"/>
<property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
<condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
@@ -17,6 +17,8 @@
<path id="org.jboss.esb.tests.base.classpath">
<fileset dir="../${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
<pathelement location="${org.jboss.esb.module.classes.dir}"/>
+ <fileset dir="${org.jboss.esb.ejb3.lib.dir}" includes="jboss-ejb3-all.jar hibernate-all.jar thirdparty-all"/>
+
</path>
<target name="org.jboss.esb.tests.init">
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources)
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/default.persistence.properties
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/default.persistence.properties 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/default.persistence.properties 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,17 +0,0 @@
-hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
-#hibernate.connection.release_mode=after_statement
-#hibernate.transaction.flush_before_completion=false
-#hibernate.transaction.auto_close_session=false
-#hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory
-#hibernate.hbm2ddl.auto=create-drop
-#hibernate.hbm2ddl.auto=create
-hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
-# Clustered cache with TreeCache
-#hibernate.cache.provider_class=org.jboss.ejb3.entity.TreeCacheProviderHook
-#hibernate.treecache.mbean.object_name=jboss.cache:service=EJB3EntityTreeCache
-#hibernate.dialect=org.hibernate.dialect.HSQLDialect
-hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-hibernate.bytecode.use_reflection_optimizer=false
-# I don't think this is honored, but EJB3Deployer uses it
-hibernate.bytecode.provider=javassist
\ No newline at end of file
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/default.persistence.properties (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/default.persistence.properties)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,376 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE aop PUBLIC
- "-//JBoss//DTD JBOSS AOP 1.0//EN"
- "http://www.jboss.org/aop/dtd/jboss-aop_1_0.dtd">
-
-<aop>
- <interceptor class="org.jboss.aspects.remoting.InvokeRemoteInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.aspects.security.SecurityClientInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.aspects.tx.ClientTxPropagationInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.remoting.IsLocalInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.aspects.remoting.ClusterChooserInterceptor" scope="PER_VM"/>
-
- <interceptor class="org.jboss.aspects.tx.TxPropagationInterceptor" scope="PER_VM"/>
-
- <stack name="ServiceClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="AsynchronousStatelessSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="AsynchronousStatefulSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="StatelessSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="StatefulSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="ClusteredStatelessSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="ClusteredStatefulSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <interceptor class="org.jboss.ejb3.asynchronous.AsynchronousInterceptor" scope="PER_CLASS"/>
- <interceptor class="org.jboss.ejb3.ENCPropagationInterceptor" scope="PER_VM"/>
- <interceptor name="Basic Authorization" factory="org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/>
- <interceptor name="JACC Authorization" factory="org.jboss.ejb3.security.JaccAuthorizationInterceptorFactory" scope="PER_CLASS"/>
- <interceptor factory="org.jboss.ejb3.security.AuthenticationInterceptorFactory" scope="PER_CLASS"/>
- <interceptor factory="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/>
- <interceptor class="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.stateless.StatelessInstanceInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.stateful.StatefulInstanceInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.service.ServiceSingletonInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.cache.StatefulReplicationInterceptor" scope="PER_VM"/>
- <interceptor factory="org.jboss.ejb3.stateful.StatefulRemoveFactory" scope="PER_CLASS_JOINPOINT"/>
- <interceptor factory="org.jboss.ejb3.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
- <interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/>
- <interceptor factory="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory" scope="PER_CLASS"/>
- <interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/>
- <interceptor factory="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory" scope="PER_CLASS"/>
- <interceptor class="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor" scope="PER_VM"/>
-
- <domain name="Stateless Bean">
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
- <interceptor-ref name="Basic Authorization"/>
- </bind>
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
- <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
- </domain>
-
- <domain name="JACC Stateless Bean">
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
- <interceptor-ref name="JACC Authorization"/>
- </bind>
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
- <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
- </domain>
-
- <domain name="Base Stateful Bean">
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
- <interceptor-ref name="Basic Authorization"/>
- </bind>
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
- <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->@javax.ejb.Remove(..))">
- <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- </bind>
- <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
-
- <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
- <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
- </domain>
-
- <domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
- <!-- NON Clustered cache configuration -->
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
- </annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
- </annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300)
- </annotation>
-
- <!-- Clustered cache configuration -->
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
- </annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
- </annotation>
- </domain>
-
- <domain name="JACC Stateful Bean">
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
- <interceptor-ref name="JACC Authorization"/>
- </bind>
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
- <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->@javax.ejb.Remove(..))">
- <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- </bind>
- <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
-
- <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
- <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
-
- <!-- NON Clustered cache configuration -->
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
- </annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
- </annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300)
- </annotation>
-
- <!-- Clustered cache configuration -->
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
- </annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
- @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
- </annotation>
- </domain>
-
- <domain name="Embedded Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
- <!-- NON Clustered cache configuration -->
- <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache)">
- @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class)
- </annotation>
-
- </domain>
-
- <domain name="Message Driven Bean">
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
- </domain>
-
- <domain name="Message Inflow Driven Bean">
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
- </domain>
-
- <domain name="Consumer Bean">
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- </bind>
- <bind pointcut="execution(public * *->*(..)) AND (has(* *->@org.jboss.annotation.ejb.CurrentMessage(..)) OR hasfield(* *->@org.jboss.annotation.ejb.CurrentMessage))">
- <interceptor-ref name="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- </annotation>
- </domain>
-
- <domain name="Service Bean">
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
- </bind>
- <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))">
- <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
- <interceptor-ref name="Basic Authorization"/>
- </bind>
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- </bind>
- <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- </domain>
-
- <domain name="JACC Service Bean">
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
- </bind>
- <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))">
- <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
- <interceptor-ref name="Basic Authorization"/>
- </bind>
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- </bind>
- <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- </domain>
-
-
-</aop>
\ No newline at end of file
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/ejb3-interceptors-aop.xml)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/embedded-jboss-beans.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/embedded-jboss-beans.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/embedded-jboss-beans.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
- <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/>
-
- <bean name="InitialContextProperties" class="java.util.Hashtable">
- <constructor>
- <parameter class="java.util.Map">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry>
- <key>java.naming.factory.initial</key>
- <value>org.jnp.interfaces.LocalOnlyContextFactory</value>
- </entry>
- <entry>
- <key>java.naming.factory.url.pkgs</key>
- <value>org.jboss.naming:org.jnp.interfaces</value>
- </entry>
- </map>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="java:comp/Initializer" class="org.jboss.ejb3.embedded.JavaCompInitializer">
- <property name="jndiProperties"><inject bean="InitialContextProperties"/></property>
- </bean>
-
- <bean name="XidFactory" class="org.jboss.tm.XidFactoryImpl"/>
-
- <bean name="XidFactoryMBean" class="org.jboss.ejb3.embedded.XidFactoryMBean">
- <constructor>
- <parameter class="org.jboss.tm.XidFactoryBase">
- <inject bean="XidFactory"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="TransactionManagerInitializer" class="org.jboss.tm.TransactionManagerInitializer">
- <property name="xidFactory"><inject bean="XidFactory"/></property>
- <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
- </bean>
-
- <bean name="UserTransaction" class="org.jboss.ejb3.embedded.UserTransactionImpl">
- <demand>TransactionManagerInitializer</demand>
- </bean>
-
- <bean name="UserTransactionBinding" class="org.jboss.ejb3.embedded.JndiBinder">
- <property name="jndiProperties"><inject bean="InitialContextProperties"/></property>
- <property name="target"><inject bean="UserTransaction"/></property>
- <property name="bindTo">UserTransaction</property>
- <property name="serializable">false</property>
- </bean>
-
-
- <bean name="TransactionManager" class="java.lang.Object">
- <constructor factoryMethod="getTransactionManager">
- <factory bean="TransactionManagerInitializer"/>
- </constructor>
- </bean>
- <bean name="CachedConnectionManager" class="org.jboss.resource.connectionmanager.CachedConnectionManagerReference">
- <property name="transactionManager"><inject bean="TransactionManager"/></property>
- </bean>
-
- <!--
- <bean class="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic,database=localDB">
- <property name="database">localDB</property>
- <property name="inProcessMode">true</property>
- <property name="dbDataDir">.</property>
- </bean>
- -->
-
- <bean name="DefaultDSBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
- <property name="driverClass">org.hsqldb.jdbcDriver</property>
- <property name="connectionURL">jdbc:hsqldb:.</property>
- <!-- <property name="connectionURL">jdbc:hsqldb:./hypersonic/localDB</property> -->
- <property name="userName">sa</property>
- <property name="jndiName">java:/DefaultDS</property>
- <property name="minSize">0</property>
- <property name="maxSize">10</property>
- <property name="blockingTimeout">1000</property>
- <property name="idleTimeout">100000</property>
- <property name="transactionManager"><inject bean="TransactionManager"/></property>
- <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
- <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
- </bean>
-
- <bean name="DefaultDS" class="java.lang.Object">
- <constructor factoryMethod="getDatasource">
- <factory bean="DefaultDSBootstrap"/>
- </constructor>
- </bean>
-
-
-</deployment>
\ No newline at end of file
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/embedded-jboss-beans.xml (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/embedded-jboss-beans.xml)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/jboss-jms-beans.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/jboss-jms-beans.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/jboss-jms-beans.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
- <bean name="jboss.mq:service=JMSProviderLoader,name=JMSProvider" class="org.jboss.jms.jndi.JNDIProviderAdapter">
- <property name="factoryRef">java:/XAConnectionFactory</property>
- <property name="queueFactoryRef">java:/XAConnectionFactory</property>
- <property name="topicFactoryRef">java:/XAConnectionFactory</property>
- <property name="properties" class="java.util.Properties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry>
- <key>java.naming.factory.initial</key>
- <value>org.jnp.interfaces.LocalOnlyContextFactory</value>
- </entry>
- <entry>
- <key>java.naming.factory.url.pkgs</key>
- <value>org.jboss.naming:org.jnp.interfaces</value>
- </entry>
- </map>
- </property>
- </bean>
-
- <bean name="b1" class="org.jboss.ejb3.embedded.JndiBinder">
- <property name="jndiProperties"><inject bean="InitialContextProperties"/></property>
- <property name="target"><inject bean="jboss.mq:service=JMSProviderLoader,name=JMSProvider"/></property>
- <property name="bindTo">java:/DefaultJMSProvider</property>
- <property name="serializable">true</property>
- </bean>
-
- <bean name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool" class="org.jboss.jms.asf.StdServerSessionPoolFactory">
- <property name="name">StdJMSPool</property>
- <property name="xidFactory"><inject bean="XidFactoryMBean"/></property>
- <property name="transactionManager"><inject bean="TransactionManager"/></property>
- </bean>
-
- <bean name="b2" class="org.jboss.ejb3.embedded.JndiBinder">
- <property name="jndiProperties"><inject bean="InitialContextProperties"/></property>
- <property name="target"><inject bean="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool"/></property>
- <property name="bindTo">java:/StdJMSPool</property>
- <property name="serializable">false</property>
- </bean>
-
-
- <bean name="jboss.mq:service=PersistenceManager" class="org.jboss.mq.kernel.JDBC2PersistenceManager">
- <property name="transactionManager">
- <inject bean="TransactionManager"/>
- </property>
- <property name="datasource">
- <inject bean="DefaultDS"/>
- </property>
- <property name="sqlProperties">
-
- BLOB_TYPE=OBJECT_BLOB
- INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
- INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
- SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
- SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
- SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
- SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
- MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
- UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
- UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
- UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
- DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXOP=? AND JMS_MESSAGES.TXID IN (SELECT TXID FROM JMS_TRANSACTIONS)
- DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
- DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
- DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
- CREATE_MESSAGE_TABLE = CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \
- DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
- MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
- CREATE_IDX_MESSAGE_TXOP_TXID = CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID)
- CREATE_IDX_MESSAGE_DESTINATION = CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION)
- CREATE_TX_TABLE = CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
- CREATE_TABLES_ON_STARTUP = TRUE
- DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T'
-
- </property>
- </bean>
-
- <bean name="jboss.mq:service=MessageCache" class="org.jboss.mq.kernel.MessageCache">
- <property name="persistenceManager"><inject bean="jboss.mq:service=PersistenceManager"/></property>
- <property name="highMemoryMark">50</property>
- <property name="maxMemoryMark">60</property>
- </bean>
-
- <bean name="jboss.mq:service=StateManager" class="org.jboss.mq.kernel.JDBCStateManager">
- <property name="transactionManager">
- <inject bean="TransactionManager"/>
- </property>
- <property name="datasource">
- <inject bean="DefaultDS"/>
- </property>
- <property name="sqlProperties">
-
- CREATE_TABLES_ON_STARTUP = TRUE
- CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
- CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
- CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
- PRIMARY KEY(USERID, ROLEID))
- CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
- SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
- SELECTOR VARCHAR(255), PRIMARY KEY(CLIENTID, SUBNAME))
- GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
- LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
- GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
- INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
- UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
- REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
- GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
- GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
- POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
- POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
- POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
- POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
- POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
- POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
- POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
- POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
- POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
- POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
- POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
- POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
- POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')
- POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody')
-
- </property>
- </bean>
-
-
- <bean name="BasicQueueParameters" class="org.jboss.mq.server.BasicQueueParameters"/>
-
- <bean name="jboss.mq:service=ThreadPool" class="org.jboss.util.threadpool.BasicThreadPool">
- <property name="name">JMSThread</property>
- <property name="threadGroupName">JBossMQ Server Threads</property>
- <!-- The max number of threads in the pool -->
- <property name="maximumPoolSize">10</property>
- <!-- The max number of tasks before the queue is full -->
- <property name="maximumQueueSize">1000</property>
- <!-- The behavior of the pool when a task is added and the queue is full.
- abort - a RuntimeException is thrown
- run - the calling thread executes the task
- wait - the calling thread blocks until the queue has room
- discard - the task is silently discarded without being run
- discardOldest - check to see if a task is about to complete and enque
- the new task if possible, else run the task in the calling thread
- -->
- <property name="blockingModeString">run</property>
- </bean>
-
- <bean name="jboss.mq:service=DestinationManager" class="org.jboss.mq.server.JMSDestinationManager">
- <constructor>
- <parameter class="org.jboss.mq.server.BasicQueueParameters">
- <inject bean="BasicQueueParameters"/>
- </parameter>
- </constructor>
- <property name="persistenceManager"><inject bean="jboss.mq:service=PersistenceManager"/></property>
- <property name="messageCache"><inject bean="jboss.mq:service=MessageCache"/></property>
- <property name="stateManager"><inject bean="jboss.mq:service=StateManager"/></property>
- <property name="threadPool"><inject bean="jboss.mq:service=ThreadPool"/></property>
- <property name="threadGroup"><inject bean="jboss.mq:service=ThreadPool" property="threadGroup"/></property>
- <start method="startServer"/>
- <stop method="stopServer"/>
- </bean>
-
- <bean name="jboss.mq.destination:service=Queue,name=DLQ" class="org.jboss.mq.kernel.Queue">
- <property name="destinationManagerPojo"><inject bean="jboss.mq:service=DestinationManager"/></property>
- <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
- <property name="destinationName">DLQ</property>
- </bean>
-
- <bean name="jboss.mq:service=Invoker" class="org.jboss.mq.server.JMSServerInvoker">
- <property name="next"><inject bean="jboss.mq:service=DestinationManager"/></property>
- </bean>
-
- <bean name="jboss.mq:service=InvocationLayer,type=JVM" class="org.jboss.mq.kernel.JVMIL">
- <property name="jmsInvoker"><inject bean="jboss.mq:service=Invoker"/></property>
- <property name="connectionFactoryJNDIRef">java:/ConnectionFactory</property>
- <property name="xAConnectionFactoryJNDIRef">java:/XAConnectionFactory</property>
- <property name="pingPeriod">0</property>
- <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
- </bean>
-
-</deployment>
\ No newline at end of file
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/jboss-jms-beans.xml (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/jboss-jms-beans.xml)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/log4j.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/log4j.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.1 2006/01/12 02:44:08 bill Exp $ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Target" value="System.out"/>
- <param name="Threshold" value="INFO"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Messagen -->
- <!--
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
- -->
- <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
- </layout>
-</appender>
-
- <root>
- <appender-ref ref="CONSOLE"/>
- </root>
-
-</log4j:configuration>
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/log4j.xml (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/log4j.xml)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/login-config.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/login-config.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/login-config.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,63 +0,0 @@
-<?xml version='1.0'?>
-
-<!DOCTYPE policy PUBLIC
- "-//JBoss//DTD JBOSS Security Config 3.0//EN"
- "http://www.jboss.org/j2ee/dtd/security_config.dtd">
-
-<!-- The XML based JAAS login configuration read by the
-org.jboss.security.auth.login.XMLLoginConfig mbean. Add
-an application-policy element for each security domain.
-
-The outline of the application-policy is:
-<application-policy name="security-domain-name">
- <authentication>
- <login-module code="login.module1.class.name" flag="control_flag">
- <module-option name = "option1-name">option1-value</module-option>
- <module-option name = "option2-name">option2-value</module-option>
- ...
- </login-module>
-
- <login-module code="login.module2.class.name" flag="control_flag">
- ...
- </login-module>
- ...
- </authentication>
-</application-policy>
-
-$Revision: 1.1 $
--->
-
-<policy>
- <!-- Used by clients within the application server VM such as
- mbeans and servlets that access EJBs.
- -->
- <application-policy name="client-login">
- <authentication>
- <login-module code="org.jboss.security.ClientLoginModule"
- flag="required">
- <!-- Any existing security context will be restored on logout -->
- <module-option name="restore-login-identity">true</module-option>
- </login-module>
- </authentication>
- </application-policy>
-
- <application-policy name="other">
- <!-- A simple server login module, which can be used when the number
- of users is relatively small. It uses two properties files:
- users.properties, which holds users (key) and their password (value).
- roles.properties, which holds users (key) and a comma-separated list of
- their roles (value).
- The unauthenticatedIdentity property defines the name of the principal
- that will be used when a null username and password are presented as is
- the case for an unuathenticated web client or MDB. If you want to
- allow such users to be authenticated add the property, e.g.,
- unauthenticatedIdentity="nobody"
- -->
- <authentication>
- <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
- flag="required"/>
- </authentication>
- </application-policy>
-
-</policy>
-
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/login-config.xml (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/login-config.xml)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/security-beans.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/resources/conf/security-beans.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/security-beans.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
-
- <bean class="org.jboss.ejb3.embedded.JaasSecurityManagerService"
- name="jboss.security:service=JaasSecurityManager">
- <property name="initialContextProperties">
- <inject bean="InitialContextProperties"/>
- </property>
- </bean>
-</deployment>
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/security-beans.xml (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/resources/conf/security-beans.xml)
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -21,8 +21,11 @@
*/
package org.jboss.soa.esb.common.tests;
+import java.util.HashMap;
+
+import org.apache.log4j.Logger;
+
import junit.framework.TestCase;
-import org.jboss.logging.Logger;
/**
* Base test class for esb test classes, uses jboss logging.
@@ -32,24 +35,60 @@
* $Id:$
*/
public class BaseTest extends TestCase {
+
+ /** The Database driver used for unit tests */
+ public static String DB_DRIVER = "org.jboss.esb.db.driver";
- /**
- * The Logger.
- */
- protected Logger log = Logger.getLogger(getClass());
+ /** The Database connection url used for unit tests */
+ public static String DB_URL = "org.jboss.esb.db.url";
+ /** The Database user name used for unit tests */
+ public static String DB_USERNAME = "org.jboss.esb.db.username";
+
+ /** The Database password used for unit tests */
+ public static String DB_PASSWORD = "org.jboss.esb.db.password";
+
+ /** The Logger. */
+ protected Logger log = Logger.getLogger(getClass());
+
+ /** Contains user and or deployment specific paramater */
+ private static HashMap<String,String> SYSTEM_PARAMETERS;
/**
* Default class constructor.
*/
- public BaseTest() {
- }
+ public BaseTest() {
+ SYSTEM_PARAMETERS = readSystemParameters();
+ }
/**
* Utility constructor.
* @param name The test name.
*/
- public BaseTest(String name) {
+ public BaseTest(String name) {
super(name);
- }
+ SYSTEM_PARAMETERS = readSystemParameters();
+ }
+ /**
+ * Reading system parameter that are set by the ant build when
+ * invoking the junit call. The parameter values should be set in
+ * the deployment.properties file. If the particular parameter is not
+ * found it will receive a default value.
+ */
+ private HashMap<String,String> readSystemParameters()
+ {
+ //Reading system parameter
+ String dbDriver = System.getProperty(DB_DRIVER , "org.postgresql.Driver");
+ String dbUrl = System.getProperty(DB_PASSWORD, "jdbc:postgresql://localhost:5432/jbossesb");
+ String dbUsername = System.getProperty(DB_USERNAME, "postgres");
+ String dbPassword = System.getProperty(DB_PASSWORD, "postgres");
+ //Setting the paremeters in the HashMap
+ HashMap<String,String> systemParameters = new HashMap<String,String>();
+ systemParameters.put(DB_DRIVER, dbDriver);
+ systemParameters.put(DB_URL, dbUrl);
+ systemParameters.put(DB_USERNAME, dbUsername);
+ systemParameters.put(DB_PASSWORD, dbPassword);
+
+ return systemParameters;
+ }
}
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/EJBContainerSetup.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/common/tests/EJBContainerSetup.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,71 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import junit.framework.TestCase;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-/**
- * TODO
- * User: MohitK
- * Date: Aug 3, 2006
- */
-public class AbandonedConnectionFuncTest extends TestCase {
-
- Properties properties = new Properties();
-
- protected void setUp() throws Exception {
- properties.put(ConnectionProperties.DRIVER_CLASSNAME, "com.mysql.jdbc.Driver");
- properties.put(ConnectionProperties.CONNECTION_URL, "jdbc:mysql://localhost/rosetta");
- properties.put(ConnectionProperties.USERNAME, "rosetta");
- properties.put(ConnectionProperties.PASSWORD, "rosetta");
- properties.put(ConnectionProperties.ABANDONED_CONNECTION_CHECK_INTERVAL, "30000");
- }
-
-
- public void testAbandonedConnections() {
- PoolDataSource ds = new PoolDataSource();
- ds.setConnectionProperties(properties);
- Connection con1 = null;
- Connection con2 = null;
- Connection con3 = null;
- try {
- con1 = ds.getConnection();
- con2 = ds.getConnection();
- try {
- Thread.sleep(70000);
- } catch (InterruptedException e) {
- //Do nothing
- }
- con1.createStatement();
- } catch (SQLException e) {
- e.printStackTrace();
- assertTrue(true);
- }
- }
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/ConnectionPoolFuncTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/ConnectionPoolFuncTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/ConnectionPoolFuncTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,84 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.connection.ConnectionProperties;
-import org.jboss.soa.esb.connection.PoolDataSource;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-/**
- * TODO
- * @author MohitK
- * Date: Jul 22, 2006
- */
-public class ConnectionPoolFuncTest extends TestCase {
-
- Properties properties = new Properties();
-
- protected void setUp() throws Exception {
- properties.put(ConnectionProperties.DRIVER_CLASSNAME, "com.mysql.jdbc.Driver");
- properties.put(ConnectionProperties.CONNECTION_URL, "jdbc:mysql://localhost/rosetta");
- properties.put(ConnectionProperties.USERNAME, "rosetta");
- properties.put(ConnectionProperties.PASSWORD, "rosetta");
- }
-
-
- public void testConnectionPool() {
- PoolDataSource ds = new PoolDataSource();
- ds.setConnectionProperties(properties);
- Connection con = null;
- Statement stat = null;
- try {
- con = ds.getConnection();
- stat = con.createStatement();
- ResultSet rs = stat.executeQuery("SELECT count(*) FROM uid_table");
- while (rs.next()) {
- int count = rs.getInt(1);
- System.out.println("count = " + count);
- }
-
- } catch (SQLException e) {
- e.printStackTrace();
- fail();
- }finally{
- try {
- if (stat != null) {
- stat.close();
- }
- if(con!=null){
- con.close();
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- }
-
-
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/HashPasswordDecoder.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/HashPasswordDecoder.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderFuncTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderFuncTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderFuncTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,90 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.connection.ConnectionProperties;
-import org.jboss.soa.esb.connection.PoolDataSource;
-import org.jboss.soa.esb.connection.PasswordDecoderTestImpl;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-/**
- * TODO
- * @author MohitK
- * Date: Aug 1, 2006
- */
-public class PasswordDecoderFuncTest extends TestCase {
-
- Properties properties = new Properties();
-
- protected void setUp() throws Exception {
- properties.put(ConnectionProperties.DRIVER_CLASSNAME, "com.mysql.jdbc.Driver");
- properties.put(ConnectionProperties.CONNECTION_URL, "jdbc:mysql://localhost/rosetta");
- properties.put(ConnectionProperties.USERNAME, "rosetta");
- properties.put(ConnectionProperties.PASSWORD, "rosetta");
- properties.setProperty(ConnectionProperties.PASSWORD_DECODER, PasswordDecoderTestImpl.class.getName());
- }
-
- public void testPasswordDecoder() {
-
- PoolDataSource ds = new PoolDataSource();
- ds.setConnectionProperties(properties);
- Connection con1 = null;
- Statement stat = null;
- try {
- con1 = ds.getConnection();
- stat = con1.createStatement();
- ResultSet rs = stat.executeQuery("SELECT count(*) FROM uid_table");
- while (rs.next()) {
- int count = rs.getInt(1);
- System.out.println("count = " + count);
- }
-
-
- } catch (SQLException e) {
- e.printStackTrace();
- fail();
- } finally {
- if (stat != null) {
- try {
- stat.close();
- } catch (SQLException e) {
- e.printStackTrace();
- fail();
- }
- }
- if (con1 != null) {
- try {
- con1.close();
- } catch (SQLException e) {
- e.printStackTrace();
- fail();
- }
- }
- }
- }
-}
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderTestImpl.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderTestImpl.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/PasswordDecoderTestImpl.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,36 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.connection;
-
-import org.jboss.soa.esb.connection.PasswordDecoder;
-
-/**
- * TODO
- * @author MohitK
- * Date: Aug 1, 2006
- */
-public class PasswordDecoderTestImpl implements PasswordDecoder {
-
- public String decode(String encodedPassword) {
- return "clearstory";
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/TestConnectionPool.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/TestConnectionPool.java)
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/connection/TestPasswordDecoder.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/TestPasswordDecoder.java)
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -41,6 +41,6 @@
System.out.println(props);
assertEquals("org.jnp.interfaces.NamingContextFactory", props.get(Context.INITIAL_CONTEXT_FACTORY));
assertEquals("http://localhost:1234", props.get(Context.PROVIDER_URL));
- assertEquals("jboss.naming:org.jnp.interfaces", props.get("java.naming.factory.url.pkgs"));
+ assertEquals("org.jboss.naming:org.jnp.interfaces", props.get("java.naming.factory.url.pkgs"));
}
}
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -25,9 +25,9 @@
import java.io.IOException;
import java.util.Arrays;
-import org.jboss.soa.esb.StreamUtils;
import org.jboss.soa.esb.StringUtils;
import org.jboss.soa.esb.common.tests.BaseTest;
+import org.jboss.soa.esb.util.StreamUtils;
import org.xml.sax.SAXException;
/**
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -23,8 +23,8 @@
import java.util.HashMap;
-import org.jboss.soa.esb.StreamUtils;
import org.jboss.soa.esb.helpers.DomElement;
+import org.jboss.soa.esb.util.StreamUtils;
import junit.framework.TestCase;
@@ -37,7 +37,7 @@
public void testReplaceMacros() {
DomElement rootDomEl = new DomElement("rootEl");
DomElement childDomEl = new DomElement("childEl");
- HashMap map = new HashMap();
+ HashMap<String, String> map = new HashMap<String, String>();
rootDomEl.addElemChild(childDomEl);
rootDomEl.setAttr("attrb1", "value1");
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.parameters;
-
-import org.jboss.soa.esb.common.SystemProperties;
-
-import junit.framework.TestCase;
-
-/**
- * ParamRepositoryFactory unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ParamRepositoryFactoryUnitTest extends TestCase {
-
- public void test_ParamRepositoryFactory() {
- ParamRepository repo;
-
- repo = ParamRepositoryFactory.getInstance();
- assertTrue(repo instanceof ParamFileRepository);
-
- ParamRepositoryFactory.reset();
- System.setProperty(SystemProperties.PARAMS_REPOS_IMPL_CLASS, TestParamRepo.class.getName());
- repo = ParamRepositoryFactory.getInstance();
- assertTrue(repo instanceof TestParamRepo);
- }
-
- public void test_ParamRepositoryException() {
- // for the coverage results ;-)
- new ParamRepositoryException("message");
- new ParamRepositoryException("message", new Exception());
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.parameters;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-/**
- * ParamFileRepository unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ParamsFileRepositoryUnitTest extends TestCase {
-
- public void test_ParamsFileRepository() throws Exception {
- File root;
- ParamFileRepository fileRepo;
-
- // Check it defaults to the working dir...
- root = new File("./");
- fileRepo = new ParamFileRepository();
- assertEquals(root, fileRepo.getRoot());
-
- // Check it can pick up from the System prop...
- root = new File("build/tests/");
- System.setProperty(ParamFileRepository.FILE_PARAMS_REPOS_ROOT, root.getPath());
- fileRepo = new ParamFileRepository();
- assertEquals(root, fileRepo.getRoot());
-
- // Check for error on invalid System prop...
- System.setProperty(ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "blah/blah");
- try {
- new ParamFileRepository();
- fail("expected IllegalStateException");
- } catch(IllegalStateException e) {
- // expected
- }
- }
-
- public void test_add_get_remove_badargs() throws Exception {
- System.setProperty(ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
- ParamFileRepository fileRepo = new ParamFileRepository();
-
- test_add_badargs(fileRepo, null, "val");
- test_add_badargs(fileRepo, "", "val");
- test_add_badargs(fileRepo, "", "val");
- test_add_badargs(fileRepo, "xxx/yyy", null);
-
- test_get_badargs(fileRepo, null);
- test_get_badargs(fileRepo, "");
-
- test_remove_badargs(fileRepo, null);
- test_remove_badargs(fileRepo, "");
- }
-
- private void test_add_badargs(ParamFileRepository fileRepo, String name, String value) throws ParamRepositoryException {
- try {
- fileRepo.add(name, value);
- fail("expected IllegalArgumentException");
- } catch(IllegalArgumentException e) {
- // expected
- }
- }
-
- private void test_get_badargs(ParamFileRepository fileRepo, String name) throws ParamRepositoryException {
- try {
- fileRepo.get(name);
- fail("expected IllegalArgumentException");
- } catch(IllegalArgumentException e) {
- // expected
- }
- }
-
- private void test_remove_badargs(ParamFileRepository fileRepo, String name) {
- try {
- fileRepo.remove(name);
- fail("expected IllegalArgumentException");
- } catch(IllegalArgumentException e) {
- // expected
- }
- }
-
- public void test_add_get_remove() throws Exception {
- System.setProperty(ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
- ParamFileRepository fileRepo = new ParamFileRepository();
- String name = "repostests/jboss/testparam";
-
- // Make sure the parameter doesn't already exist...
- assertEquals(null, fileRepo.get(name));
-
- // Now the tests...
- assertEquals(null, fileRepo.get(name));
- fileRepo.add(name, "tomtestvalue");
- assertEquals("tomtestvalue", fileRepo.get(name));
- fileRepo.remove(name);
- assertEquals(null, fileRepo.get(name));
- }
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java)
Deleted: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,26 +0,0 @@
-package org.jboss.soa.esb.parameters;
-
-public class TestParamRepo implements ParamRepository {
-
- public TestParamRepo() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public void add(String name, String value)
- throws ParamRepositoryException {
- // TODO Auto-generated method stub
-
- }
-
- public String get(String name) throws ParamRepositoryException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void remove(String name) throws ParamRepositoryException {
- // TODO Auto-generated method stub
-
- }
-
-}
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java)
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.soa.esb.StreamUtils;
import junit.framework.TestCase;
Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.soa.esb.StreamUtils;
import org.jboss.soa.esb.StringUtils;
import org.jboss.soa.esb.W3CDomUtils;
import org.jboss.soa.esb.common.bizclasses.Address;
Copied: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java (from rev 5491, labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java)
Modified: labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -62,8 +62,8 @@
protected Map<String,GroupOfChilds> m_omChildPrc
= new HashMap<String,GroupOfChilds>();
- protected ParamsRepository m_oParmRepos;
- protected Name m_oParmsName;
+ protected ParamRepository m_oParmRepos;
+ protected String m_oParmName;
protected Logger m_oLogger;
protected DomElement m_oParms;
@@ -80,9 +80,8 @@
{
m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
- String sFactoryClass = SystemProperties.getParamsReposFactoryClass();
- m_oParmRepos = ParamsReposUtil.reposFromFactory(sFactoryClass,null);
- m_oParmsName = m_oParmRepos.nameFromString(p_sParamsUid);
+ m_oParmRepos = ParamRepositoryFactory.getInstance();
+ m_oParmName = p_sParamsUid;
} //__________________________________
protected void runUntilEndRequested() throws Exception
@@ -91,12 +90,12 @@
{ String sMsg = (null == m_oParms)
? "Initial Parameter loading" : "Reloading Params";
m_oLogger.info(formatLogMsg(sMsg));
- m_oParms = m_oParmRepos.getElement(m_oParmsName);
+ m_oParms = DomElement.fromXml(m_oParmRepos.get(m_oParmName));
}
catch (Exception e)
{
StringBuilder sb = new StringBuilder ("Problems loading params ")
- .append(m_oParmsName)
+ .append(m_oParmName)
.append((null==m_oParms)? " exiting..." : "continuing to use cached params")
;
m_oLogger.error(formatLogMsg(sb.toString()));
Modified: labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -45,8 +45,8 @@
protected Map<String,GroupOfChilds> m_omChildPrc
= new HashMap<String,GroupOfChilds>();
- protected ParamsRepository m_oParmRepos;
- protected Name m_oParmsName;
+ protected ParamRepository m_oParmRepos;
+ protected String m_oParmName;
protected Logger m_oLogger;
protected DomElement m_oParms;
@@ -65,9 +65,8 @@
{
m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
- String sFactoryClass = SystemProperties.getParamsReposFactoryClass();
- m_oParmRepos = ParamsReposUtil.reposFromFactory(sFactoryClass,null);
- m_oParmsName = m_oParmRepos.nameFromString(p_sParamsUid);
+ m_oParmRepos = ParamRepositoryFactory.getInstance();
+ m_oParmName = p_sParamsUid;
runUntilEndRequested();
} //__________________________________
@@ -77,12 +76,12 @@
{ String sMsg = (null == m_oParms)
? "Initial Parameter loading" : "Reloading Params";
m_oLogger.debug(formatLogMsg(sMsg));
- m_oParms = m_oParmRepos.getElement(m_oParmsName);
+ m_oParms = DomElement.fromXml(m_oParmRepos.get(m_oParmName));
}
catch (Exception e)
{
StringBuilder sb = new StringBuilder ("Problems loading params ")
- .append(m_oParmsName)
+ .append(m_oParmName)
.append((null==m_oParms)? " exiting..." : "continuing to use cached params")
;
m_oLogger.error(formatLogMsg(sb.toString()));
Modified: labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/OldDirListener.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/OldDirListener.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/listeners/src/org/jboss/soa/esb/listeners/OldDirListener.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -63,8 +63,8 @@
private ThreadGroup m_oThrGrp = Thread.currentThread().getThreadGroup();
private Logger m_oLogger;
- private DomElement m_oParms;
- private ParamsRepository m_oParmRepos;
+ private DomElement paramXmlTree;
+ private ParamRepository m_oParmRepos;
private TopicConnection m_oTopicConn = null;
private TopicSession m_oSession = null;
@@ -74,62 +74,35 @@
public OldDirListener(String p_sParamsUid) throws Exception
{
m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
-// setupSubscribe();
- /*
- * Removing Nagios integration
- try
- {
- String sNagServer = System.getProperty("jbossEsb.nagios.server");
- if (sNagServer != null)
- {
- int iNagPort = Integer.parseInt
- (System.getProperty("jbossEsb.nagios.port","5667"));
- String sNagService =
- System.getProperty("jbossEsb.nagios.service");
- new NagiosStandaloneHeartbeat(
- sNagServer, iNagPort, sNagService, "rosetta-listener-service");
- }
- }
- catch (Exception eNagios)
- {
- m_oLogger.info("Problems with Nagios Notification", eNagios);
- }
- */
-
- String sFactoryClass = SystemProperties.getParamsReposFactoryClass();
- m_oParmRepos = ParamsReposUtil.reposFromFactory(sFactoryClass,null);
-
- Name oParms = m_oParmRepos.nameFromString(p_sParamsUid);
- while (loadParmsCycle(oParms))
- {
- }
+ m_oParmRepos = ParamRepositoryFactory.getInstance();
+ while (loadParmsCycle(p_sParamsUid)) {}
} //__________________________________
- protected boolean loadParmsCycle(Name p_oParams) throws Exception
+ protected boolean loadParmsCycle(String paramName) throws Exception
{
- String sMsg = (null == m_oParms)
+ String sMsg = (null == paramXmlTree)
? "Initial Parameter loading" : "Reloading Params";
m_oLogger.info(sMsg);
try
{
- m_oParms = m_oParmRepos.getElement(p_oParams);
+ paramXmlTree = DomElement.fromXml(m_oParmRepos.get(paramName));
}
catch (Exception e)
{
m_oLogger.warn("Failed to load parameters");
- if (null == m_oParms)
+ if (null == paramXmlTree)
{
throw e;
}
}
- String sAtt = m_oParms.getAttr(PARM_RELOAD_LTCY);
+ String sAtt = paramXmlTree.getAttr(PARM_RELOAD_LTCY);
long lNewLoad = System.currentTimeMillis()
+ ( (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 180000);
- DomElement[] oaParms = m_oParms.getAllElemChildren();
+ DomElement[] oaParms = paramXmlTree.getAllElemChildren();
- sAtt = m_oParms.getAttr(PARM_POLL_LTCY);
+ sAtt = paramXmlTree.getAttr(PARM_POLL_LTCY);
long lPollLtcy = (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 20000;
if (lPollLtcy < 3000)
{
Property changes on: labs/jbossesb/branches/refactor/product/core/listeners/tests
___________________________________________________________________
Name: svn:ignore
+
TESTS-TestSuites.xml
Modified: labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/AbstractProcessor.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/AbstractProcessor.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/AbstractProcessor.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -192,12 +192,6 @@
replaceMacros(oaChilds[i1]);
}//_________________________
- protected void release()
- { switch (getOutputType())
- { case TYP_BATCHER: getBatcher().release(); break;
- }
- } //__________________________________
-
protected void finish(BatchProcess p_oBP) throws Exception
{
switch (getOutputType())
@@ -359,11 +353,6 @@
return getBatchHandler().addToBatch(p_o.toString());
} //________________________________
- private void release()
- { try {m_oBHandler.releaseHandler(); }
- catch (Exception e) {}
- } //________________________________
-
private void finish() throws Exception
{ m_olNum = null;
m_oBHandler.finish();
Modified: labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/FileProcessor.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/FileProcessor.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/FileProcessor.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -96,9 +96,7 @@
m_oLogger.fatal("Input File processor FAILED",e);
throw e;
}
- finally
- { super.release();
- }
+
}
catch (Exception eGen)
{
Deleted: labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/Zap.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/Zap.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/processors/src/org/jboss/soa/esb/processors/Zap.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,5 +0,0 @@
-package org.jboss.soa.esb.processors;
-
-public class Zap {
-
-}
Property changes on: labs/jbossesb/branches/refactor/product/core/processors/tests
___________________________________________________________________
Name: svn:ignore
+
TESTS-TestSuites.xml
Modified: labs/jbossesb/branches/refactor/product/core/processors/tests/src/org/jboss/soa/esb/processors/tests/DummyUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/processors/tests/src/org/jboss/soa/esb/processors/tests/DummyUnitTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/processors/tests/src/org/jboss/soa/esb/processors/tests/DummyUnitTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -22,7 +22,6 @@
package org.jboss.soa.esb.processors.tests;
import org.jboss.soa.esb.common.tests.BaseTest;
-import org.jboss.soa.esb.processors.Zap;
/**
* Dummy test file.
@@ -41,7 +40,6 @@
log.info("****************************************************************");
log.info(" Dummy unit test called. Replace this with module level tests");
log.info("****************************************************************");
- new Zap();
}
}
Modified: labs/jbossesb/branches/refactor/product/core/services/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/build.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/build.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -23,6 +23,7 @@
</condition>
<property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+ <property name="org.jboss.esb.ejb3.dir" value="${org.jboss.esb.root.dir}/lib/ejb3"/>
<condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/lib">
<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
</condition>
@@ -38,6 +39,9 @@
<fileset dir="${org.jboss.esb.ext.lib.dir}"
includes="jboss-jmx.jar"
/>
+ <fileset dir="${org.jboss.esb.ejb3.dir}"
+ includes="*.jar"
+ />
</path>
<!-- =================================================================== -->
@@ -134,7 +138,7 @@
<!-- =================================================================== -->
<!-- Initialise -->
<!-- =================================================================== -->
- <target name="ejbdoclet" depends="org.jboss.esb.services.initXdoclet">
+ <target name="ejb3doclet" depends="org.jboss.esb.services.initXdoclet">
<echo>+---------------------------------------------------+</echo>
<echo>| |</echo>
@@ -183,22 +187,13 @@
<!-- Jar -->
<!-- =================================================================== -->
<target name="jar" description="Assemble jar files"
- depends="org.jboss.esb.services.compile,ejbdoclet"
+ depends="org.jboss.esb.services.compile"
>
- <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services-client.jar"
+ <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
basedir="${org.jboss.esb.services.classes.dir}"
includes="**/*.class"
excludes="**/EJBs/*Bean*"
/>
- <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
- basedir="${org.jboss.esb.services.classes.dir}"
- includes="**/EJBs/*.class"
- manifest="${org.jboss.esb.services.metainf.dir}/manifest.server"
- >
- <metainf dir="${org.jboss.esb.services.metainf.dir}" includes="*.xml"
- excludes="application.xml"
- />
- </jar>
<antcall target="-ear"/>
</target>
Modified: labs/jbossesb/branches/refactor/product/core/services/src/META-INF/application.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/META-INF/application.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/META-INF/application.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -8,4 +8,13 @@
<module>
<ejb>jbossesb-services.jar</ejb>
</module>
-</application>
+ <module>
+ <java>jbossesb-listeners.jar</java>
+ </module>
+ <module>
+ <java>jbossesb-processors.jar</java>
+ </module>
+ <module>
+ <java>jbossesb-common.jar</java>
+ </module>
+</application>
\ No newline at end of file
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/META-INF/ejb-jar.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/META-INF/ejb-jar.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/META-INF/ejb-jar.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
-
-<ejb-jar >
-
- <description><![CDATA[Jboss ESB]]></description>
- <display-name>Generated by XDoclet</display-name>
-
- <enterprise-beans>
-
- <!-- Session Beans -->
- <session >
- <description><![CDATA[NotificationHandler]]></description>
- <display-name>Jboss_Esb_Notification_Handler</display-name>
-
- <ejb-name>NotificationHandler</ejb-name>
-
- <home>org.jboss.soa.esb.services.EJB.NotificationHandlerHome</home>
- <remote>org.jboss.soa.esb.services.EJB.NotificationHandler</remote>
- <local-home>org.jboss.soa.esb.services.EJB.NotificationHandlerLocalHome</local-home>
- <local>org.jboss.soa.esb.services.EJB.NotificationHandlerLocal</local>
- <ejb-class>org.jboss.soa.esb.services.EJB.NotificationHandlerBean</ejb-class>
- <session-type>Stateless</session-type>
- <transaction-type>Container</transaction-type>
-
- </session>
-
- <session >
- <description><![CDATA[]]></description>
- <display-name>Jboss_ESB_PERSIST_HANDLER</display-name>
-
- <ejb-name>PersistHandler</ejb-name>
-
- <home>org.jboss.soa.esb.services.EJB.PersistHandlerHome</home>
- <remote>org.jboss.soa.esb.services.EJB.PersistHandler</remote>
- <local-home>org.jboss.soa.esb.services.EJB.PersistHandlerLocalHome</local-home>
- <local>org.jboss.soa.esb.services.EJB.PersistHandlerLocal</local>
- <ejb-class>org.jboss.soa.esb.services.EJB.PersistHandlerBean</ejb-class>
- <session-type>Stateless</session-type>
- <transaction-type>Bean</transaction-type>
-
- </session>
-
- <session >
- <description><![CDATA[]]></description>
- <display-name>Jboss_Esb_Batch_Handler</display-name>
-
- <ejb-name>BatchHandler</ejb-name>
-
- <home>org.jboss.soa.esb.services.EJB.BatchHandlerHome</home>
- <remote>org.jboss.soa.esb.services.EJB.BatchHandler</remote>
- <local-home>org.jboss.soa.esb.services.EJB.BatchHandlerLocalHome</local-home>
- <local>org.jboss.soa.esb.services.EJB.BatchHandlerLocal</local>
- <ejb-class>org.jboss.soa.esb.services.EJB.BatchHandlerBean</ejb-class>
- <session-type>Stateful</session-type>
- <transaction-type>Bean</transaction-type>
-
- </session>
-
- <!--
- To add session beans that you have deployment descriptor info for, add
- a file to your XDoclet merge directory called session-beans.xml that contains
- the <session></session> markup for those beans.
- -->
-
- <!-- Entity Beans -->
- <!--
- To add entity beans that you have deployment descriptor info for, add
- a file to your XDoclet merge directory called entity-beans.xml that contains
- the <entity></entity> markup for those beans.
- -->
-
- <!-- Message Driven Beans -->
- <!--
- To add message driven beans that you have deployment descriptor info for, add
- a file to your XDoclet merge directory called message-driven-beans.xml that contains
- the <message-driven></message-driven> markup for those beans.
- -->
-
- </enterprise-beans>
-
- <!-- Relationships -->
-
- <!-- Assembly Descriptor -->
- <!--
- To specify your own assembly descriptor info here, add a file to your
- XDoclet merge directory called assembly-descriptor.xml that contains
- the <assembly-descriptor></assembly-descriptor> markup.
- -->
-
- <assembly-descriptor >
- <!--
- To specify additional security-role elements, add a file in the merge
- directory called ejb-security-roles.xml that contains them.
- -->
-
- <!-- method permissions -->
- <!--
- To specify additional method-permission elements, add a file in the merge
- directory called ejb-method-permissions.ent that contains them.
- -->
-
- <!-- transactions -->
- <!--
- To specify additional container-transaction elements, add a file in the merge
- directory called ejb-container-transactions.ent that contains them.
- -->
- <container-transaction >
- <method >
- <ejb-name>NotificationHandler</ejb-name>
- <method-name>*</method-name>
- </method>
- <trans-attribute>Required</trans-attribute>
- </container-transaction>
-
- <!-- finder transactions -->
-
- <!-- message destinations -->
- <!--
- To specify additional message-destination elements, add a file in the merge
- directory called ejb-message-destinations.ent that contains them.
- -->
-
- <!-- exclude list -->
- <!--
- To specify an exclude-list element, add a file in the merge directory
- called ejb-exclude-list.xml that contains it.
- -->
- </assembly-descriptor>
-
-</ejb-jar>
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/META-INF/jboss.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/META-INF/jboss.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/META-INF/jboss.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
-
-<jboss>
-
- <enterprise-beans>
-
- <!--
- To add beans that you have deployment descriptor info for, add
- a file to your XDoclet merge directory called jboss-beans.xml that contains
- the <session></session>, <entity></entity> and <message-driven></message-driven>
- markup for those beans.
- -->
-
- <session>
- <ejb-name>NotificationHandler</ejb-name>
- <jndi-name>NotificationHandler</jndi-name>
- <local-jndi-name>NotificationHandlerLocal</local-jndi-name>
-
- <method-attributes>
- </method-attributes>
- </session>
- <session>
- <ejb-name>PersistHandler</ejb-name>
- <jndi-name>PersistHandler</jndi-name>
- <local-jndi-name>PersistHandlerLocal</local-jndi-name>
-
- <method-attributes>
- </method-attributes>
- </session>
- <session>
- <ejb-name>BatchHandler</ejb-name>
- <jndi-name>BatchHandler</jndi-name>
- <local-jndi-name>BatchHandlerLocal</local-jndi-name>
-
- <method-attributes>
- </method-attributes>
- </session>
-
- <!--
- write a merge file jboss-webservices.ent for webservice-description
- -->
-
- </enterprise-beans>
-
- <resource-managers>
- </resource-managers>
-
- <!--
- | for container settings, you can merge in jboss-container.xml
- | this can contain <invoker-proxy-bindings/> and <container-configurations/>
- -->
-
-</jboss>
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateLocal.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateLocal.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateLocal.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -19,41 +19,39 @@
* 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.soa.esb.services;
-import javax.naming.*;
+import javax.naming.Context;
-import org.jboss.soa.esb.services.EJB.*;
import org.jboss.soa.esb.common.bizclasses.BatchProcess;
+import org.jboss.soa.esb.services.EJB.BatchHandler;
public class BatchHandlerBsDelegateLocal implements IbatchHandler
{
- private BatchHandlerLocal m_oBatchH;
+ private BatchHandler m_oBatchH;
- public BatchHandlerBsDelegateLocal(Context p_ctx) throws Exception
- {
- Object ref = p_ctx.lookup("BatchHandlerLocal");
+ public BatchHandlerBsDelegateLocal(Context p_ctx) throws Exception
+ {
+ m_oBatchH = (BatchHandler) p_ctx.lookup("jbossesb-appl/NotificationHandlerBean/local");
+ }
- BatchHandlerLocalHome oHu = (BatchHandlerLocalHome) ref;
- m_oBatchH = oHu.create();
- } //__________________________________
+ public long newBatch() throws Exception
+ {
+ return m_oBatchH.newBatch();
+ }
- public long newBatch () throws Exception
- { return m_oBatchH.newBatch(); }
+ public int addToBatch(String p_s) throws Exception
+ {
+ return m_oBatchH.addToBatch(p_s);
+ }
- public int addToBatch (String p_s) throws Exception
- { return m_oBatchH.addToBatch(p_s); }
+ public void finish() throws Exception
+ {
+ m_oBatchH.finish();
+ }
- public void finish () throws Exception
- { m_oBatchH.finish(); }
-
- public void releaseHandler()
- { try { m_oBatchH.remove(); }
- catch (Exception e) {}
- } //__________________________________
- public void commitBatch(BatchProcess p_oBP) throws Exception
- { m_oBatchH.commitBatch(p_oBP);
- } //__________________________________
-} //____________________________________________________________________________
+ public void commitBatch(BatchProcess p_oBP) throws Exception
+ {
+ m_oBatchH.commitBatch(p_oBP.toDTO());
+ }
+}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateRemote.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateRemote.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateRemote.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -24,34 +24,32 @@
package org.jboss.soa.esb.services;
import javax.naming.*;
-import javax.rmi.*;
import org.jboss.soa.esb.services.EJB.*;
import org.jboss.soa.esb.common.bizclasses.BatchProcess;
public class BatchHandlerBsDelegateRemote implements IbatchHandler
{
- private BatchHandler m_oBatchH;
+ private BatchHandler m_oBatchH;
- public BatchHandlerBsDelegateRemote(Context p_ctx) throws Exception
- {
- Object ref = p_ctx.lookup("BatchHandler");
- Object oNarr = PortableRemoteObject.narrow(ref, BatchHandlerHome.class);
- BatchHandlerHome oHu = (BatchHandlerHome) oNarr;
- m_oBatchH = oHu.create();
- } //__________________________________
+ public BatchHandlerBsDelegateRemote(Context p_ctx) throws Exception {
+ m_oBatchH = (BatchHandler) p_ctx
+ .lookup("jbossesb-appl/NotificationHandlerBean/remote");
+ }
- public long newBatch () throws Exception
- { return m_oBatchH.newBatch(); }
- public int addToBatch (String p_s) throws Exception
- { return m_oBatchH.addToBatch(p_s); }
- public void finish () throws Exception
- { m_oBatchH.finish(); }
- public void releaseHandler()
- { try { m_oBatchH.remove(); }
- catch (Exception e) {}
- } //__________________________________
- public void commitBatch(BatchProcess p_oBP) throws Exception
- { m_oBatchH.commitBatch(p_oBP.toDTO());
- } //__________________________________
-} //____________________________________________________________________________
+ public long newBatch() throws Exception {
+ return m_oBatchH.newBatch();
+ }
+
+ public int addToBatch(String p_s) throws Exception {
+ return m_oBatchH.addToBatch(p_s);
+ }
+
+ public void finish() throws Exception {
+ m_oBatchH.finish();
+ }
+
+ public void commitBatch(BatchProcess p_oBP) throws Exception {
+ m_oBatchH.commitBatch(p_oBP.toDTO());
+ }
+}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -19,7 +19,6 @@
* 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.soa.esb.services;
import java.util.*;
@@ -29,25 +28,32 @@
public class BatchHandlerFactory
{
- private static final String [] s_saTypes = {"local","remote"};
- private final static int LCL=0;
- private final static int REM=1;
+ private static final String [] s_saTypes = {"local","remote","mock"};
+ private final static int LCL=0;
+ private final static int REM=1;
+ private final static int MOK=2;
+
+ public static IbatchHandler getBatchHandler(String p_sLocRem,
+ String p_sJndiType, String p_sJndiServer) throws Exception
+ {
+ int iIndex = Arrays.binarySearch(s_saTypes, p_sLocRem.toLowerCase());
+ if (iIndex < 0)
+ return null;
+ switch (iIndex) {
+ case LCL:
+ return new BatchHandlerBsDelegateLocal(new InitialContext());
+ case REM:
+ return getBatchHandler(AppServerContext.getServerContext(
+ p_sJndiType, p_sJndiServer));
+ case MOK:
+ return null; //return new MockBatchHandler()
+ }
+ throw new Exception("Invalid Batch Handler Delegate <" + p_sLocRem + ">");
+ }
- public static IbatchHandler getBatchHandler
- (String p_sLocRem, String p_sJndiType, String p_sJndiServer) throws Exception
- {
- int iIndex = Arrays.binarySearch(s_saTypes,p_sLocRem.toLowerCase());
- if (iIndex < 0) return null;
- switch (iIndex)
- {
- case REM: return getBatchHandler
- (AppServerContext.getServerContext(p_sJndiType,p_sJndiServer));
- case LCL: return new BatchHandlerBsDelegateLocal(new InitialContext());
- }
- throw new Exception("Invalid Batch Handler Delegate <" + p_sLocRem + ">");
- } //__________________________________
-
- public static IbatchHandler getBatchHandler(Context p_oCtx) throws Exception
- { return new BatchHandlerBsDelegateRemote(p_oCtx);
- } //__________________________________
-} //____________________________________________________________________________
+ public static IbatchHandler getBatchHandler(Context p_oCtx)
+ throws Exception
+ {
+ return new BatchHandlerBsDelegateRemote(p_oCtx);
+ }
+}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandler.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandler.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandler.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,32 +1,36 @@
/*
- * Generated by XDoclet - Do not edit!
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.soa.esb.services.EJB;
+import org.jboss.soa.esb.util.BobjStdDTO;
+
/**
- * Remote interface for BatchHandler.
- * @xdoclet-generated at July 12 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
+ * @author kstam
*/
public interface BatchHandler
- extends javax.ejb.EJBObject
{
-
- public long newBatch( )
- throws java.lang.Exception, java.rmi.RemoteException;
-
- public long getBatchNum( )
- throws java.rmi.RemoteException;
-
- public int addToBatch( java.lang.String p_s )
- throws java.lang.Exception, java.rmi.RemoteException;
-
- public void finish( )
- throws java.lang.Exception, java.rmi.RemoteException;
-
- public void commitBatch( org.jboss.soa.esb.util.BobjStdDTO p_oDto )
- throws java.lang.Exception, java.rmi.RemoteException;
-
+ public void finish() throws Exception;
+ public void commitBatch(BobjStdDTO p_oDto ) throws Exception;
+ public long newBatch() throws Exception;
+ public int addToBatch(String p_s) throws Exception;
+ public void remove();
}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerBean.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerBean.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerBean.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -36,17 +36,12 @@
import org.jboss.soa.esb.internal.core.objectstore.*;
import org.jboss.soa.esb.common.bizclasses.*;
/**
- * @ejb.bean
- * name="BatchHandler"
- * display-name="Jboss_Esb_Batch_Handler"
- * type="Stateful"
- * view-type="both"
- * jndi-name="BatchHandler"
- * local-jndi-name="BatchHandlerLocal"
- * transaction-type="Bean"
- * @author
+ * @author Esteban
*/
-public class BatchHandlerBean implements SessionBean
+ at Remote(BatchHandler.class)
+ at Local(BatchHandler.class)
+ at TransactionManagement(TransactionManagementType.BEAN)
+public @Stateful class BatchHandlerBean implements BatchHandler
{
private static final long serialVersionUID = 1L;
SessionContext m_oSessCtx;
@@ -67,9 +62,9 @@
private int m_iSeq;
/**
- * @ejb.create-method
* @throws CreateException
*/
+ @Init
public void ejbCreate() throws CreateException
{
try
@@ -82,6 +77,7 @@
}
} //__________________________________
+ @PostActivate
public void ejbActivate()
{ try
{ getResources();
@@ -92,6 +88,7 @@
}
} //__________________________________
+ @PrePassivate
public void ejbPassivate()
{ m_oLogger.info("EJB Passivated");
releaseResources();
@@ -100,9 +97,11 @@
m_oDataConn = null;
} //__________________________________
- public void ejbRemove()
- { releaseResources();
- m_oLogger.info("EJB Removed");
+ @Remove
+ public void remove()
+ {
+ releaseResources();
+ m_oLogger.info("EJB Removed");
} //__________________________________
private void getResources() throws Exception
@@ -223,8 +222,6 @@
//______________________________________________________________________________
// Public local and remote interface methods
/**
- * @ejb.interface-method
- * view-type="both"
*/
public long newBatch() throws Exception
{ if (m_lBatchNum > 0) throw
@@ -241,8 +238,6 @@
} //__________________________________
/**
- * @ejb.interface-method
- * view-type="both"
* @return
*/
public long getBatchNum()
@@ -250,8 +245,6 @@
} //__________________________________
/**
- * @ejb.interface-method
- * view-type="both"
* @param p_s
* @return
* @throws Exception
@@ -278,8 +271,6 @@
finally { releaseResources(); }
} //__________________________________
/**
- * @ejb.interface-method
- * view-type="both"
* @throws Exception
*/
public void finish() throws Exception
@@ -290,29 +281,27 @@
//______________________________________________________________________________
// Public local interface methods
+///** KS: I'm commenting this out since we are now using the
+// same interface for local and remote calls. If all
+// works this code can be deleted.
+// */
+// public void commitBatch(BatchProcess p_oBO) throws Exception
+// { try { doCommitBatch(p_oBO); m_oDataConn.commit(); }
+// catch (Exception e)
+// { if (null != m_oDataConn) m_oDataConn.rollback();
+// m_oLogger.error("commitBatch(BatchProcess) FAILED ",e);
+// throw e;
+// }
+// finally { releaseResources(); }
+// } //__________________________________
-/**
- * @ejb.interface-method
- * view-type="local"
- */
- public void commitBatch(BatchProcess p_oBO) throws Exception
- { try { doCommitBatch(p_oBO); m_oDataConn.commit(); }
- catch (Exception e)
- { if (null != m_oDataConn) m_oDataConn.rollback();
- m_oLogger.error("commitBatch(BatchProcess) FAILED ",e);
- throw e;
- }
- finally { releaseResources(); }
- } //__________________________________
-
//______________________________________________________________________________
// Public remote interface methods
/**
- * @ejb.interface-method
- * view-type="both"
*/
public void commitBatch(BobjStdDTO p_oDto) throws Exception
- { commitBatch (new BatchProcess(p_oDto));
- } //__________________________________
+ {
+ commitBatch (new BatchProcess(p_oDto).toDTO());
+ }
} //____________________________________________________________________________
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerHome.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerHome.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerHome.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Home interface for BatchHandler.
- * @xdoclet-generated at July 12 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface BatchHandlerHome
- extends javax.ejb.EJBHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/BatchHandler";
- public static final String JNDI_NAME="BatchHandler";
-
- public org.jboss.soa.esb.services.EJB.BatchHandler create()
- throws javax.ejb.CreateException,java.rmi.RemoteException;
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocal.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocal.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocal.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,29 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Local interface for BatchHandler.
- * @xdoclet-generated at July 12 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface BatchHandlerLocal
- extends javax.ejb.EJBLocalObject
-{
-
- public long newBatch( ) throws java.lang.Exception;
-
- public long getBatchNum( ) ;
-
- public int addToBatch( java.lang.String p_s ) throws java.lang.Exception;
-
- public void finish( ) throws java.lang.Exception;
-
- public void commitBatch( org.jboss.soa.esb.common.bizclasses.BatchProcess p_oBO ) throws java.lang.Exception;
-
- public void commitBatch( org.jboss.soa.esb.util.BobjStdDTO p_oDto ) throws java.lang.Exception;
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocalHome.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocalHome.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/BatchHandlerLocalHome.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Local home interface for BatchHandler.
- * @xdoclet-generated at July 12 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface BatchHandlerLocalHome
- extends javax.ejb.EJBLocalHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/BatchHandlerLocal";
- public static final String JNDI_NAME="BatchHandlerLocal";
-
- public org.jboss.soa.esb.services.EJB.BatchHandlerLocal create()
- throws javax.ejb.CreateException;
-
-}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandler.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandler.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandler.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +1,33 @@
/*
- * Generated by XDoclet - Do not edit!
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.soa.esb.services.EJB;
import java.io.Serializable;
/**
- * Remote interface for NotificationHandler.
- * @xdoclet-generated at July 24 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
+ * Business interface for NotificationHandler.
+ * @author kstam
*/
public interface NotificationHandler
- extends javax.ejb.EJBObject
{
-
- public void sendNotifications( java.lang.String p_sParams,Serializable p_sMsg )
- throws java.lang.Exception, java.rmi.RemoteException;
-
+ public void sendNotifications( String p_sParams, Serializable p_oMsg ) throws Exception;
}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerBean.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerBean.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerBean.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -25,7 +25,17 @@
package org.jboss.soa.esb.services.EJB;
import java.io.Serializable;
-import javax.ejb.*;
+
+import javax.ejb.Init;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Remove;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
import javax.naming.*;
import org.jboss.soa.esb.util.*;
import org.jboss.soa.esb.helpers.*;
@@ -33,32 +43,26 @@
import org.apache.log4j.*;
/**
- * @ejb.bean description="NotificationHandler"
- * display-name="Notification_Handler"
- * jndi-name="NotificationHandler"
- * local-jndi-name="NotificationHandlerLocal"
- * name="NotificationHandler"
- * type="Stateless"
- * view-type="both"
- * transaction-type="Container"
- * @ejb.transaction type="Required"
- * @author
+ * @author Esteban
*/
-public class NotificationHandlerBean implements SessionBean
+ at Remote(NotificationHandler.class)
+ at Local(NotificationHandler.class)
+ at TransactionManagement(TransactionManagementType.CONTAINER)
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+
+public @Stateless class NotificationHandlerBean implements NotificationHandler
{
private static final long serialVersionUID = 1L;
private Logger m_oLogger;
SessionContext m_ctxSess;
- public void ejbActivate() {}
- public void ejbPassivate() {}
public void setSessionContext(SessionContext sessionContext)
{ m_ctxSess = sessionContext; }
/**
- * @ejb.create-method
* @throws CreateException
*/
- public void ejbCreate() throws CreateException
+ @Init
+ public void ejbCreate() throws Exception
{ try
{ m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
// Context oCtxInit =
@@ -68,10 +72,11 @@
}
catch (Exception e)
{ m_oLogger.error("EJB Create Failed <"+e.getMessage()+">");
- throw new CreateException(e.getMessage());
+ throw new Exception(e.getMessage());
}
} //__________________________________
+ @Remove
public void ejbRemove()
{ m_oLogger.info(this.toString()+" Removed");
} //__________________________________
@@ -103,7 +108,6 @@
catch (Exception e) { e.printStackTrace(System.out); }
}
/**
- * @ejb.interface-method
* @param p_sParams
* @param p_sMsg
* @throws Exception
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerHome.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerHome.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerHome.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Home interface for NotificationHandler.
- * @xdoclet-generated at July 27 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface NotificationHandlerHome
- extends javax.ejb.EJBHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/NotificationHandler";
- public static final String JNDI_NAME="NotificationHandler";
-
- public org.jboss.soa.esb.services.EJB.NotificationHandler create()
- throws javax.ejb.CreateException,java.rmi.RemoteException;
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocal.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocal.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocal.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,21 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-import java.io.Serializable;
-
-/**
- * Local interface for NotificationHandler.
- * @xdoclet-generated at July 5 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface NotificationHandlerLocal
- extends javax.ejb.EJBLocalObject
-{
-
- public void sendNotifications( java.lang.String p_sParams,Serializable p_sMsg ) throws java.lang.Exception;
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocalHome.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocalHome.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/NotificationHandlerLocalHome.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Local home interface for NotificationHandler.
- * @xdoclet-generated at July 27 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface NotificationHandlerLocalHome
- extends javax.ejb.EJBLocalHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/NotificationHandlerLocal";
- public static final String JNDI_NAME="NotificationHandlerLocal";
-
- public org.jboss.soa.esb.services.EJB.NotificationHandlerLocal create()
- throws javax.ejb.CreateException;
-
-}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandler.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandler.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandler.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,32 +1,42 @@
/*
- * Generated by XDoclet - Do not edit!
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.soa.esb.services.EJB;
+import org.jboss.soa.esb.util.BobjStdDTO;
+
/**
- * Remote interface for PersistHandler.
- * @xdoclet-generated at July 24 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
+ * @author kstam
*/
public interface PersistHandler
- extends javax.ejb.EJBObject
{
- public long getUidChunk( int p_iQ )
- throws java.lang.Exception, java.rmi.RemoteException;
+ public long getUidChunk( int p_iQ ) throws Exception;
- public void rmvObject( java.lang.String p_sClassName,long p_lUid )
- throws java.lang.Exception, java.rmi.RemoteException;
+ public void rmvObject( String p_sClassName,long p_lUid ) throws Exception;
- public long addDTO( org.jboss.soa.esb.util.BobjStdDTO p_oDto )
- throws java.lang.Exception, java.rmi.RemoteException;
+ public long addDTO( BobjStdDTO p_oDto ) throws Exception;
- public org.jboss.soa.esb.util.BobjStdDTO getDTO( java.lang.String p_sClassName,long p_lUid )
- throws java.lang.Exception, java.rmi.RemoteException;
+ public BobjStdDTO getDTO( String p_sClassName,long p_lUid ) throws Exception;
- public void rplDTO( org.jboss.soa.esb.util.BobjStdDTO p_oDto )
- throws java.lang.Exception, java.rmi.RemoteException;
+ public void rplDTO( BobjStdDTO p_oDto ) throws Exception;
}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerBean.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerBean.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerBean.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -19,12 +19,16 @@
* 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.soa.esb.services.EJB;
-import javax.ejb.*;
+import javax.ejb.Init;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Remove;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
import javax.naming.*;
import java.sql.*;
import javax.sql.*;
@@ -39,17 +43,12 @@
import org.apache.log4j.*;
/**
- * @ejb.bean
- * name="PersistHandler"
- * display-name="PERSIST_HANDLER"
- * type="Stateless"
- * view-type="both"
- * jndi-name="PersistHandler"
- * local-jndi-name="PersistHandlerLocal"
- * transaction-type="Bean"
* @author Esteban
*/
-public class PersistHandlerBean implements SessionBean
+ at Remote(PersistHandler.class)
+ at Local(PersistHandler.class)
+ at TransactionManagement(TransactionManagementType.BEAN)
+public @Stateless class PersistHandlerBean implements PersistHandler
{
private static final long serialVersionUID = 1L;
private Logger m_oLogger;
@@ -66,15 +65,14 @@
private DaoSnapTable m_oDaoSnap;
private DaoIndexTable[] m_oaDaoIndex;
- public void ejbActivate() {}
- public void ejbPassivate() {}
public void setSessionContext(SessionContext sessionContext)
{ m_ctxSess = sessionContext; }
/**
- * @ejb.create-method
+ * Create method. Should get called to initialize this class.
* @throws CreateException
*/
- public void ejbCreate() throws CreateException
+ @Init
+ public void create() throws Exception
{ try
{ m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
Context oCtxInit = new InitialContext();
@@ -92,14 +90,86 @@
}
catch (Exception e)
{ m_oLogger.error("EJB Create Failed <"+e.getMessage()+">");
- throw new CreateException(e.getMessage());
+ throw new Exception(e.getMessage());
}
} //__________________________________
- public void ejbRemove()
+ @Remove
+ public void remove()
{ m_oLogger.info(this.toString()+" Removed");
} //__________________________________
+
+ /**
+ * @param p_sClassName - String Fully qualified name of class to be retrieved
+ * @param p_lUid
+ * @return
+ * @throws Exception
+ */
+ public BobjStdDTO getDTO (String p_sClassName, long p_lUid) throws Exception
+ { try { return doGetSnapshot(BobjStore.getStore(p_sClassName), p_lUid);}
+ catch (Exception e) { throw e; }
+ finally { releaseResources(); }
+ } //__________________________________
+ /**
+ *
+ * @param p_oDto BobjStdDTO - Serialized BaseBusinessObject that has to be replaced
+ * @throws Exception
+ */
+ public void rplDTO(BobjStdDTO p_oDto) throws Exception
+ { try
+ { doRplSnapshot(p_oDto);
+ m_oDataConn.commit();
+ }
+ catch (Exception e)
+ { try { if (null != m_oDataConn) m_oDataConn.rollback(); }
+ catch (Exception eRoll) {}
+ throw e;
+ }
+ finally { releaseResources(); }
+ } //__________________________________
+
+// ______________________________________________________________________________
+// Public local and remote interface methods
+ /**
+ */
+ public long getUidChunk (int p_iQ) throws Exception
+ { try { return getDaoUid().getUidChunk(DaoUidTable.SEQUENCE_OBJ,p_iQ); }
+ catch (Exception e) { throw e;}
+ finally { releaseResources(); }
+ } //__________________________________
+ /**
+ * @param p_sClassName
+ * @param p_lUid
+ * @throws Exception
+ */
+ public void rmvObject(String p_sClassName, long p_lUid) throws Exception
+ { try { doRmvSnapshot(BobjStore.getStore(p_sClassName), p_lUid); m_oDataConn.commit(); }
+ catch (Exception e)
+ { try { if (null != m_oDataConn) m_oDataConn.rollback(); }
+ catch (Exception eRoll) {}
+ throw e;
+ }
+ finally { releaseResources(); }
+ } //__________________________________
+
+ /**
+ */
+ public long addDTO(BobjStdDTO p_oDto) throws Exception
+ { try
+ { long lRet = doAddSnapshot(p_oDto);
+ m_oDataConn.commit();
+ return lRet;
+ }
+ catch (Exception e)
+ { try { if (null != m_oDataConn) m_oDataConn.rollback(); }
+ catch (Exception eRoll) {}
+ throw e;
+ }
+ finally { releaseResources(); }
+ } //__________________________________
+
+
// Utility Methods
private DaoUidTable getDaoUid() throws Exception
@@ -277,7 +347,7 @@
if (null != m_oUidConn) m_oUidConn.release();
} //__________________________________
- public long doAssignUid() throws Exception
+ private long doAssignUid() throws Exception
{ if (m_iChunkLeft < 1)
{ m_lUid = getDaoUid().getUidChunk(DaoUidTable.SEQUENCE_OBJ, s_iChunkSize);
m_iChunkLeft = s_iChunkSize;
@@ -286,82 +356,6 @@
return ++m_lUid;
} //__________________________________
-//______________________________________________________________________________
-// Public local and remote interface methods
- /**
- * @ejb.interface-method
- * view-type="both"
- */
- public long getUidChunk (int p_iQ) throws Exception
- { try { return getDaoUid().getUidChunk(DaoUidTable.SEQUENCE_OBJ,p_iQ); }
- catch (Exception e) { throw e;}
- finally { releaseResources(); }
- } //__________________________________
-/**
- * @ejb.interface-method
- * view-type="both"
- * @param p_sClassName
- * @param p_lUid
- * @throws Exception
- */
- public void rmvObject(String p_sClassName, long p_lUid) throws Exception
- { try { doRmvSnapshot(BobjStore.getStore(p_sClassName), p_lUid); m_oDataConn.commit(); }
- catch (Exception e)
- { try { if (null != m_oDataConn) m_oDataConn.rollback(); }
- catch (Exception eRoll) {}
- throw e;
- }
- finally { releaseResources(); }
- } //__________________________________
-/**
- * @ejb.interface-method
- * view-type="both"
- */
- public long addDTO(BobjStdDTO p_oDto) throws Exception
- { try
- { long lRet = doAddSnapshot(p_oDto);
- m_oDataConn.commit();
- return lRet;
- }
- catch (Exception e)
- { try { if (null != m_oDataConn) m_oDataConn.rollback(); }
- catch (Exception eRoll) {}
- throw e;
- }
- finally { releaseResources(); }
- } //__________________________________
-/**
- * @ejb.interface-method
- * view-type="both"
- * @param p_sClassName - String Fully qualified name of class to be retrieved
- * @param p_lUid
- * @return
- * @throws Exception
- */
- public BobjStdDTO getDTO (String p_sClassName, long p_lUid) throws Exception
- { try { return doGetSnapshot(BobjStore.getStore(p_sClassName), p_lUid);}
- catch (Exception e) { throw e; }
- finally { releaseResources(); }
- } //__________________________________
-/**
- * @ejb.interface-method
- * view-type="both"
- *
- * @param p_oDto BobjStdDTO - Serialized BaseBusinessObject that has to be replaced
- * @throws Exception
- */
- public void rplDTO(BobjStdDTO p_oDto) throws Exception
- { try
- { doRplSnapshot(p_oDto);
- m_oDataConn.commit();
- }
- catch (Exception e)
- { try { if (null != m_oDataConn) m_oDataConn.rollback(); }
- catch (Exception eRoll) {}
- throw e;
- }
- finally { releaseResources(); }
- } //__________________________________
} //____________________________________________________________________________
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerHome.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerHome.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerHome.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Home interface for PersistHandler.
- * @xdoclet-generated at July 12 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface PersistHandlerHome
- extends javax.ejb.EJBHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/PersistHandler";
- public static final String JNDI_NAME="PersistHandler";
-
- public org.jboss.soa.esb.services.EJB.PersistHandler create()
- throws javax.ejb.CreateException,java.rmi.RemoteException;
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocal.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocal.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocal.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,27 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Local interface for PersistHandler.
- * @xdoclet-generated at July 12 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface PersistHandlerLocal
- extends javax.ejb.EJBLocalObject
-{
-
- public long getUidChunk( int p_iQ ) throws java.lang.Exception;
-
- public void rmvObject( java.lang.String p_sClassName,long p_lUid ) throws java.lang.Exception;
-
- public long addDTO( org.jboss.soa.esb.util.BobjStdDTO p_oDto ) throws java.lang.Exception;
-
- public org.jboss.soa.esb.util.BobjStdDTO getDTO( java.lang.String p_sClassName,long p_lUid ) throws java.lang.Exception;
-
- public void rplDTO( org.jboss.soa.esb.util.BobjStdDTO p_oDto ) throws java.lang.Exception;
-
-}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocalHome.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocalHome.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/PersistHandlerLocalHome.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,22 +0,0 @@
-/*
- * Generated by XDoclet - Do not edit!
- */
-package org.jboss.soa.esb.services.EJB;
-
-/**
- * Local home interface for PersistHandler.
- * @xdoclet-generated at July 24 2006
- * @copyright The XDoclet Team
- * @author XDoclet
- * @version ${version}
- */
-public interface PersistHandlerLocalHome
- extends javax.ejb.EJBLocalHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/PersistHandlerLocal";
- public static final String JNDI_NAME="PersistHandlerLocal";
-
- public org.jboss.soa.esb.services.EJB.PersistHandlerLocal create()
- throws javax.ejb.CreateException;
-
-}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateLocal.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateLocal.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateLocal.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -30,19 +30,21 @@
public class NotifHandlerBsDelegateLocal implements InotificationHandler
{
- private NotificationHandlerLocal m_oNotifH;
- public NotifHandlerBsDelegateLocal(Context p_ctx) throws Exception
- {
- Object ref = p_ctx.lookup("NotificationHandlerLocal");
+ private NotificationHandler m_oNotifH;
+
+ public NotifHandlerBsDelegateLocal(Context p_ctx) throws Exception
+ {
+ m_oNotifH = (NotificationHandler) p_ctx.lookup("jbossesb-appl/NotificationHandlerBean/local");
+ }
- NotificationHandlerLocalHome oHu = (NotificationHandlerLocalHome) ref;
- m_oNotifH = oHu.create();
- } //__________________________________
+ public void sendNotifications(DomElement p_oP, Serializable p_o)
+ throws Exception
+ {
+ m_oNotifH.sendNotifications(p_oP.toString(), p_o);
+ }
- public void sendNotifications(DomElement p_oP, Serializable p_o) throws Exception
- { m_oNotifH.sendNotifications(p_oP.toString(),p_o);
- }
- public void sendNotifications(Serializable p_o) throws Exception
- { m_oNotifH.sendNotifications(null,p_o);
- }
-} //____________________________________________________________________________
+ public void sendNotifications(Serializable p_o) throws Exception
+ {
+ m_oNotifH.sendNotifications(null, p_o);
+ }
+}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateRemote.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateRemote.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateRemote.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -24,27 +24,27 @@
package org.jboss.soa.esb.services;
import javax.naming.*;
-import javax.rmi.*;
import java.io.Serializable;
import org.jboss.soa.esb.helpers.*;
import org.jboss.soa.esb.services.EJB.*;
public class NotifHandlerBsDelegateRemote implements InotificationHandler
{
- private NotificationHandler m_oNotifH;
+ private NotificationHandler m_oNotifH;
- public NotifHandlerBsDelegateRemote(Context p_ctx) throws Exception
- {
- Object ref = p_ctx.lookup("NotificationHandler");
- Object oNarr = PortableRemoteObject.narrow(ref, NotificationHandlerHome.class);
- NotificationHandlerHome oHu = (NotificationHandlerHome) oNarr;
- m_oNotifH = oHu.create();
- } //__________________________________
+ public NotifHandlerBsDelegateRemote(Context p_ctx) throws Exception
+ {
+ m_oNotifH = (NotificationHandler) p_ctx.lookup("jbossesb-appl/NotificationHandlerBean/remote");
+ }
- public void sendNotifications(DomElement p_oP, Serializable p_o) throws Exception
- { m_oNotifH.sendNotifications(p_oP.toString(),p_o);
- } //__________________________________
- public void sendNotifications(Serializable p_o) throws Exception
- { m_oNotifH.sendNotifications(null,p_o);
- }
-} //____________________________________________________________________________
+ public void sendNotifications(DomElement p_oP, Serializable p_o)
+ throws Exception
+ {
+ m_oNotifH.sendNotifications(p_oP.toString(), p_o);
+ }
+
+ public void sendNotifications(Serializable p_o) throws Exception
+ {
+ m_oNotifH.sendNotifications(null, p_o);
+ }
+}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -31,9 +31,10 @@
public class NotificationHandlerFactory
{
- private static final String [] s_saTypes = {"local","remote"};
+ private static final String [] s_saTypes = {"local","remote","mock"};
private final static int LCL=0;
private final static int REM=1;
+ private final static int MOK=2;
public static InotificationHandler getNotifHandler
(String p_sLocRem, String p_sJndiType, String p_sJndiServer) throws Exception
@@ -42,15 +43,16 @@
if (iIndex < 0) return null;
switch (iIndex)
{
+ case LCL: return new NotifHandlerBsDelegateLocal(new InitialContext());
case REM: return getNotifHandler
(AppServerContext.getServerContext(p_sJndiType,p_sJndiServer));
- case LCL: return new NotifHandlerBsDelegateLocal(new InitialContext());
+ case MOK: return null; //return new MockNotificationHandler();
}
throw new Exception("Invalid Notification Handler Delegate <" + p_sLocRem + ">");
- } //__________________________________
+ }
- public static InotificationHandler getNotifHandler(Context p_oCtx) throws Exception
- { return new NotifHandlerBsDelegateRemote(p_oCtx);
- } //__________________________________
-
-} //____________________________________________________________________________
+ private static InotificationHandler getNotifHandler(Context p_oCtx) throws Exception
+ {
+ return new NotifHandlerBsDelegateRemote(p_oCtx);
+ }
+}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateLocal.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateLocal.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateLocal.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -32,45 +32,45 @@
public class PersistHandlerBsDelegateLocal implements IpersistHandler
{
- private PersistHandlerLocal m_oSnapH;
+ private PersistHandler m_oSnapH;
- public PersistHandlerBsDelegateLocal(Context p_ctx) throws Exception
- {
- Object ref = p_ctx.lookup("PersistHandlerLocal");
+ public PersistHandlerBsDelegateLocal(Context p_ctx) throws Exception {
+ m_oSnapH = (PersistHandler) p_ctx.lookup("jbossesb-appl/PersistHandlerBean/local");
+ }
- PersistHandlerLocalHome oHu = (PersistHandlerLocalHome) ref;
- m_oSnapH = oHu.create();
- } //__________________________________
+ public long getUidChunk(int p_iQ) throws Exception {
+ return m_oSnapH.getUidChunk(p_iQ);
+ }
- public void remove() throws Exception {m_oSnapH.remove(); }
- public long getUidChunk(int p_iQ) throws Exception
- { return m_oSnapH.getUidChunk(p_iQ);
- } //__________________________________
- public long addObject (BobjStdDTO p_oDto) throws Exception
- { return m_oSnapH.addDTO(p_oDto);
- } //__________________________________
- public long addObject (BaseBusinessObject p_oBo) throws Exception
- { p_oBo.setPackage();
- return m_oSnapH.addDTO(p_oBo.toDTO());
- } //__________________________________
- public BaseBusinessObject getObject (Class p_oCls, long p_lUid) throws Exception
- { BobjStdDTO oDto = m_oSnapH.getDTO(p_oCls.getName(), p_lUid);
- return (null==oDto)?null:BaseBusinessObject.getFromDTO(oDto);
- } //__________________________________
- public void rmvObject (Class p_oCls, long p_lUid) throws Exception
- { m_oSnapH.rmvObject(p_oCls.getName(), p_lUid);
- } //__________________________________
- public void rplObject (BaseBusinessObject p_o) throws Exception
- { p_o.setPackage();
- m_oSnapH.rplDTO(p_o.toDTO());
- } //__________________________________
- public ObjLocator[] getLocatorList(Class p_oCls, Properties p_oProp)
- {
- return null;
- } //__________________________________
+ public long addObject(BobjStdDTO p_oDto) throws Exception {
+ return m_oSnapH.addDTO(p_oDto);
+ }
- public ObjLocator[] getLocatorList(Class p_oCls, long[] p_laUids)
- {
- return null;
- } //__________________________________
+ public long addObject(BaseBusinessObject p_oBo) throws Exception {
+ p_oBo.setPackage();
+ return m_oSnapH.addDTO(p_oBo.toDTO());
+ }
+
+ public BaseBusinessObject getObject(Class p_oCls, long p_lUid)
+ throws Exception {
+ BobjStdDTO oDto = m_oSnapH.getDTO(p_oCls.getName(), p_lUid);
+ return (null == oDto) ? null : BaseBusinessObject.getFromDTO(oDto);
+ }
+
+ public void rmvObject(Class p_oCls, long p_lUid) throws Exception {
+ m_oSnapH.rmvObject(p_oCls.getName(), p_lUid);
+ }
+
+ public void rplObject(BaseBusinessObject p_o) throws Exception {
+ p_o.setPackage();
+ m_oSnapH.rplDTO(p_o.toDTO());
+ }
+
+ public ObjLocator[] getLocatorList(Class p_oCls, Properties p_oProp) {
+ return null;
+ } //__________________________________
+
+ public ObjLocator[] getLocatorList(Class p_oCls, long[] p_laUids) {
+ return null;
+ } //__________________________________
} //____________________________________________________________________________
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateRemote.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateRemote.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateRemote.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -24,7 +24,6 @@
package org.jboss.soa.esb.services;
import javax.naming.*;
-import javax.rmi.*;
import org.jboss.soa.esb.services.EJB.*;
import org.jboss.soa.esb.util.*;
@@ -33,42 +32,45 @@
public class PersistHandlerBsDelegateRemote implements IpersistHandler
{
- private PersistHandler m_oSnapH;
+ private PersistHandler m_oSnapH;
public PersistHandlerBsDelegateRemote(Context p_ctx) throws Exception
{
- Object ref = p_ctx.lookup("PersistHandler");
- Object oNarr = PortableRemoteObject.narrow(ref, PersistHandlerHome.class);
- PersistHandlerHome oHu = (PersistHandlerHome) oNarr;
- m_oSnapH = oHu.create();
- } //__________________________________
+ m_oSnapH = (PersistHandler) p_ctx.lookup("jbossesb-appl/PersistHandlerBean/remote");
+ }
- public void remove() throws Exception {}
public long getUidChunk(int p_iQ) throws Exception
- { return m_oSnapH.getUidChunk(p_iQ);
- } //__________________________________
- public long addObject (BaseBusinessObject p_oBo) throws Exception
- { if (null==p_oBo) return -1;
+ {
+ return m_oSnapH.getUidChunk(p_iQ);
+ }
+
+ public long addObject (BaseBusinessObject p_oBo) throws Exception
+ {
+ if (null==p_oBo) return -1;
p_oBo.setPackage();
BobjStdDTO oDto = p_oBo.toDTO();
oDto.setLocators(p_oBo.allLocators());
return m_oSnapH.addDTO(oDto);
- } //__________________________________
+ }
+
public BaseBusinessObject getObject (Class p_oCls, long p_lUid) throws Exception
{
BobjStdDTO oDto = m_oSnapH.getDTO(p_oCls.getName(), p_lUid);
return (null==oDto)?null:BaseBusinessObject.getFromDTO(oDto);
- } //__________________________________
- public void rmvObject (Class p_oCls, long p_lUid) throws Exception
- { m_oSnapH.rmvObject(p_oCls.getName(), p_lUid);
- } //__________________________________
- public void rplObject (BaseBusinessObject p_oBo) throws Exception
+ }
+
+ public void rmvObject (Class p_oCls, long p_lUid) throws Exception
+ {
+ m_oSnapH.rmvObject(p_oCls.getName(), p_lUid);
+ }
+
+ public void rplObject (BaseBusinessObject p_oBo) throws Exception
{ if (null==p_oBo) return;
p_oBo.setPackage();
BobjStdDTO oDto = p_oBo.toDTO();
oDto.setLocators(p_oBo.allLocators());
m_oSnapH.rplDTO(oDto);
- } //__________________________________
+ }
public ObjLocator[] getLocatorList(Class p_oCls, Properties p_oProp)
{
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerFactory.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerFactory.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerFactory.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -30,9 +30,10 @@
public class PersistHandlerFactory
{
- private static final String [] s_saTypes = {"local","remote"};
+ private static final String [] s_saTypes = {"local","remote","mock"};
private final static int LCL=0;
private final static int REM=1;
+ private final static int MOK=2;
public static IpersistHandler getPersistHandler
(String p_sLocRem, String p_sJndiType, String p_sJndiServer) throws Exception
@@ -41,15 +42,16 @@
if (iIndex < 0) return null;
switch (iIndex)
{
+ case LCL: return new PersistHandlerBsDelegateLocal(new InitialContext());
case REM: return getPersistHandler
(AppServerContext.getServerContext(p_sJndiType,p_sJndiServer));
- case LCL: return new PersistHandlerBsDelegateLocal(new InitialContext());
+ case MOK: return null; //new MockPersistHandler();
}
throw new Exception("Invalid Persist Handler Delegate <" + p_sLocRem + ">");
- } //__________________________________
+ }
public static IpersistHandler getPersistHandler(Context p_oCtx) throws Exception
- { return new PersistHandlerBsDelegateRemote(p_oCtx);
- } //__________________________________
-
-} //____________________________________________________________________________
+ {
+ return new PersistHandlerBsDelegateRemote(p_oCtx);
+ }
+}
Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/Zap.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/Zap.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/Zap.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,5 +0,0 @@
-package org.jboss.soa.esb.services;
-
-public class Zap {
-
-}
Modified: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/msglistener/AbstractEsbMsgDrivenBean.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/msglistener/AbstractEsbMsgDrivenBean.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/msglistener/AbstractEsbMsgDrivenBean.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -30,7 +30,6 @@
import org.apache.log4j.*;
import org.jboss.soa.esb.util.*;
-import org.jboss.soa.esb.common.*;
import org.jboss.soa.esb.helpers.*;
import org.jboss.soa.esb.parameters.*;
@@ -50,7 +49,7 @@
* The service identifier will be used as a left_to_right (separator="/")
* Name to search the corresponding configuration in a ParamsRepository object
* provided by the factory class name in the
- * SystemProperties.PARAMS_REPOS_FACTORY_CLASS system property
+ * SystemProperties.PARAMS_REPOS_IMPL_CLASS system property
*<p>
* Derived classes are typically empty, and are coded just to tie the
* MDB that extends this class with a specific
@@ -240,12 +239,8 @@
protected DomElement getParameters(String p_sKey)
throws Exception
{
- String sFactoryClass
- = SystemProperties.getParamsReposFactoryClass();
- ParamsRepository oRep
- = ParamsReposUtil.reposFromFactory(sFactoryClass,null);
- return oRep.getElement(oRep.nameFromString(p_sKey));
-
+ ParamRepository repo = ParamRepositoryFactory.getInstance();
+ return DomElement.fromXml(repo.get(p_sKey));
} //__________________________________
Property changes on: labs/jbossesb/branches/refactor/product/core/services/tests
___________________________________________________________________
Name: svn:ignore
+
TESTS-TestSuites.xml
Modified: labs/jbossesb/branches/refactor/product/core/services/tests/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/tests/build.xml 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/tests/build.xml 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<project name="build.services.tests" default="org.jboss.esb.services.tests.compile" basedir=".">
+ <property file="../../../deployment.properties"/>
+
<property name="org.jboss.esb.module.src.dir" value="../src"/>
<property name="org.jboss.esb.module.classes.dir" value="${org.jboss.esb.internal.dest}/classes/services"/>
<property name="org.jboss.esb.module.tests.src.dir" value="${basedir}/src"/>
@@ -20,6 +22,7 @@
<pathelement location="${org.jboss.esb.module.classes.dir}"/>
<pathelement location="${org.jboss.esb.internal.dest}/classes/common"/>
+
</path>
<target name="org.jboss.esb.tests.init">
@@ -103,10 +106,18 @@
<!-- Need the tests src folder because there may be non-compiled test resources -->
<pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
<path refid="org.jboss.esb.tests.base.classpath"/>
+ <pathelement location="${org.jboss.esb.ejb3.lib.dir}"/>
</classpath>
<!-- emma jvm args -->
<jvmarg value="-Demma.coverage.out.file=${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
+ <!-- setting system properties -->
+ <sysproperty key="org.jboss.esb.db.driver" value="${org.jboss.esb.db.driver}"/>
+ <sysproperty key="org.jboss.esb.db.url" value="${org.jboss.esb.db.url}"/>
+ <sysproperty key="org.jboss.esb.db.user" value="${org.jboss.esb.db.user}"/>
+ <sysproperty key="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}"/>
+ <sysproperty key="log4j.configuration" value="${log4j.configuration}"/>
+
</junit>
<junitreport>
<fileset dir="${org.jboss.esb.tests.report.dir}">
Copied: labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB (from rev 5491, labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB)
Copied: labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test (from rev 5491, labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test)
Deleted: labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,231 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.services.EJB.test;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Hashtable;
-
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.soa.esb.common.tests.BaseTest;
-import org.jboss.soa.esb.common.tests.EJBContainerSetup;
-import org.jboss.soa.esb.helpers.DomElement;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
-import org.jboss.soa.esb.notification.NotificationList;
-import org.jboss.soa.esb.notification.NotificationTarget;
-import org.jboss.soa.esb.notification.NotifySqlTable;
-import org.jboss.soa.esb.services.EJB.NotificationHandler;
-
-
-public class NotificationTest extends BaseTest
-{
- private Logger logger = Logger.getLogger(NotificationTest.class);
-
- public void testNotification() {
- try {
- logger.log(Priority.INFO, "Notification Test");
- InitialContext ctx = getInitialContext();
- NotificationHandler local = (NotificationHandler ) ctx.lookup("NotificationHandlerBean/local");
- DomElement oEl = new DomElement("MyFileList");
- oEl.setAttr(NotificationList.TYPE,"OK");
-
- // oEl.addElemChild(fileListTarget());
- // oEl.addElemChild(emailTarget());
- // oEl.addElemChild(jmsQueueTarget());
- // oEl.addElemChild(jmsTopicTarget());
- oEl.addElemChild(sqlTableTarget());
-
- NotificationList oNL = new NotificationList(oEl);
-
- // to see how the XML looks like
- // this is just a unit test class
- // Typically the XML is used in a parameter object (DomElement.fromXml())
- System.out.println(oNL.toString());
-
- // a simple timestamped message
- Date oNow = new Date(System.currentTimeMillis());
- SimpleDateFormat oStamp = new SimpleDateFormat("dd/MMM/yyyy HH:mm:ss.SSS");
- StringBuilder sb = new StringBuilder(oStamp.format(oNow))
- .append(" This message from Notification test");
-
- //KS local.sendNotifications(oNL.toString(),sb.toString());
-
- } catch (Exception e) {
- logger.log(Priority.ERROR, e.getMessage(), e);
- }
- }
-
- public void testKurt() {
- logger.log(Priority.INFO, "Test Kurt");
-
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(NotificationTest.class);
- return new EJBContainerSetup(suite);
- }
-
- public static InitialContext getInitialContext() throws Exception
- {
- Hashtable props = getInitialContextProperties();
- return new InitialContext(props);
- }
-
- private static Hashtable getInitialContextProperties()
- {
- Hashtable props = new Hashtable();
- props.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
- props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
- return props;
- }
-
-// static DomElement emailTarget() throws Exception
-// {
-// DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
-// oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyEmail");
-// oTgt.setAttr(EsbEmail.FROM,"sender at jboss.com");
-// oTgt.setAttr(EsbEmail.SENDTO,"receiver1 at hotmail.com,receiver2 at jboss.com");;
-// oTgt.setAttr(EsbEmail.SUBJECT,"TEST from Rosetta");
-// oTgt.setAttr(EsbEmail.MESSAGE,"This is the text of your message");
-//
-// // This class does NOT send the e-mails, the app server does
-// // consequently these paths would have to be accessible in the
-// // application server (filesystem / mounts)
-// String[] sa = {"/tmp/tomcat.sh","/tmp/program.js"};
-// for (String sCurr : sa)
-// oTgt.addTextChild(EsbEmail.ATTACH,sCurr);
-//
-// return oTgt;
-// } //________________________________
-//
-// static DomElement fileListTarget() throws Exception
-// {
-// DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
-// oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyFiles");
-//
-// // This class does NOT write the files, the app server does
-// // consequently these paths would have to be accessible in the
-// // application server (filesystem / mounts)
-// String[] sa = {"file:///tmp/file1.notif","file:///tmp/file2.notif"};
-// for (String sCurr : sa)
-// { DomElement oFile = new DomElement(NotifyFiles.CHILD_FILE);
-// oFile.setAttr(NotifyFiles.ATT_URI,sCurr);
-// oFile.setAttr(NotifyFiles.ATT_APPEND,Boolean.toString(true));
-// oTgt.addElemChild(oFile);
-// }
-// return oTgt;
-// } //________________________________
-//
-// static DomElement jmsQueueTarget() throws Exception
-// {
-// DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
-// oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyQueues");
-//
-// String[] sa = {"queue/A","queue/B"};
-// for (String sCurr : sa)
-// { DomElement oQ = new DomElement(NotifyQueues.CHILD_QUEUE);
-// oQ.setAttr(NotifyJMS.ATT_DEST_NAME,sCurr);
-// for (DomElement oProp : getMessageProperties())
-// oQ.addElemChild(oProp);
-// oTgt.addElemChild(oQ);
-// }
-// return oTgt;
-// } //________________________________
-//
-// static DomElement jmsTopicTarget() throws Exception
-// {
-// DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
-// oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyTopics");
-//
-// String[] sa = {"topic/testTopic"};
-// for (String sCurr : sa)
-// { DomElement oQ = new DomElement(NotifyTopics.CHILD_TOPIC);
-// oQ.setAttr(NotifyJMS.ATT_DEST_NAME,sCurr);
-// for (DomElement oProp : getMessageProperties())
-// oQ.addElemChild(oProp);
-// oTgt.addElemChild(oQ);
-// }
-// return oTgt;
-// } //________________________________
-//
-// static DomElement[] getMessageProperties() throws Exception
-// {
-// KeyValuePair[] oaProps = new KeyValuePair[]
-// {new KeyValuePair("prop1","111")
-// ,new KeyValuePair("prop2","bbb")
-// ,new KeyValuePair("prop3","abc123")
-// };
-// DomElement[] oaRet = new DomElement[oaProps.length];
-// int iCurr = 0;
-// for (KeyValuePair oCurr : oaProps)
-// { DomElement oElem = new DomElement(NotifyJMS.CHILD_MSG_PROP);
-// oElem.setAttr(NotifyJMS.ATT_PROP_NAME,oCurr.getKey());
-// oElem.setAttr(NotifyJMS.ATT_PROP_VALUE,oCurr.getValue());
-// oaRet[iCurr++] = oElem;
-// }
-// return oaRet;
-// } //________________________________
-
- static DomElement sqlTableTarget() throws Exception
- {
- DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
- oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifySqlTable");
-
- oTgt.setAttr(SimpleDataSource.DRIVER,"org.postgresql.Driver");
- oTgt.setAttr(SimpleDataSource.URL,"jdbc:postgresql://localhost:5432/jbossesb");
- oTgt.setAttr(SimpleDataSource.USER,"postgres");
- oTgt.setAttr(SimpleDataSource.PASSWORD,"postgres");
-
- // Table name for insert - must exist in database (URL)
- oTgt.setAttr(NotifySqlTable.ATT_TABLE,"test_notif_table");
- // Column that will contain the dynamic data generated by the ActionClass
- // must exist in table (ATT_TABLE above)
- oTgt.setAttr(NotifySqlTable.ATT_DATA,"msg");
-
- // constant data that can be also added in the insert
- // (perhaps needed for queries)
- // Key = column name (it must exist in the table, same as ATT_DATA column)
- KeyValuePair[] oaCols = new KeyValuePair[]
- {new KeyValuePair("src","TestNotification")
- ,new KeyValuePair("ref","any Ref")
- ,new KeyValuePair("val1","VVVV 11111")
- };
- for (KeyValuePair oCurr : oaCols)
- { DomElement oElem = new DomElement(NotifySqlTable.CHILD_COLUMN);
- oElem.setAttr(NotifySqlTable.ATT_NAME,oCurr.getKey());
- oElem.setAttr(NotifySqlTable.ATT_VALUE,oCurr.getValue());
- oTgt.addElemChild(oElem);
- }
-
- return oTgt;
- }
-
-}
-
-
Copied: labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java (from rev 5491, labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java)
Deleted: labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java 2006-08-05 03:33:59 UTC (rev 5491)
+++ labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java 2006-08-05 10:54:35 UTC (rev 5492)
@@ -1,62 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.soa.esb.services.EJB.test;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.soa.esb.common.tests.BaseTest;
-import org.jboss.soa.esb.common.tests.EJBContainerSetup;
-import org.jboss.soa.esb.services.EJB.PersistHandler;
-
-
-public class PersistHandlerTest extends BaseTest
-{
- private Logger logger = Logger.getLogger(PersistHandlerTest.class);
-
- public void testConnectivityToPersistHandler() {
- try {
- logger.log(Priority.INFO, "PersistHandler Test");
- PersistHandler persistHandlerLocal = (PersistHandler ) EJBContainerSetup.lookup("PersistHandlerBean/remote");
- logger.log(Priority.INFO, "persistHandlerLocal=" + persistHandlerLocal);
- } catch (Exception e) {
- logger.log(Priority.ERROR, e.getMessage(), e);
- }
- }
-
- public void testKurt() {
- logger.log(Priority.INFO, "Test Kurt");
-
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(PersistHandlerTest.class);
- return new EJBContainerSetup(suite);
- }
-
-
-
-}
-
-
Copied: labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java (from rev 5491, labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java)
Copied: labs/jbossesb/branches/refactor/product/deployment.properties-example (from rev 5491, labs/jbossesb/trunk/product/deployment.properties-example)
Copied: labs/jbossesb/branches/refactor/product/lib/deploy (from rev 5491, labs/jbossesb/trunk/product/lib/deploy)
Deleted: labs/jbossesb/branches/refactor/product/lib/deploy/postgresql-8.1-407.jdbc3.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/refactor/product/lib/deploy/postgresql-8.1-407.jdbc3.jar (from rev 5491, labs/jbossesb/trunk/product/lib/deploy/postgresql-8.1-407.jdbc3.jar)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3 (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3)
Deleted: labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-annotations-ejb3.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-annotations-ejb3.jar (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3/jboss-annotations-ejb3.jar)
Deleted: labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-ejb3x.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3/jboss-ejb3x.jar (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3/jboss-ejb3x.jar)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3_embedded)
Deleted: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/hibernate-all.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/hibernate-all.jar (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3_embedded/hibernate-all.jar)
Deleted: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/jboss-ejb3-all.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/jboss-ejb3-all.jar (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3_embedded/jboss-ejb3-all.jar)
Deleted: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/thirdparty-all.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/refactor/product/lib/ejb3_embedded/thirdparty-all.jar (from rev 5491, labs/jbossesb/trunk/product/lib/ejb3_embedded/thirdparty-all.jar)
Modified: labs/jbossesb/branches/refactor/product/lib/ext/jbossall-client.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/branches/refactor/product/lib/ext/mysql-connector-java-3.1.13-bin.jar
===================================================================
(Binary files differ)
More information about the jboss-svn-commits
mailing list