[jboss-svn-commits] JBL Code SVN: r5570 - in labs/jbossesb/branches/refactor/product/core: . common common/src/org/jboss/soa/esb/common common/src/org/jboss/soa/esb/helpers common/src/org/jboss/soa/esb/notification common/tests common/tests/resources/conf common/tests/src/org/jboss/soa/esb/common/tests common/tests/src/org/jboss/soa/esb/helpers listeners processors services services/src/org/jboss/soa/esb/services services/src/org/jboss/soa/esb/services/beans services/tests services/tests/src/org/jboss/soa/esb/services/EJB/test

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 7 16:26:24 EDT 2006


Author: arvinder
Date: 2006-08-07 16:25:56 -0400 (Mon, 07 Aug 2006)
New Revision: 5570

Added:
   labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-deployment.xml
   labs/jbossesb/branches/refactor/product/core/log4j.xml
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java
   labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationUnitTest.java
   labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerUnitTest.java
Removed:
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/EJB/
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/msglistener/
   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
Modified:
   labs/jbossesb/branches/refactor/product/core/common/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/Email.java
   labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/notification/NotifyEmail.java
   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/common/tests/EJBContainerSetup.java
   labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java
   labs/jbossesb/branches/refactor/product/core/listeners/build.xml
   labs/jbossesb/branches/refactor/product/core/processors/build.xml
   labs/jbossesb/branches/refactor/product/core/services/build.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/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/PersistHandlerBsDelegateLocal.java
   labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateRemote.java
   labs/jbossesb/branches/refactor/product/core/services/tests/build.xml
Log:
sync with trunk

Modified: labs/jbossesb/branches/refactor/product/core/common/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/build.xml	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/build.xml	2006-08-07 20:25:56 UTC (rev 5570)
@@ -9,13 +9,15 @@
     <property environment="env"/>
 
 	<property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+	<property name="org.jboss.esb.ejb3.lib.dir" value="${basedir}/../../lib/ejb3"/>
 	<condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
 		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
 	</condition>
 	
 	<path id="org.jboss.esb.common.base.classpath">
         <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
-    </path>
+		<fileset dir="${org.jboss.esb.ejb3.lib.dir}" includes="*.jar,*.zip"/>
+	</path>
 
     <target name="org.jboss.esb.common.init">
         <tstamp>

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/common/SystemProperties.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -42,7 +42,7 @@
 
 	public static final String OBJECT_STORE_CONFIG_FILE = "org.jboss.soa.esb.objStore.configfile";
 
-	public static final String ENCRYPT_FACTORY_CLASS = "jorg.jboss.soa.esb.encryption.factory.class";
+	public static final String ENCRYPT_FACTORY_CLASS = "org.jboss.soa.esb.encryption.factory.class";
 
 	public static final String DEFAULT_HOST = "localhost";
 
@@ -106,7 +106,8 @@
 	}
 
 	public static String getObjStoreConfigFile() {
-		return System.getProperty(OBJECT_STORE_CONFIG_FILE);
+		String property = System.getProperty(OBJECT_STORE_CONFIG_FILE);
+		return property;
 	}
 
 	public static String getEncryptionFactoryClass() {

Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/Email.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/Email.java	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/helpers/Email.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -23,6 +23,7 @@
 package org.jboss.soa.esb.helpers;
 
 import java.util.Properties;
+import java.util.StringTokenizer;
 
 import javax.activation.DataHandler;
 import javax.activation.FileDataSource;
@@ -99,11 +100,46 @@
 	 * to be attached in the outgoing message
 	 */
 	public static final String MESSAGE = "message";
+    
+    /**
+     * will be the contents of the From: field in the outgoing message
+     */
+    private String from = null;
 
+    /**
+     * comma separated list of recipients
+     */
+    private String sendTo = null;
+
+    /**
+     * comma separated list of copy recipients
+     */
+    private String copyTo = null;
+
+    /**
+     * This attribute will be the content of the subject of the mail message
+     */
+    private String subject = null;
+
+    /**
+     * Comma separated list of attachment file names
+     */
+    private String[] attachments = null;
+    
+    /**
+     * Value of this attribute will be the content of the e-mail's text
+     */
+    private String message = null;    
+
 	/**
 	 * The message to b sent via a subsequent call to {@link #sendMessage()}.
 	 */
 	private MimeMessage mailMessage;
+    
+    /**
+     * The mail Session to use
+     */
+    private Session oMailSess = null;
 
 	/**
 	 * Public constructor.
@@ -122,24 +158,21 @@
 	 * @see DomElement
 	 * 
 	 */
-	public Email(DomElement p_oMessageParms) throws AddressException, MessagingException {
+	public Email() throws AddressException, MessagingException {
 		// REVIEW: How about typing the parameters a little better??? Looks as though that might have a huge ripple-on effect accross the codebase!!
 		// REVIEW: Does the session need to ne initialised every time???
-		Session oMailSess = initMailServerSession();
+		this.oMailSess = initMailServerSession();
 		
-		// Initialise the oMailMess property... 
-		mailMessage = createMailMessage(p_oMessageParms, oMailSess);
-		
 		// Message can be "sent" via a subsequent call to the sendMessage method!
 	} // __________________________________
 
 	/**
 	 * Send the mail message associated with this instance.
 	 * @throws MessagingException Unable to transport the message associated with this
-	 * EsbEmail instance.
+	 * Email instance.
 	 */
 	public void sendMessage() throws MessagingException {
-		Transport.send(mailMessage);
+		Transport.send(this.getMailMessage());
 	}
 	
 	/**
@@ -147,11 +180,98 @@
 	 * instance.
 	 * @return The mailMessage property value.
 	 */
-	public MimeMessage getMailMessage() {
+	public MimeMessage getMailMessage() throws MessagingException {
+        if (this.mailMessage == null){
+            this.mailMessage = this.createMailMessage(this.oMailSess);
+        }
 		return mailMessage;
-	}
+	}    
 
 	/**
+     * @return Returns the attachments.
+     */
+    public String[] getAttachments() {
+        return this.attachments;
+    }
+
+    /**
+     * @param attachments The attachments to set.
+     */
+    public void setAttachments(String[] attachments) {
+        this.attachments = attachments;
+    }
+
+    /**
+     * @return Returns the copyTo.
+     */
+    public String getCopyTo() {
+        return this.copyTo;
+    }
+
+    /**
+     * @param copyTo The copyTo to set.
+     */
+    public void setCopyTo(String copyTo) {
+        this.copyTo = copyTo;
+    }
+
+    /**
+     * @return Returns the from.
+     */
+    public String getFrom() {
+        return this.from;
+    }
+
+    /**
+     * @param from The from to set.
+     */
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    /**
+     * @return Returns the sendTo.
+     */
+    public String getSendTo() {
+        return this.sendTo;
+    }
+
+    /**
+     * @param sendTo The sendTo to set.
+     */
+    public void setSendTo(String sendTo) {
+        this.sendTo = sendTo;
+    }
+
+    /**
+     * @return Returns the subject.
+     */
+    public String getSubject() {
+        return this.subject;
+    }
+
+    /**
+     * @param subject The subject to set.
+     */
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    /**
+     * @return Returns the message.
+     */
+    public String getMessage() {
+        return this.message;
+    }
+
+    /**
+     * @param message The message to set.
+     */
+    public void setMessage(String message) {
+        this.message = message;
+    } 
+
+    /**
 	 * Create the mail message instance to be {@link #sendMessage() sent}.
 	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
 	 * @param oMailSess Mail session on which the message is to be transported.
@@ -159,13 +279,13 @@
 	 * @throws AddressException
 	 * @throws MessagingException
 	 */
-	private MimeMessage createMailMessage(DomElement p_oMessageParms, Session oMailSess) throws AddressException, MessagingException {
+	private MimeMessage createMailMessage(Session oMailSess) throws AddressException, MessagingException {
 		MimeMessage oMessage = new MimeMessage(oMailSess);
 		
 		// Populate the message with the data supplied in the p_oMessageParms DomElement.
-		addMessageAddressing(p_oMessageParms, oMessage);
-		addMessageSubject(p_oMessageParms, oMessage);
-		addMessageContent(p_oMessageParms, oMessage);
+		addMessageAddressing(oMessage);
+		addMessageSubject( oMessage);
+		addMessageContent(oMessage);
 		
 		return oMessage;
 	}
@@ -177,22 +297,20 @@
 	 * @throws AddressException
 	 * @throws MessagingException
 	 */
-	private void addMessageAddressing(DomElement p_oMessageParms, MimeMessage oMessage) throws AddressException, MessagingException {
-		String sFrom = p_oMessageParms.getAttr(FROM);
-		InternetAddress oFrom = new InternetAddress(sFrom);
+	private void addMessageAddressing(MimeMessage oMessage) throws AddressException, MessagingException {		
+		InternetAddress oFrom = new InternetAddress(this.from);
 	
 		oMessage.setFrom(oFrom);
 		oMessage.setReplyTo(new Address[] { oFrom });
 		InternetAddress[] oaTo = 
-			InternetAddress.parse(p_oMessageParms.getAttr(SENDTO));
+			InternetAddress.parse(this.sendTo);
 		
 		for (int i1 = 0; i1 < oaTo.length; i1++) {
 			oMessage.addRecipient(MimeMessage.RecipientType.TO, oaTo[i1]);
 		}
-	
-		String sCopyToAddress = (String) p_oMessageParms.getAttr(COPYTO);
-		if (null != sCopyToAddress) {
-			oaTo = InternetAddress.parse(sCopyToAddress);
+			
+		if (null != this.copyTo) {
+			oaTo = InternetAddress.parse(this.copyTo);
 			for (int i1 = 0; i1 < oaTo.length; i1++) {
 				oMessage.addRecipient(MimeMessage.RecipientType.CC, oaTo[i1]);
 			}
@@ -205,11 +323,9 @@
 	 * @param oMessage The message.
 	 * @throws MessagingException
 	 */
-	private void addMessageSubject(DomElement p_oMessageParms, MimeMessage oMessage) throws MessagingException {
-		String sSubject = (String) p_oMessageParms.getAttr(SUBJECT);
-
-		if (null != sSubject) {
-			oMessage.setSubject(sSubject);
+	private void addMessageSubject(MimeMessage oMessage) throws MessagingException {		
+		if (null != this.subject) {
+			oMessage.setSubject(this.subject);
 		}
 	}
 
@@ -220,25 +336,24 @@
 	 * @param oMessage The message.
 	 * @throws MessagingException
 	 */
-	private void addMessageContent(DomElement p_oMessageParms, MimeMessage oMessage) throws MessagingException {
+	private void addMessageContent(MimeMessage oMessage) throws MessagingException {
 		BodyPart oBodyP = new MimeBodyPart();
 		Multipart oMultiP = new MimeMultipart();
 
 		oMultiP.addBodyPart(oBodyP);
 		oMessage.setContent(oMultiP);
-		String sBodyPartText = p_oMessageParms.getAttr(MESSAGE);
-		if (null == sBodyPartText) {
-			sBodyPartText = "";
+		if (null == this.message) {
+            this.message = "";
 		}
-		oBodyP.setText(sBodyPartText + "\n");
+		oBodyP.setText(this.message + "\n");
 
-		String[] saFn = p_oMessageParms.getTextChildren(ATTACH);
-		for (int i1 = 0; i1 < saFn.length; i1++) {
-			oMultiP.addBodyPart(oBodyP = new MimeBodyPart());
-			String sFile = saFn[i1];
-			oBodyP.setDataHandler(new DataHandler(new FileDataSource(sFile)));
-			oBodyP.setFileName(sFile.substring(1 + sFile.lastIndexOf("\\")));
-		}
+        
+        for (int i1 = 0; i1 < this.attachments.length; i1++) {
+            oMultiP.addBodyPart(oBodyP = new MimeBodyPart());
+            String sFile = this.attachments[i1];
+            oBodyP.setDataHandler(new DataHandler(new FileDataSource(sFile)));
+            oBodyP.setFileName(sFile.substring(1 + sFile.lastIndexOf("\\")));
+        }
 	}
 
 	/**
@@ -265,6 +380,25 @@
 			javax.mail.Session.getDefaultInstance(oMailP, oAuth);
 		return oMailSess;
 	}
+    
+    /**  
+     * Method parsing filename from a string containing a comma separated list of filenames
+     * @param attachments the string containing the comma separated list of filenames
+     * @return a String array containing an entry for every filename in the given comma separated list
+     */
+    private String[] getFileNamesAsArray(String attachments) {
+        if (attachments.indexOf(',') != -1){
+            StringTokenizer st = new StringTokenizer(attachments,",");
+            String[] attachmentFileNames = new String[st.countTokens()];
+            int index = 0;
+            while (st.hasMoreTokens()) {
+                attachmentFileNames[index] = st.nextToken();
+                index++;
+            }
+            return attachmentFileNames;
+        }
+        return new String[]{attachments};
+    }
 
 	private class MyAuth extends Authenticator {
 		private String m_sUser, m_sPwd;

Modified: labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/notification/NotifyEmail.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/notification/NotifyEmail.java	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/src/org/jboss/soa/esb/notification/NotifyEmail.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -31,7 +31,7 @@
 import org.jboss.soa.esb.util.Util;
 
 /**
- * This class will send an e-mail using the EsbEmail class
+ * This class will send an e-mail using the Email class
  * <p>
  * Description:
  * </p>
@@ -48,10 +48,9 @@
 	 * 
 	 * @param p_oP
 	 *            DomElement - See attributes and structure needed for the
-	 *            EsbEmail(DomElement) constructor - The MESSAGE attribute will
+	 *            Email() constructor - The MESSAGE attribute will
 	 *            be filled in at sendNotification(Serializable) time
 	 * @throws Exception
-	 * @see Email#Email(DomElement)
 	 * @see NotifyEmail#sendNotification(Serializable)
 	 */
 	public NotifyEmail(DomElement p_oP) throws Exception {
@@ -69,7 +68,7 @@
 	} // __________________________________
 
 	/**
-	 * Send an Email using EsbEmail() using p_o.toString() to fill in the
+	 * Send an Email using Email() using p_o.toString() to fill in the
 	 * message text
 	 * 
 	 * @param p_o
@@ -97,7 +96,16 @@
 	 * @param messageParams Message parameters.
 	 */
 	protected void sendEmailNotification(DomElement messageParams) throws AddressException, MessagingException {
-		Email esbMail = new Email(messageParams);
+        
+		Email esbMail = new Email();
+        esbMail.setSendTo(messageParams.getAttr(Email.SENDTO));
+        esbMail.setFrom(messageParams.getAttr(Email.FROM));
+        esbMail.setCopyTo(messageParams.getAttr(Email.COPYTO));
+        esbMail.setSubject(messageParams.getAttr(Email.SUBJECT));
+
+        esbMail.setAttachments(messageParams.getTextChildren(Email.ATTACH));
+        esbMail.setMessage(messageParams.getAttr(Email.MESSAGE));
+        
 		esbMail.sendMessage();
 	}
 

Modified: labs/jbossesb/branches/refactor/product/core/common/tests/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/build.xml	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/build.xml	2006-08-07 20:25:56 UTC (rev 5570)
@@ -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.ejb3_embedded.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,8 +17,7 @@
     <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"/>
-
+    	<fileset dir="${org.jboss.esb.ejb3_embedded.lib.dir}" includes="jboss-ejb3-all.jar hibernate-all.jar thirdparty-all"/>
     </path>
 
     <target name="org.jboss.esb.tests.init">
@@ -91,7 +90,8 @@
             <formatter type="xml"/>
             <batchtest todir="${org.jboss.esb.tests.report.dir}">
                 <fileset dir="${org.jboss.esb.module.tests.src.dir}">
-                    <include name="**/**UnitTest.java"/>                   
+                    <include name="**/**UnitTest.java"/>
+                    <exclude name="**/connection/**"/>
                     <include name="**/**FuncTest.java"/>
                 </fileset>
             </batchtest>

Copied: labs/jbossesb/branches/refactor/product/core/common/tests/resources/conf/ejb3-deployment.xml (from rev 5568, labs/jbossesb/trunk/product/core/common/tests/resources/conf/ejb3-deployment.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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -37,16 +37,16 @@
 public class BaseTest extends TestCase {
 	
 	/** The Database driver used for unit tests */
-	public static String DB_DRIVER = "org.jboss.esb.db.driver";
+	public static String DB_DRIVER = "org.jboss.esb.test.db.driver.class";
 
 	/** The Database connection url used for unit tests */
-	public static String DB_URL = "org.jboss.esb.db.url";
+	public static String DB_URL = "org.jboss.esb.test.db.url";
 
 	/** The Database user name used for unit tests */
-	public static String DB_USERNAME = "org.jboss.esb.db.username";
+	public static String DB_USERNAME = "org.jboss.esb.test.db.username";
 
 	/** The Database password used for unit tests */
-	public static String DB_PASSWORD = "org.jboss.esb.db.password";
+	public static String DB_PASSWORD = "org.jboss.esb.test.db.password";
 
 	/** The Logger. */
     protected Logger log = Logger.getLogger(getClass());

Modified: 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/common/tests/EJBContainerSetup.java	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/common/tests/EJBContainerSetup.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -81,7 +81,7 @@
 
 			// Deploy CaveatEmptor beans (datasource, mostly)
 			EJB3StandaloneBootstrap.deployXmlResource("jboss-jms-beans.xml");
-			//EJB3StandaloneBootstrap.deployXmlResource("ejb3-deployment.xml");
+			EJB3StandaloneBootstrap.deployXmlResource("ejb3-deployment.xml");
 			EJB3StandaloneBootstrap.deployXmlResource("security-beans.xml");
 			log.info("scanClasspath: "
 							+ System.getProperty("java.class.path"));

Modified: labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java
===================================================================
--- labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/common/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -48,7 +48,14 @@
 	public void test_Email() throws AddressException, MessagingException, IOException {
 		// Look at the source message in testfile4.xml before reading this test.
 		
-		Email esbMail = new Email(mailParams);
+        Email esbMail = new Email();
+        esbMail.setSendTo(mailParams.getAttr(Email.SENDTO));
+        esbMail.setFrom(mailParams.getAttr(Email.FROM));
+        esbMail.setCopyTo(mailParams.getAttr(Email.COPYTO));
+        esbMail.setSubject(mailParams.getAttr(Email.SUBJECT));
+
+        esbMail.setAttachments(mailParams.getTextChildren(Email.ATTACH));
+        esbMail.setMessage(mailParams.getAttr(Email.MESSAGE));
 		MimeMessage message = esbMail.getMailMessage();
 		Address[] addresses;
 

Modified: labs/jbossesb/branches/refactor/product/core/listeners/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/listeners/build.xml	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/listeners/build.xml	2006-08-07 20:25:56 UTC (rev 5570)
@@ -9,6 +9,7 @@
     <property environment="env"/>
 
 	<property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+	<property name="org.jboss.esb.ejb3.lib.dir" value="${basedir}/../../lib/ejb3"/>
 	<condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
 		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
 	</condition>
@@ -23,6 +24,7 @@
 		<pathelement location="${org.jboss.esb.internal.dest}/classes/common"/>
 		<pathelement location="${org.jboss.esb.internal.dest}/classes/processors"/>
 		<pathelement location="${org.jboss.esb.internal.dest}/classes/services"/>
+		<fileset dir="${org.jboss.esb.ejb3.lib.dir}" includes="*.jar,*.zip"/>
     </path>
 
     <target name="org.jboss.esb.listeners.init">

Copied: labs/jbossesb/branches/refactor/product/core/log4j.xml (from rev 5568, labs/jbossesb/trunk/product/core/log4j.xml)

Modified: labs/jbossesb/branches/refactor/product/core/processors/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/processors/build.xml	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/processors/build.xml	2006-08-07 20:25:56 UTC (rev 5570)
@@ -9,6 +9,7 @@
     <property environment="env"/>
 
 	<property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+	<property name="org.jboss.esb.ejb3.lib.dir" value="${basedir}/../../lib/ejb3"/>
 	<condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
 		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
 	</condition>
@@ -22,6 +23,7 @@
     	<pathelement location="${org.jboss.esb.internal.dest}/classes/common"/>
     	<pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
     	<pathelement location="${org.jboss.esb.internal.dest}/classes/services"/>
+    	<fileset dir="${org.jboss.esb.ejb3.lib.dir}" includes="*.jar,*.zip"/>
     </path>
 
 	<target name="org.jboss.esb.processors.init">

Modified: labs/jbossesb/branches/refactor/product/core/services/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/build.xml	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/build.xml	2006-08-07 20:25:56 UTC (rev 5570)
@@ -2,6 +2,8 @@
 
 <project name="JbossEsbServices" default="org.jboss.esb.services.compile" basedir=".">
 
+	<property name="org.jboss.esb.internal.dest" value="${basedir}/../../build"/>
+		
     <property name="org.jboss.esb.services.name.jar" value="${ant.project.name}.jar"/>
 	<property name="org.jboss.esb.services.dist.dir" value="${org.jboss.esb.internal.dest}/dist"/>
     <property name="org.jboss.esb.services.appl.dir" value="../.."/>
@@ -17,14 +19,9 @@
 		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
 	</condition>
 	
-	<property name="org.jboss.esb.services.xdoclet.lib" value="${org.jboss.esb.root.dir}/lib/ext"/>
-	<condition property="org.jboss.esb.ext.serverlib.dir" value="${env.XDOCLET_HOME}/lib">
-		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-	</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">
+	<property name="org.jboss.esb.ejb3.lib.dir" value="${basedir}/../../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>
 	
@@ -32,16 +29,10 @@
 	    <!-- Define the class path                                               -->
 	    <!-- =================================================================== -->
 	    <path id="org.jboss.esb.services.base.classpath">
-	        <fileset dir="${org.jboss.esb.services.appl.dir}/lib" includes="*.jar,*.zip"/>
-	        <fileset dir="${org.jboss.esb.ext.serverlib.dir}"  
-			includes="*.jar,*.zip"
-			/>
 	        <fileset dir="${org.jboss.esb.ext.lib.dir}"  
-			includes="*.jar"
+			includes="*.jar" excludes="jbossall-client.jar"
 			/>
-	    	<fileset dir="${org.jboss.esb.ejb3.dir}"  
-				includes="*.jar"
-			/>
+	    	<fileset dir="${org.jboss.esb.ejb3.lib.dir}" includes="*.jar,*.zip"/>
 	    </path>
 
 	    <!-- =================================================================== -->
@@ -116,74 +107,8 @@
     	<pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
     </path>
 
-    <path id="xdoclet.class.path">
-	<fileset dir="${org.jboss.esb.services.xdoclet.lib}">
-	    <include name="*.jar"/>
-	</fileset>
-        <path refid="org.jboss.esb.services.default.classpath"/>
-    </path>
 
     <!-- =================================================================== -->
-    <!-- Initialise xdoclet tasks                                            -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.services.initXdoclet">
-        <taskdef
-            name="ejbdoclet"
-            classname="xdoclet.modules.ejb.EjbDocletTask"
-            classpathref="xdoclet.class.path"
-            />
-    </target>
-
-
-    <!-- =================================================================== -->
-    <!-- Initialise                                                          -->
-    <!-- =================================================================== -->
-    <target name="ejb3doclet" depends="org.jboss.esb.services.initXdoclet">
-
-        <echo>+---------------------------------------------------+</echo>
-        <echo>|                                                   |</echo>
-        <echo>| R U N N I N G   E J B D O C L E T                 |</echo>
-        <echo>|                                                   |</echo>
-        <echo>+---------------------------------------------------+</echo>
-
-        <ejbdoclet
-            destdir="src"
-            mergedir="parent-fake-to-debug"
-            ejbspec="2.0"
-            excludedTags="@version, at author, at todo"
-            force="false"
-            verbose="false"
-            addedTags="@xdoclet-generated at ${TODAY}, at copyright The XDoclet Team, at author XDoclet, at version ${version}"
-            >
-
-            <remoteinterface/>
-            <localinterface/>
-            <homeinterface/>
-            <localhomeinterface/>
-
-        	<fileset dir="src">
-                <include name="**/*Bean.java"/>
-            </fileset>
-
-            <deploymentdescriptor
-                destdir="${org.jboss.esb.services.metainf.dir}"
-                validatexml="true"
-                mergedir="fake-to-debug"
-                description="Jboss ESB"
-                >
-            </deploymentdescriptor>
-
-            <jboss
-                version="3.2"
-                xmlencoding="iso-8859-1"
-                destdir="${org.jboss.esb.services.metainf.dir}"
-                validatexml="true"
-                />
-
-        </ejbdoclet>
-    </target>
-
-    <!-- =================================================================== -->
     <!-- Jar                                                               -->
     <!-- =================================================================== -->
     <target name="jar" description="Assemble jar files"
@@ -192,7 +117,7 @@
         <jar    destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
                 basedir="${org.jboss.esb.services.classes.dir}"
                 includes="**/*.class"
-		excludes="**/EJBs/*Bean*"
+		excludes="**/beans/*Bean*"
                 />
 
 	<antcall target="-ear"/>

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateLocal.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -22,7 +22,7 @@
 package org.jboss.soa.esb.services;
 
 import org.jboss.soa.esb.common.bizclasses.BatchProcess;
-import org.jboss.soa.esb.services.EJB.BatchHandler;
+import org.jboss.soa.esb.services.beans.BatchHandler;
 
 import javax.naming.Context;
 

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/BatchHandlerBsDelegateRemote.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -24,7 +24,7 @@
 package org.jboss.soa.esb.services;
 
 import org.jboss.soa.esb.common.bizclasses.BatchProcess;
-import org.jboss.soa.esb.services.EJB.BatchHandler;
+import org.jboss.soa.esb.services.beans.BatchHandler;
 
 import javax.naming.Context;
 

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateLocal.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -23,7 +23,7 @@
 package org.jboss.soa.esb.services;
 
 import org.jboss.soa.esb.helpers.DomElement;
-import org.jboss.soa.esb.services.EJB.NotificationHandler;
+import org.jboss.soa.esb.services.beans.NotificationHandler;
 
 import javax.naming.Context;
 import java.io.Serializable;

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/NotifHandlerBsDelegateRemote.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -24,7 +24,7 @@
 package org.jboss.soa.esb.services;
 
 import org.jboss.soa.esb.helpers.DomElement;
-import org.jboss.soa.esb.services.EJB.NotificationHandler;
+import org.jboss.soa.esb.services.beans.NotificationHandler;
 
 import javax.naming.Context;
 import java.io.Serializable;

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateLocal.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -23,7 +23,7 @@
 
 package org.jboss.soa.esb.services;
 
-import org.jboss.soa.esb.services.EJB.PersistHandler;
+import org.jboss.soa.esb.services.beans.PersistHandler;
 import org.jboss.soa.esb.util.BaseBusinessObject;
 import org.jboss.soa.esb.util.BobjStdDTO;
 import org.jboss.soa.esb.util.ObjLocator;

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-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/PersistHandlerBsDelegateRemote.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -23,7 +23,7 @@
 
 package org.jboss.soa.esb.services;
 
-import org.jboss.soa.esb.services.EJB.PersistHandler;
+import org.jboss.soa.esb.services.beans.PersistHandler;
 import org.jboss.soa.esb.util.BaseBusinessObject;
 import org.jboss.soa.esb.util.BobjStdDTO;
 import org.jboss.soa.esb.util.ObjLocator;

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans)

Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java	2006-08-07 20:08:31 UTC (rev 5568)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -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.services.beans;
-
-import org.jboss.soa.esb.util.BobjStdDTO;
-
-import javax.ejb.CreateException;
-
-/**
- * @author kstam
- */
-public interface BatchHandler
-{
-    public void create() throws CreateException;
-    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();
-}

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandler.java)

Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java	2006-08-07 20:08:31 UTC (rev 5568)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,326 +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.beans;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.common.bizclasses.BatchProcess;
-import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
-import org.jboss.soa.esb.internal.core.objectstore.BobjStore;
-import org.jboss.soa.esb.internal.core.objectstore.DaoBatchTable;
-import org.jboss.soa.esb.internal.core.objectstore.DaoIndexTable;
-import org.jboss.soa.esb.internal.core.objectstore.DaoSnapTable;
-import org.jboss.soa.esb.internal.core.objectstore.DaoUidTable;
-import org.jboss.soa.esb.internal.core.objectstore.RowBatch;
-import org.jboss.soa.esb.util.BobjStdDTO;
-import org.jboss.soa.esb.util.Util;
-
-import javax.ejb.CreateException;
-import javax.ejb.Init;
-import javax.ejb.Local;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remote;
-import javax.ejb.Remove;
-import javax.ejb.SessionContext;
-import javax.ejb.Stateful;
-import javax.ejb.TransactionManagement;
-import javax.ejb.TransactionManagementType;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.sql.DataSource;
-import java.sql.Date;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.text.SimpleDateFormat;
-/**
- * @author Esteban
- */
- 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;
-
-  public void setSessionContext(SessionContext p_oSessCtx)
-  { this.m_oSessCtx = p_oSessCtx; }
-
-  private Logger                m_oLogger;
-  private JdbcCleanConn         m_oUidConn;
-  private JdbcCleanConn         m_oDataConn;
-
-  private DaoUidTable           m_oDaoUid;
-  private DaoBatchTable         m_oDaoBatch;
-  private DaoIndexTable         m_oDaoIndex;
-  private DaoSnapTable          m_oDaoSnap;
-
-  private long                  m_lBatchNum = -1;
-  private int                   m_iSeq;
-
-/**
- * @throws CreateException
- */
-  @Init
-  public void create() throws CreateException
-  {
-    try
-    { getResources();
-      m_oLogger.info(this.toString()+" Created");
-    }
-    catch (Exception e)
-    { m_oLogger.error("Failed to Create : <"+e.getMessage()+">");
-      throw new CreateException(e.getMessage());
-    }
-  } //__________________________________
-
-  @PostActivate
-  public void ejbActivate()
-  { try
-    { getResources();
-      m_oLogger.info("EJB Activated");
-    }
-    catch (Exception e)
-    { m_oLogger.error("Failed to Activate : <"+e.getMessage()+">");
-    }
-  } //__________________________________
-
-  @PrePassivate
-  public void ejbPassivate()
-  { m_oLogger.info("EJB Passivated");
-    releaseResources();
-    m_oLogger   = null;
-    m_oUidConn  = null;
-    m_oDataConn = null;
-  } //__________________________________
-
-  @Remove
-  public void remove()
-  { 
-	  releaseResources();
-	  m_oLogger.info("EJB Removed");
-  } //__________________________________
-
-  private void getResources() throws Exception
-  { Context oCtx = new InitialContext();
-    m_oLogger  = Util.getDefaultLogger(this.getClass());
-    m_oUidConn  = new JdbcCleanConn ((DataSource)oCtx.lookup("java:JbossEsbDS"));
-    m_oDataConn = new JdbcCleanConn ((DataSource)oCtx.lookup("java:JbossEsbDS"));
-  } //__________________________________
-
-  private void releaseResources()
-  { if (null != m_oDataConn)  m_oDataConn.release();
-    if (null != m_oUidConn)   m_oUidConn.release();
-    m_oDaoBatch = null;
-    m_oDaoUid   = null;
-    m_oDaoIndex = null;
-    m_oDaoSnap  = null;
-  } //__________________________________
-
-//  Utility Methods
-
-  private DaoUidTable getDaoUid() throws Exception
-  { if (null==m_oDaoUid) 
-	  m_oDaoUid = new DaoUidTable(m_oUidConn, BobjStore.getUidTableName());
-    return m_oDaoUid;
-  } //__________________________________
-
-  private DaoBatchTable getDaoBatch(String p_sTbl) throws Exception
-  { if (null==m_oDaoBatch)
-      m_oDaoBatch = new DaoBatchTable(m_oDataConn,p_sTbl);
-    return m_oDaoBatch;
-  } //__________________________________
-
-  private DaoIndexTable getDaoIndex(String p_sTbl) throws Exception
-  { if (null==m_oDaoIndex)
-      m_oDaoIndex = new DaoIndexTable(m_oDataConn,p_sTbl);
-    return m_oDaoIndex;
-  } //__________________________________
-
-  private DaoSnapTable getDaoSnap(BobjStore p_o) throws Exception
-  { if (null==m_oDaoSnap)
-      m_oDaoSnap = new DaoSnapTable(m_oDataConn,p_o);
-    return m_oDaoSnap;
-  } //__________________________________
-
-  private void doCommitBatch(BatchProcess p_oBP) throws Exception
-  { String sPrevClass = null;
-    BobjStore oStore = null;
-
-    PreparedStatement PSbatch = getDaoBatch(BobjStore.getBatchTableName())
-        .getPS(DaoBatchTable.PS_GET_BATCH_ROWS);
-    PSbatch.setLong(1,p_oBP.getBatchNum());
-
-    long lNow = System.currentTimeMillis();
-    String sSnapDt = new SimpleDateFormat("yyyyMMdd").format(new Date(lNow));
-
-    //  Get all Batch rows
-    ResultSet RS = m_oDataConn.execQueryWait(PSbatch,10);
-    while (RS.next())
-    { String sXml = RS.getString(1+DaoBatchTable.STR_DATA);
-      BobjStdDTO oDto = BobjStdDTO.getFromXml(sXml);
-      //  Get proper Dao's for Index and Snap table
-      String sNewClass = oDto.fullClassName(); 
-      if (! sNewClass.equals(sPrevClass))
-      { oStore      = BobjStore.getStore(sNewClass);
-        sPrevClass	= sNewClass;
-        m_oDaoIndex = null;
-        m_oDaoSnap  = null;
-      }
-      // Set batch number to current batch
-      oDto.setBatch	(p_oBP.getBatchNum());
-      oDto.setStamp (lNow);
-      oDto.setSnapDate(sSnapDt);
-
-      // Insert Snap row
-      PreparedStatement PSins = getDaoSnap(oStore).getPS(DaoSnapTable.PS_INS_SNAP);
-      m_oDaoSnap.setInsValues(PSins,oDto);
-      try { m_oDataConn.execUpdWait(PSins,10); }
-      catch (Exception e) { m_oLogger.error(e.getMessage()); }
-
-      // Insert row in all index tables
-      String[][] saa = oDto.getLocators();
-      for (int i1=0; i1<saa.length; i1++)
-      {	m_oDaoIndex = getDaoIndex(oStore.getLocatorTable(i1)); 
-    	PSins = m_oDaoIndex.getPS(DaoIndexTable.PS_INS_INDEX);
-    	m_oDaoIndex.setInsValues(PSins,oDto,i1);
-    	try { m_oDataConn.execUpdWait(PSins,10); }
-    	catch (Exception e) { m_oLogger.error(e.getMessage()); }
-      }
-    }
-    PSbatch.close();
-
-    // Delete batch rows we just used
-    PreparedStatement PSdel = getDaoBatch(BobjStore.getBatchTableName())
-        .getPS(DaoBatchTable.PS_DELETE_BATCH);
-    PSdel.setLong(1,p_oBP.getBatchNum());
-    m_oDataConn.execUpdWait(PSdel,10);
-
-    p_oBP.setField	(BatchProcess.ATTRIB.commitStamp,Long.toString(lNow));
-    p_oBP.setStamp 	(lNow);
-    p_oBP.setSnapDate(sSnapDt);
-
-    oStore  = BobjStore.getStore(BatchProcess.class.getName());
-
-    // Update snap table with proper timestamp
-    m_oDaoSnap  = null;
-    PreparedStatement PSupd = getDaoSnap(oStore).getPS(DaoSnapTable.PS_UPD_SNAP);
-    getDaoSnap(oStore).setUpdValues(PSupd,p_oBP);
-    m_oDataConn.execUpdWait(PSupd,10);
-
-    // Update index table with proper timestamp
-    m_oDaoIndex = null;
-    PSupd = getDaoIndex(oStore.getLocatorTable()).getPS(DaoIndexTable.PS_UPD_INDEX);
-    getDaoIndex(oStore.getLocatorTable()).setUpdValues(PSupd,p_oBP);
-    m_oDataConn.execUpdWait(PSupd,10);
-
-  } //__________________________________
-
-//______________________________________________________________________________
-// Public local and remote interface methods
-/**
- */
-  public long newBatch() throws Exception
-  { if (m_lBatchNum > 0) throw
-        new Exception ("Must finish with previous batch before opening new");
-    m_iSeq  = 0;
-    try
-    { return m_lBatchNum = getDaoUid().getUidChunk(DaoUidTable.SEQUENCE_BATCH, 1);
-    }
-    catch (Exception e)
-    { m_oLogger.error("BatchHandlerBean.newBatch() FAILED "+ e.getMessage());
-      throw e;
-    }
-    finally   { releaseResources(); }
-  } //__________________________________
-
-/**
- * @return
- */
-  public long getBatchNum()
-  { return m_lBatchNum;
-  } //__________________________________
-
-/**
- * @param p_s
- * @return
- * @throws Exception
- */
-  public int addToBatch(String p_s) throws Exception
-  { if (null==p_s) throw
-      new Exception ("Tryng to add a null String to a batch");
-    if (m_lBatchNum < 1) throw
-        new Exception ("Must request batch number before adding objects");
-    try
-    { RowBatch oRow = new RowBatch(m_lBatchNum,++m_iSeq,0,p_s);
-      getDaoBatch(BobjStore.getBatchTableName());
-      PreparedStatement PS = m_oDaoBatch.getPS(DaoBatchTable.PS_INS_BATCHROW);
-      m_oDaoBatch.setInsValues(PS,oRow);
-      m_oDataConn.execUpdWait(PS,1);
-      m_oDataConn.commit();
-      return m_iSeq;
-    }
-    catch (Exception e)
-    { if (null != m_oDataConn) m_oDataConn.rollback();
-      m_oLogger.error("addToBatch() failed",e);
-      throw e;
-    }
-    finally { releaseResources(); }
-  } //__________________________________
-/**
- * @throws Exception
- */
-  public void finish() throws Exception
-  { if (m_lBatchNum < 1) return;
-    m_lBatchNum = -1;
-    m_iSeq  = 0;
-  } //__________________________________
-
-//______________________________________________________________________________
-// 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(); }
-//  } //__________________________________
-
-//______________________________________________________________________________
-// Public remote interface methods
-/**
- */
-  public void commitBatch(BobjStdDTO p_oDto) throws Exception
-  { 
-	  commitBatch (new BatchProcess(p_oDto).toDTO());
-  }
-
-} //____________________________________________________________________________

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/BatchHandlerBean.java)

Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java	2006-08-07 20:08:31 UTC (rev 5568)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,34 +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.beans;
-
-import java.io.Serializable;
-
-/**
- * Business interface for NotificationHandler.
- * @author kstam
- */
-public interface NotificationHandler
-{
-	public void create() throws Exception;
-    public void sendNotifications( String p_sParams, Serializable p_oMsg ) throws Exception;
-}

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandler.java)

Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java	2006-08-07 20:08:31 UTC (rev 5568)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,123 +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.beans;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.helpers.DomElement;
-import org.jboss.soa.esb.notification.NotificationList;
-import org.jboss.soa.esb.util.Util;
-
-import javax.ejb.CreateException;
-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.InitialContext;
-import java.io.Serializable;
-/**
- * @author Esteban
- */
- 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 setSessionContext(SessionContext sessionContext)
-    { m_ctxSess = sessionContext; }
-/**
- * @throws CreateException
- */
-  @Init
-  public void create() throws Exception
-  { try
-    { m_oLogger = Util.getDefaultLogger(this.getClass());
-//      Context oCtxInit   =
-    	  new InitialContext();
-
-      m_oLogger.info(this.toString()+" Created");
-    }
-    catch (Exception e)
-    { m_oLogger.error("EJB Create Failed <"+e.getMessage()+">");
-      throw new Exception(e.getMessage());
-    }
-  } //__________________________________
-
-  @Remove
-  public void ejbRemove()
-  { m_oLogger.info(this.toString()+" Removed");
-  } //__________________________________
-
-//  Utility Methods
-
-  protected void releaseResources()
-  {
-  } //__________________________________
-
-//______________________________________________________________________________
-// Public local and remote interface methods
-
-  private static final String s_sDfltList =
-      "<NotificationList  type=\"Error\" >"
-        +" <target"
-        +" class       = \"NotifyEmail\""
-        +" from        = \"JbossEsbDefault at myOrg.com\""
-        +" sendTo      = \"\""
-        +" subject     = \"Default JBoss ESB Notification\""
-        +" message     = \" Message from JBoss ESB :\""
-        +" />"
-    +" </NotificationList>"
-    ;
-  private static NotificationList s_dfltList;
-  static
-  { try
-    { s_dfltList = new NotificationList(DomElement.fromXml(s_sDfltList)); }
-    catch (Exception e) { e.printStackTrace(System.out); }
-  }
-/**
- * @param p_sParams
- * @param p_sMsg
- * @throws Exception
- */
-  public void sendNotifications(String p_sParams, Serializable p_oMsg)
-    throws Exception
-  {
-	DomElement oP = (null==p_sParams)?null:DomElement.fromXml(p_sParams);
-    NotificationList m_oL = (null==oP) ? s_dfltList : new NotificationList(oP);
-    m_oL.sendNotification(p_oMsg);
-  } //__________________________________
-
-} //____________________________________________________________________________

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/NotificationHandlerBean.java)

Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java	2006-08-07 20:08:31 UTC (rev 5568)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,43 +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.beans;
-
-import org.jboss.soa.esb.util.BobjStdDTO;
-
-/**
- * @author kstam
- */
-public interface PersistHandler
-{
-    public void create() throws Exception;
-	
-    public long getUidChunk( int p_iQ ) throws Exception;
-
-    public void rmvObject( String p_sClassName,long p_lUid ) throws Exception;
-
-    public long addDTO( BobjStdDTO p_oDto ) throws Exception;
-
-    public BobjStdDTO getDTO( String p_sClassName,long p_lUid ) throws Exception;
-
-    public void rplDTO( BobjStdDTO p_oDto ) throws Exception;
-
-}

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandler.java)

Deleted: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java	2006-08-07 20:08:31 UTC (rev 5568)
+++ labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,368 +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.beans;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
-import org.jboss.soa.esb.internal.core.objectstore.BobjStore;
-import org.jboss.soa.esb.internal.core.objectstore.DaoIndexTable;
-import org.jboss.soa.esb.internal.core.objectstore.DaoSnapTable;
-import org.jboss.soa.esb.internal.core.objectstore.DaoUidTable;
-import org.jboss.soa.esb.util.BobjStdDTO;
-import org.jboss.soa.esb.util.ObjLocator;
-import org.jboss.soa.esb.util.Util;
-
-import javax.ejb.CreateException;
-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.Context;
-import javax.naming.InitialContext;
-import javax.sql.DataSource;
-import java.io.ObjectStreamClass;
-import java.sql.Date;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.text.SimpleDateFormat;
-
-/**
- * @author Esteban
- */
- 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;
-  SessionContext        m_ctxSess;
-
-  private JdbcCleanConn m_oUidConn;
-  private JdbcCleanConn m_oDataConn;
-
-  private static final int s_iChunkSize=100;
-  private long          m_lUid;
-  private int           m_iChunkLeft=0;
-
-  private DaoUidTable   m_oDaoUid;
-  private DaoSnapTable  m_oDaoSnap;
-  private DaoIndexTable[] m_oaDaoIndex;
-
-  public void setSessionContext(SessionContext sessionContext)
-    { m_ctxSess = sessionContext; }
-/**
- * Create method. Should get called to initialize this class.
- * @throws CreateException
- */
-  @Init
-  public void create() throws Exception
-  { try
-    { m_oLogger = Util.getDefaultLogger(this.getClass());
-      Context oCtxInit   = new InitialContext();
-      String sDSjndiName = BobjStore.getDataSourceJndi();
-      DataSource oDS = (DataSource)oCtxInit.lookup(sDSjndiName);
-      m_oUidConn  = new JdbcCleanConn(oDS);
-      m_oDataConn = new JdbcCleanConn(oDS);
-
-      Class oCls = Class.forName("org.jboss.soa.esb.util.BobjStdDTO");
-      ObjectStreamClass XX = ObjectStreamClass.lookup(oCls);
-      System.out.println(XX.getSerialVersionUID());
-      System.out.println(oCls.getProtectionDomain().getCodeSource().getLocation());
-
-      m_oLogger.info(this.toString()+" Created");
-    }
-    catch (Exception e)
-    { m_oLogger.error("EJB Create Failed <"+e.getMessage()+">");
-      throw new Exception(e.getMessage());
-    }
-  } //__________________________________
-
-  @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
-  { if (null==m_oDaoUid) m_oDaoUid 
-	  = new DaoUidTable(m_oUidConn,BobjStore.getUidTableName());
-    return m_oDaoUid;
-  } //__________________________________
-
-  private DaoSnapTable getDaoSnap(BobjStore p_oSt) throws Exception
-  { if (null==m_oDaoSnap)
-      m_oDaoSnap = new DaoSnapTable(m_oDataConn,p_oSt);
-    return m_oDaoSnap;
-  } //__________________________________
-
-  private DaoIndexTable getDaoIndex(BobjStore p_oSt,int p_i) throws Exception
-  { if (null==m_oaDaoIndex)
-	  m_oaDaoIndex = new DaoIndexTable[p_oSt.allLocatorTables().length];
-	if (null==m_oaDaoIndex[p_i])
-      m_oaDaoIndex[p_i] = new DaoIndexTable(m_oDataConn,p_oSt.getLocatorTable(p_i));
-    return m_oaDaoIndex[p_i];
-  } //__________________________________
-
-  protected ObjLocator[] doAddLocators(BobjStore pStore,BobjStdDTO p_oDto) throws Exception
-  { long lUid      = p_oDto.getUid();
-    if (lUid < 1)
-    { lUid = doAssignUid();
-      p_oDto.setUid(lUid);
-      p_oDto.setSnap(lUid);
-    }
-    long lStamp		= p_oDto.getStamp();
-    if (lStamp < 1)
-      p_oDto.setStamp(lStamp = System.currentTimeMillis());
-    
-    String[][] 	saa	  = p_oDto.getLocators();
-    ObjLocator[]oaRet = new ObjLocator[saa.length];
-    int iCurr = 0;
-    for (int i1=0; i1<saa.length; i1++)
-    {	String[] saCurr = saa[i1];
-    	ObjLocator  oLoc  = new ObjLocator(lUid,saCurr);
-		oaRet[iCurr]	  = oLoc;	
-	    String      sTbl  = pStore.getLocatorTable(iCurr++);
-	    if (null == sTbl)
-	    	continue;
-	
-	    DaoIndexTable oDao = new DaoIndexTable(m_oDataConn,sTbl);
-	    PreparedStatement PS = oDao.getPS(DaoIndexTable.PS_INS_INDEX);
-	
-	    PS.setLong    (DaoIndexTable.OBJECT_UID,lUid);
-	    PS.setLong    (DaoIndexTable.TIMESTAMP,lStamp);
-	    PS.setLong    (DaoIndexTable.UID_SNAP,p_oDto.getSnap());
-	    PS.setString  (DaoIndexTable.SNAP_DATE,s_oY4md.format(new Date(lStamp)));
-	
-	    int iFld  = DaoIndexTable.FIRST_FIELD;
-	    for (int i2=0; i2<saCurr.length; i2++)
-	    { String sFldVal = saCurr[i2];
-	      PS.setString(iFld++,(null == sFldVal)?"":sFldVal);
-	    }
-	    m_oDataConn.execUpdWait(PS,1);
-    }
-
-    return oaRet;
-  } //__________________________________
-
-  private void doDelLocators (BobjStore p_oSt, long p_lUid)
-  { if (p_lUid < 1)     return;
-  	int iQlocs = p_oSt.allLocatorTables().length;
-  	for (int i1=0; i1<iQlocs; i1++)
-	  	try
-	    { PreparedStatement PS = getDaoIndex(p_oSt,i1).getPS(DaoIndexTable.PS_RMV_INDEX);
-	      PS.setLong(1,p_lUid);
-	      m_oDataConn.execQueryWait(PS,5);
-	    }
-	    catch (Exception e)
-	    { m_oLogger.warn("doDelLocator() FAILED <"+e.getMessage()+">");
-	    }
-  } //__________________________________
-
-  private void doDelOneSnap (BobjStore p_oSt,long p_lUid) throws Exception
-  { if (p_lUid < 1)     return;
-  	PreparedStatement PS = getDaoSnap(p_oSt).getPS(DaoSnapTable.PS_RMV_SNAP);
-    PS.setLong(1,p_lUid);
-    m_oDataConn.execQueryWait(PS,5);
-  } //__________________________________
-
-  private void doRmvSnapshot (BobjStore p_oSt,long p_lUid) throws Exception
-  {
-    PreparedStatement PS = getDaoSnap(p_oSt).getPS(DaoSnapTable.PS_SEL_4UPD);
-    PS.setLong(1,p_lUid);
-    ResultSet rs = m_oDataConn.execQueryWait(PS,30);
-    if (! rs.next()) throw new Exception("Non existing Snapshot");
-    long lObjUid  = rs.getLong(DaoSnapTable.OBJECT_UID);
-
-    doDelOneSnap(p_oSt,p_lUid);
-    doDelLocators(p_oSt,lObjUid);
-
-  } //__________________________________
-
-  private void doRplSnapshot(BobjStdDTO p_oDto)
-      throws Exception
-  { long lSnapUid = p_oDto.getSnap();
-    BobjStore oSt = BobjStore.getStore(p_oDto);
-    doDelOneSnap(oSt,lSnapUid);
-    doDelLocators(oSt,p_oDto.getUid());
-    doAddSnapshot(p_oDto,false);
-  } //__________________________________
-
-  private long doAddSnapshot(BobjStdDTO p_oDto)
-      throws Exception
-  { return doAddSnapshot(p_oDto,true);
-  } //__________________________________
-
-  SimpleDateFormat s_oY4md = new SimpleDateFormat("yyyyMMdd");
-  private long doAddSnapshot(BobjStdDTO p_oDto, boolean p_bNewVrs)
-      throws Exception
-  { long lObjUid  = p_oDto.getUid();
-    if (lObjUid < 1)  p_oDto.setUid(lObjUid=doAssignUid());
-    p_oDto.setSnap(lObjUid);
-
-    // Set Timestamp
-    long lNow      = System.currentTimeMillis();
-    p_oDto.setStamp(lNow);
-    p_oDto.setSnapDate(s_oY4md.format(new Date(lNow)));
-
-    BobjStore oSt = BobjStore.getStore(p_oDto);
-    PreparedStatement PS = getDaoSnap(oSt).getPS(DaoSnapTable.PS_INS_SNAP);
-    getDaoSnap(oSt).setInsValues(PS,p_oDto);
-
-    m_oDataConn.execUpdWait(PS,1);
-
-    int iQlocs = oSt.allLocatorTables().length;
-    for (int i1=0; i1<iQlocs; i1++)
-    {	DaoIndexTable oDao = getDaoIndex(oSt,i1);
-    	PS  = oDao.getPS(DaoIndexTable.PS_INS_INDEX);
-	    oDao.setInsValues(PS,p_oDto);
-	    try { m_oDataConn.execUpdWait(PS,1); }
-	    catch (Exception e)
-	    { PS  = oDao.getPS(DaoIndexTable.PS_UPD_INDEX);
-	      oDao.setUpdValues(PS,p_oDto);
-	      m_oDataConn.execUpdWait(PS,10);
-	    }
-    }
-
-    return lObjUid;
-    } //__________________________________
-
-	protected void updateLocTbl(BobjStdDTO p_oDto, int p_iNum)
-        throws Exception
-    { BobjStore oSt = BobjStore.getStore(p_oDto);
-      String sTbl = oSt.getLocatorTable(p_iNum);
-      if (null==sTbl)   return;
-      DaoIndexTable oDao = getDaoIndex(oSt,p_iNum);
-      PreparedStatement PSupd = oDao.getPS(DaoIndexTable.PS_UPD_INDEX);
-      oDao.setUpdValues(PSupd, p_oDto);
-
-      m_oDataConn.execUpdWait(PSupd,10);
-  } //__________________________________
-
-  private BobjStdDTO doGetSnapshot (BobjStore p_oSt,long p_lUid) throws Exception
-  { PreparedStatement PS = getDaoSnap(p_oSt).getPS(DaoSnapTable.PS_SEL_SNAP);
-    PS.setLong(1,p_lUid);
-    ResultSet rs = m_oDataConn.execQueryWait(PS,30);
-    if (! rs.next()) throw new Exception("Non existing Snapshot");
-    BobjStdDTO oRet = (BobjStdDTO)getDaoSnap(p_oSt).getFromRS(rs);
-    return oRet;
-  } //__________________________________
-
-  private void releaseResources()
-  { if (null!=m_oaDaoIndex)
-	  for (int i1=0; i1<m_oaDaoIndex.length; i1++)
-		  m_oaDaoIndex[i1] = null;
-  	m_oaDaoIndex = null;
-    m_oDaoSnap  = null;
-    m_oDaoUid   = null;
-    if (null != m_oDataConn)  m_oDataConn.release();
-    if (null != m_oUidConn)   m_oUidConn.release();
-  } //__________________________________
-
-  private long doAssignUid() throws Exception
-  { if (m_iChunkLeft < 1)
-    { m_lUid = getDaoUid().getUidChunk(DaoUidTable.SEQUENCE_OBJ, s_iChunkSize);
-      m_iChunkLeft  = s_iChunkSize;
-    }
-    m_iChunkLeft--;
-    return ++m_lUid;
-  } //__________________________________
-
-
-
-} //____________________________________________________________________________

Copied: labs/jbossesb/branches/refactor/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java (from rev 5568, labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/beans/PersistHandlerBean.java)

Modified: labs/jbossesb/branches/refactor/product/core/services/tests/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/product/core/services/tests/build.xml	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/tests/build.xml	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,28 +1,33 @@
 <?xml version="1.0"?>
 <project name="build.services.tests" default="org.jboss.esb.services.tests.compile" basedir=".">
 
-	<property file="../../../deployment.properties"/>
+	<property file="../../../../config/deployment.properties"/>
 		
+	<property name="org.jboss.esb.internal.dest" value="${basedir}/../../../build"/>
+		
     <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"/>
     <property name="org.jboss.esb.tests.classes.dir" value="${org.jboss.esb.internal.dest}/tests"/>
     <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.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+	<property name="org.jboss.esb.ejb3_embedded.lib.dir" value="${org.jboss.esb.root.dir}/../lib/ejb3_embedded"/>
+	<property name="org.jboss.esb.ejb3_conf.tests.src.dir" value="${org.jboss.esb.root.dir}/common/tests/resources/conf"/>
     <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
         <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
     </condition>
 
     <path id="org.jboss.esb.tests.base.classpath">
         <fileset dir="../${org.jboss.esb.ext.lib.dir}"
-                 includes="activation.jar jbossall-client.jar log4j.jar mail.jar junit.jar emma.jar emma_ant.jar"/>
-
+                 includes="activation.jar log4j.jar mail.jar junit.jar emma.jar emma_ant.jar"/>
         <pathelement location="${org.jboss.esb.module.classes.dir}"/>
         <pathelement location="${org.jboss.esb.internal.dest}/classes/common"/>
-    	
+    	<pathelement location="${org.jboss.esb.ejb3_conf.tests.src.dir}"/>
+    	<fileset dir="${org.jboss.esb.ejb3_embedded.lib.dir}" includes="*.jar"/>
     </path>
 
     <target name="org.jboss.esb.tests.init">
@@ -65,16 +70,17 @@
 		<!-- Instrument the code for code coverage - using emma... -->
     	<delete dir="${org.jboss.esb.module.tests.coverage.dir}" />
 	    <mkdir dir="${org.jboss.esb.module.tests.coverage.dir}" />
+    	<!--
 	    <emma>
 			<instr 	instrpath="${org.jboss.esb.module.classes.dir}" 
 					destdir="${org.jboss.esb.module.classes.instr.dir}" 
 					metadatafile="${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
 	    </emma>        
-
+        -->
     	<!-- Run the tests -->
         <antcall target="org.jboss.esb.services.internal.test.exec"/>        
 
-    	<!-- Generate the coverage report -->
+    	<!-- Generate the coverage report 
 	    <emma>
 			<report sourcepath="${org.jboss.esb.module.src.dir}" sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
 		        <fileset dir="${org.jboss.esb.module.tests.coverage.dir}" >
@@ -82,7 +88,7 @@
 		        </fileset>
 		        <html outfile="${org.jboss.esb.module.tests.coverage.dir}/index.html" depth="method" columns="name,line,class,method,block"/>
 			</report>
-	    </emma>
+	    </emma> -->
     </target>
 
     <!-- ====================================================================== -->
@@ -102,21 +108,21 @@
             <classpath>
         		<!-- using instrumented code for code coverage -->
                 <pathelement location="${org.jboss.esb.module.classes.instr.dir}"/>
-                <pathelement location="${org.jboss.esb.tests.classes.dir}"/>
+                <pathelement location="${org.jboss.esb.tests.classes.dir}"/> 
             	<!-- 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 -->
+			<!-- 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" />
+			<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}"/>
+        	<sysproperty key="log4j.configuration" value="log4j.xml"/>
         	
         </junit>
         <junitreport>

Deleted: 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/NotificationTest.java	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationTest.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,229 +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.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;
-
-import javax.naming.InitialContext;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Hashtable;
-
-
-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/NotificationUnitTest.java (from rev 5568, labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/NotificationUnitTest.java)

Deleted: 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/EJB/test/PersistHandlerTest.java	2006-08-07 20:19:14 UTC (rev 5569)
+++ labs/jbossesb/branches/refactor/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerTest.java	2006-08-07 20:25:56 UTC (rev 5570)
@@ -1,63 +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);
-	    	persistHandlerLocal.create();
-	    	persistHandlerLocal.addDTO(null);
-    	} 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/PersistHandlerUnitTest.java (from rev 5568, labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/EJB/test/PersistHandlerUnitTest.java)




More information about the jboss-svn-commits mailing list