[jboss-svn-commits] JBL Code SVN: r7660 - in labs/jbossesb/trunk/product/samples/trailblazer2: . esb/src/org/jboss/soa/esb/samples/trailblazer/util
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Nov 16 15:23:26 EST 2006
Author: kurt.stam at jboss.com
Date: 2006-11-16 15:23:25 -0500 (Thu, 16 Nov 2006)
New Revision: 7660
Added:
labs/jbossesb/trunk/product/samples/trailblazer2/loanbroker-properties.xml
Removed:
labs/jbossesb/trunk/product/samples/trailblazer2/jbossesb-properties.xml
Modified:
labs/jbossesb/trunk/product/samples/trailblazer2/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java
Log:
Adding code to the launcher so it can run from eclipse (debugger)
Modified: labs/jbossesb/trunk/product/samples/trailblazer2/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer2/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java 2006-11-16 19:50:52 UTC (rev 7659)
+++ labs/jbossesb/trunk/product/samples/trailblazer2/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java 2006-11-16 20:23:25 UTC (rev 7660)
@@ -22,18 +22,37 @@
private Logger _logger = Logger.getLogger(Launcher.class);
- public static void main (String args[]) throws Exception {
+ public static void main (String args[]) throws Exception
+ {
+ System.setProperty("org.jboss.soa.esb.propertyFile", "loanbroker-properties.xml");
+ System.out.println("args passed into Launcher: " + args.length);
+ String arg0=null, arg1=null;
+ //Adding the to make it easy to run in eclipse
+ String baseDir="";
+ if (args.length==0) {
+ arg0 = "60";
+ if (TestEnvironmentUtil.getUserDir("trailblazer2").equals("trailblazer2/")) {
+ baseDir = "product/samples/trailblazer2/";
+ System.setProperty("org.jboss.soa.esb.propertyFile", baseDir + "loanbroker-properties.xml");
+ }
+ arg1 = baseDir + "esb/conf/loanbroker-esb.xml";
+ System.out.println("Setting default arguments:" + arg0 + " " + arg1);
+ }
+ //eclipse peace out
+ if (args.length > 1) {
+ arg0 = args[0];
+ arg1 = args[1];
+ }
- System.out.println("args passed into Launcher: " + args.length);
for (int x=0; x<args.length; x++)
System.out.println("arg[" + x + "]=" + args[x]);
Launcher launcher = new Launcher();
if(args.length > 2)
- launcher.triggerListener(Long.valueOf(args[0]).longValue(), args[1], args[2]);
+ launcher.triggerListener(Long.valueOf(arg0).longValue(), arg1, args[2]);
else
- launcher.triggerListener(Long.valueOf(args[0]).longValue(), args[1], null);
+ launcher.triggerListener(Long.valueOf(arg0).longValue(), arg1, null);
}
@@ -85,19 +104,22 @@
protected static void runBeforeAllTests() throws Exception{
//System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "on");
- DOMConfigurator.configure("log4j.xml");
-// TestEnvironmentUtil.setESBPropertiesFileToUse();
+ String baseDir="";
+ String productDir = "../../";
+ if (TestEnvironmentUtil.getUserDir("trailblazer2").equals("trailblazer2/")) {
+ baseDir = "product/samples/trailblazer2/";
+ productDir = "product/";
+ }
+ DOMConfigurator.configure(baseDir + "log4j.xml");
+ TestEnvironmentUtil.setESBPropertiesFileToUse();
if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
//start hsqldb
- HsqldbUtil.startHsqldb("../../build/hsqldb", "jbossesb");
-// HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir() + "build/hsqltestdb", "jbossesb");
+ HsqldbUtil.startHsqldb(productDir + "build/hsqldb", "jbossesb");
String database = "hsqldb";
-
//message store db
- String sqlDir = "../../install/message-store/sql/" + database + "/";
-// String sqlDir = TestEnvironmentUtil.getUserDir() + "install/message-store/sql/" + database + "/";
+ String sqlDir = productDir + "install/message-store/sql/" + database + "/";
String sqlCreateCmd = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
String sqlDropCmd = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
@@ -111,8 +133,7 @@
stmnt.execute(sqlCreateCmd);
//registry DB
- sqlDir = "../../install/jUDDI-registry/sql/" + database + "/";
-// sqlDir = TestEnvironmentUtil.getUserDir() + "install/jUDDI-registry/sql/" + database + "/";
+ sqlDir = productDir + "install/jUDDI-registry/sql/" + database + "/";
System.out.println("Dropping the registry schema if exists...");
sqlDropCmd = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
stmnt.execute(sqlDropCmd);
Deleted: labs/jbossesb/trunk/product/samples/trailblazer2/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer2/jbossesb-properties.xml 2006-11-16 19:50:52 UTC (rev 7659)
+++ labs/jbossesb/trunk/product/samples/trailblazer2/jbossesb-properties.xml 2006-11-16 20:23:25 UTC (rev 7660)
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- JBoss, Home of Professional Open Source
- Copyright 2006, JBoss Inc., and others contributors as indicated
- by the @authors tag. All rights reserved.
- See the copyright.txt in the distribution for a
- full listing of individual contributors.
- This copyrighted material is made available to anyone wishing to use,
- modify, copy, or redistribute it subject to the terms and conditions
- of the GNU Lesser General Public License, v. 2.1.
- This program is distributed in the hope that it will be useful, but WITHOUT A
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License,
- v.2.1 along with this distribution; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- MA 02110-1301, USA.
-
- (C) 2005-2006,
- @author JBoss Inc.
--->
-<!-- $Id: default-jbossesb-properties.xml $ -->
-<!--
- These options are described in the JBossESB manual.
- Defaults are provided here for convenience only.
-
- Please read through this file prior to using the system, and consider
- updating the specified entries.
--->
-<esb
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
- <properties name="core">
- <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
- <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
- <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
- </properties>
- <properties name="registry">
- <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
- <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
- <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
- <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
- <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
- <property name="org.jboss.soa.esb.registry.password" value="password"/>
- <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
- <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
- </properties>
- <properties name="transports" depends="core">
- <property name="org.jboss.soa.esb.mail.smtp.host" value="@org.jboss.soa.esb.mail.smtp.host@"/>
- <property name="org.jboss.soa.esb.mail.smtp.user" value="@org.jboss.soa.esb.mail.smtp.user@"/>
- <property name="org.jboss.soa.esb.mail.smtp.password" value="@org.jboss.soa.esb.mail.smtp.password@"/>
- <property name="org.jboss.soa.esb.mail.smtp.port" value="@org.jboss.soa.esb.mail.smtp.port@"/>
- </properties>
- <properties name="connection">
- <property name="min-pool-size" value="5"/>
- <property name="max-pool=size" value="10"/>
- <property name="blocking-timeout-millis" value="5000"/>
- <property name="abandoned-connection-timeout" value="10000"/>
- <property name="abandoned-connection-time-interval" value="30000"/>
- </properties>
- <properties name="dbstore">
- <property name="org.jboss.soa.esb.persistence.messagestore.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
- <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/jbossesb"/>
- <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
- <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
- <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
- <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
- <!--table managed by pool to test for valid connections - created by pool automatically -->
- <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
- <!-- # of milliseconds to timeout waiting for a connection from pool -->
- <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
- </properties>
- <properties name="messagerouting">
- <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
- </properties>
-</esb>
Copied: labs/jbossesb/trunk/product/samples/trailblazer2/loanbroker-properties.xml (from rev 7658, labs/jbossesb/trunk/product/samples/trailblazer2/jbossesb-properties.xml)
More information about the jboss-svn-commits
mailing list