You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/06/14 23:14:49 UTC
svn commit: r190657 [19/23] - in /incubator/beehive/trunk/system-controls:
./ ant/ samples/ejb/
samples/ejb/client/org/apache/beehive/controls/system/ejb/sample/client/
samples/ejb/control/org/apache/beehive/controls/system/ejb/sample/control/
samples/ejb/ejb/META-INF/
samples/ejb/ejb/org/apache/beehive/controls/system/ejb/sample/bean/
samples/jdbc/jdbcControlSample/ samples/jdbc/jdbcControlSample/META-INF/
samples/jdbc/jdbcControlSample/WEB-INF/
samples/jdbc/jdbcControlSample/WEB-INF/src/
samples/jdbc/jdbcControlSample/WEB-INF/src/controls/
samples/jdbc/jdbcControlSample/WEB-INF/src/servlet/
samples/jdbc/jdbcControlSample/WEB-INF/src/shared/ samples/jms/
samples/jms/src/org/apache/beehive/controls/system/jms/samples/
samples/webservice/amazon/ samples/webservice/amazon/junit/
samples/webservice/amazon/schemas/ samples/webservice/common/src/test/
samples/webservice/google/ samples/webservice/google/junit/model/
samples/webservice/google/rpc_schemas/ samples/webservice/google/servlet/
samples/webservice/wsm_samples_client/
samples/webservice/wsm_samples_client/junit/
samples/webservice/wsm_samples_client/junit/org/wsm/samples/client/header/
samples/webservice/wsm_samples_client/junit/org/wsm/samples/client/webparam/
samples/webservice/xmlbeans/ samples/webservice/xmlbeans/junit/ src/ejb/
src/ejb/org/apache/beehive/controls/system/ejb/ src/ejb/schema/ src/jdbc/
src/jdbc/org/apache/beehive/controls/system/jdbc/
src/jdbc/org/apache/beehive/controls/system/jdbc/parser/ src/jms/
src/jms/org/apache/beehive/controls/system/jms/
src/jms/org/apache/beehive/controls/system/jms/impl/
src/jms/org/apache/beehive/controls/system/jndi/
src/jms/org/apache/beehive/controls/system/jndi/impl/ src/webservice/
src/webservice/org/apache/beehive/controls/system/webservice/
src/webservice/org/apache/beehive/controls/system/webservice/generator/
src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/
src/webservice/org/apache/beehive/controls/system/webservice/utils/
test/ant/ test/conf/ test/src/jdbc/controls/
test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/dbconnection/
test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/errors/
test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/
test/src/jdbc/controls/schemas/badusers/
test/src/jdbc/controls/schemas/users/ test/src/jdbc/jdbc-container/
test/src/jdbc/jdbc-container/application/
test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/
test/src/jdbc/jdbc-container/webapp/WEB-INF/
test/src/jdbc/jdbc-container/webapp/conf/Catalina/localhost/
test/src/jdbc/junitTests/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/dbconnection/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/errors/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/sqlparser/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/utils/
test/src/webservice/ test/src/webservice/jcxgen-tests/
test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/
test/src/webservice/schemas/ test/src/webservice/servers/webapp/WEB-INF/
test/src/webservice/servers/webapp/WEB-INF/src/org/apache/beehive/doclitwrap/
test/src/webservice/servers/webapp/WEB-INF/src/web/
test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/
test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx Tue Jun 14 14:14:42 2005
@@ -1,513 +1,513 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-
-package org.apache.beehive.controls.system.jdbc.test.results;
-
-import java.sql.SQLException;
-import java.sql.ResultSet;
-import java.sql.Blob;
-import java.sql.Clob;
-import java.sql.Time;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Date;
-import java.math.BigDecimal;
-
-import org.apache.beehive.controls.system.jdbc.JdbcControl;
-import org.apache.beehive.controls.system.jdbc.DefaultRowSetResultSetMapper;
-
-import javax.sql.RowSet;
-
-import test.customerDb.XStoogeRowDocument;
-
-/**
- * This control is used for unit tests for results returned from the db control.
- */
-@org.apache.beehive.controls.api.bean.ControlExtension
-@JdbcControl.ConnectionDriver(databaseDriverClass="org.apache.derby.jdbc.EmbeddedDriver", databaseURL="jdbc:derby:MyDB")
-public interface ResultsTestCtrl extends JdbcControl {
-
- public static class Customer {
- private String fname;
- public int userid;
-
- public void setFname(String fname) { this.fname = fname; }
- public String getFname() { return fname; }
- }
-
- public static class CustomerInput1 {
- private int _userid;
-
- public int getUserid() {return _userid;}
- public void setUserid(int userid) {_userid = userid;}
- }
-
- public static class CustomerInput2 {
- public int userid;
- }
-
- public static class CustomerWrapper {
- public CustomerInput2 c;
- }
-
- public static class CustomerInput3 extends CustomerInput1 {
- private int foo;
- }
-
- public static class CustomerInput4 extends CustomerInput2 {
- private int foo;
- }
-
- public static class BlobInfo {
- private Blob blb;
-
- public void setBlb(Blob blb) { this.blb = blb; }
- public Blob getBlb() { return blb; }
-
- }
-
- public static class Binary {
- private byte[] _bytes;
- private byte[] _varbytes;
- private byte[] _lvarbytes;
-
- public void setBin(byte[] bytes) { _bytes = bytes; }
- public byte[] getBin() { return _bytes; }
-
- public void setVarbin(byte[] varbytes) { _varbytes = varbytes; }
- public byte[] getVarbin() { return _varbytes; }
-
- public void setLvarbin(byte[] lvarbytes) { _lvarbytes = lvarbytes; }
- public byte[] getLvarbin() { return _lvarbytes; }
- }
-
- //
- // simple query
- //
- @SQL(statement="SELECT fname FROM USERS")
- public ResultSet getAllUsers() throws SQLException;
-
- //
- // simple query with param substitution
- //
- @SQL(statement="SELECT * FROM USERS WHERE fname={someUser}")
- public ResultSet getSomeUser(String someUser) throws SQLException;
-
- //
- // from a object getMethod
- //
- @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
- public String getSomeUser(CustomerInput1 customer) throws SQLException;
-
- //
- // from a object getField
- //
- @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
- public String getSomeUser(CustomerInput2 customer) throws SQLException;
-
- //
- // from a object getField
- //
- @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
- public String getSomeUser(CustomerInput3 customer) throws SQLException;
-
- //
- // from a object getField
- //
- @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
- public String getSomeUser(CustomerInput4 customer) throws SQLException;
-
- //
- // from a object getField
- //
- @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
- public String getSomeUser(Map customer) throws SQLException;
-
- //
- // from a object nested getField
- //
- @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.c.userid}")
- public String getSomeUser(CustomerWrapper customer) throws SQLException;
-
- //
- // simple query with param substitution
- //
- @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
- public ResultSet getSomeUser(int someUserId) throws SQLException;
-
- //
- // query with sql substitution
- //
- @SQL(statement="SELECT * FROM USERS WHERE {sql: where}")
- public ResultSet getJustOneUser(String where) throws SQLException;
-
- //
- // query returning an array of Object
- //
- @SQL(statement="SELECT * FROM USERS")
- public Customer[] getCustomerArray() throws SQLException;
-
- //
- // query returning an array of Object / array size is limited in annotation
- //
- @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2)
- public Customer[] getCustomerArrayLimitedSize() throws SQLException;
-
- //
- // query returning an array of Object / array size is limited in annotation
- //
- @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2, maxRows=1)
- public Customer[] getCustomerArrayLimitedSize2() throws SQLException;
-
- //
- // query returning an array of Object / array size is limited in annotation
- //
- @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2, maxRows=4)
- public Customer[] getCustomerArrayLimitedSize3() throws SQLException;
-
- //
- // query returning an array of Object / array size is limited in annotation by maxRows
- //
- @SQL(statement="SELECT * FROM USERS", maxRows=1)
- public Customer[] getCustomerArrayLimitedSize4() throws SQLException;
-
- //
- // query returning a HashMap
- //
- @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
- public HashMap getCustomerHashMap(int someUserId) throws SQLException;
-
- //
- // query returning an array of HashMap
- //
- @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
- public HashMap[] getCustomerHashMapArray(int someUserId) throws SQLException;
-
- //
- // query returning a Map
- //
- @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
- public Map getCustomerMap(int someUserId) throws SQLException;
-
- //
- // query returning an iterator
- //
- @SQL(statement="SELECT * FROM USERS", iteratorElementType=Customer.class)
- public Iterator getCustomerIterator() throws SQLException;
-
- //
- // query returning an empty value
- //
- @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
- public int getNoUsers(int someUserId) throws SQLException;
-
- //
- // query returning an object
- //
- @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
- public Customer getACustomer(int someUserId) throws SQLException;
-
- //
- // query returning a RowSet -- NOTE: uses default row set mapper
- //
- @SQL(statement="SELECT * FROM USERS", resultSetMapper=DefaultRowSetResultSetMapper.class)
- public RowSet getAllUsersINRS() throws SQLException;
-
- //
- // query returning an XmlObject
- //
- @SQL(statement="SELECT * FROM XBEAN_USERS WHERE stooge_name={someStooge}")
- public XStoogeRowDocument.XStoogeRow getAUserXmlBean(String someStooge) throws SQLException;
-
- //
- // query returning an array of XmlObjects
- //
- @SQL(statement="SELECT * FROM XBEAN_USERS")
- public XStoogeRowDocument.XStoogeRow[] getAllUserXmlBean() throws SQLException;
-
- //
- // set a db row with a XmlObject
- //
- @SQL(statement="insert into XBEAN_USERS VALUES ({stooge.STOOGENAME}, {stooge.STOOGEPECKINGORDER}, {stooge.STOOGEPANTSIZE})")
- public void insertAXmlBean(XStoogeRowDocument.XStoogeRow stooge) throws SQLException;
-
- //
- // query which invokes a stored procedure
- //
- @SQL(statement="{call getExpensiveProductSP(?)}")
- public void getExpensiveProduct(SQLParameter[] results) throws SQLException;
-
- //
- // query which invokes a stored procedure
- //
- @SQL(statement="{call getExpensiveProductsSP(?)}")
- public void getExpensiveProducts(SQLParameter[] results) throws SQLException;
-
- //
- // query which invokes a stored procedure
- //
- @SQL(statement="{call getProductsByColorSP(?,?)}")
- public void getProductsByColor(SQLParameter[] results) throws SQLException;
-
- //
- // creates a stored procedure
- //
- @SQL(statement="CREATE PROCEDURE getProductSP(IN color VARCHAR(64), IN sku INT) " +
- "PARAMETER STYLE JAVA " +
- "READS SQL DATA " +
- "LANGUAGE JAVA " +
- "EXTERNAL NAME 'org.apache.beehive.controls.system.jdbc.units.utils.StoredProcedures.getProductSP'")
- public void createStoredProc() throws SQLException;
-
- //
- // invokes the stored proc -- with 2 IN params
- //
- @SQL(statement="{call getProductSP({inColor},{inSKU})}")
- public void getProduct(String inColor, int inSKU) throws SQLException;
-
- //
- // batch updates
- //
- @SQL(statement="INSERT INTO users VALUES ({fname}, {userid})", batchUpdate=true)
- public int[] doABatchUpdate(String[] fname, int[] userid);
-
- //
- // a basic usage of the getGeneratedKeys annotation member
- //
- @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
- public ResultSet getGenKeys(String aValue);
-
- //
- // a basic usage of the getGeneratedKeys and generatedKeyColumnNames members
- //
- @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true, generatedKeyColumnNames = {"user_id"})
- public ResultSet getGenKeys2(String aValue);
-
- //
- // a basic usage of the getGeneratedKeys annotation member with return type mapping
- //
- @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
- public int getGenKeys3(String aValue);
-
- //
- // a basic usage of the getGeneratedKeys annotation member with return type mapping
- //
- @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
- public String getGenKeys4(String aValue);
-
- //
- // a basic usage of the getGeneratedKeys annotation member with return type mapping
- //
- @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
- public int[] getGenKeys5(String aValue);
-
- //
- // a basic usage of the getGeneratedKeys and generatedKeyColumnIndexes annotation members
- //
- @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true, generatedKeyColumnIndexes = {1})
- public ResultSet getGenKeys6(String aValue);
-
- //
- // a basic usage of the scrollableResultSet element
- //
- @SQL(statement="SELECT * FROM USERS", scrollableResultSet=ScrollType.SCROLL_INSENSITIVE_UPDATABLE)
- public ResultSet getScrollableResultSet_IU();
-
- //
- // a basic usage of the scrollableResultSet element
- //
- @SQL(statement="SELECT * FROM USERS", scrollableResultSet=ScrollType.SCROLL_SENSITIVE)
- public ResultSet getScrollableResultSet_SR();
-
- //
- // a basic usage of the fetchSize/fetchDirection elements
- //
- @SQL(statement="SELECT * FROM USERS", fetchDirection=FetchDirection.REVERSE, fetchSize=10)
- public ResultSet getFetchOptmizedResultSet();
-
- //
- // query with non-default holdability specified
- //
- @SQL(statement="SELECT * FROM USERS", resultSetHoldabilityOverride=HoldabilityType.HOLD_CURSORS)
- public ResultSet getResultSetHoldablity();
-
- //
- // select a single column of values from the users table,
- // specifically tests mapping single column result set values to return type
- //
- @SQL(statement="SELECT fname FROM users")
- public String[] getFnameColumn();
-
- //
- // /////////////////////////////// methods for JDBC types tests ////////////////////////////////////////
- //
-
- //
- // insert a blob
- //
- @SQL(statement="INSERT INTO blob_table VALUES ({id}, {blob})")
- public int insertABlob(int id, Blob blob);
-
- //
- // select a blob
- //
- @SQL(statement="SELECT blb FROM blob_table WHERE id={id}")
- public BlobInfo getABlob(int id);
-
- //
- // select a clob
- //
- @SQL(statement="SELECT clb FROM clob_table WHERE id={id}")
- public Clob getAClob(int id);
-
- //
- // get a char
- //
- @SQL(statement="SELECT c FROM basic_types")
- public String getChar();
-
- //
- // get a char string
- //
- @SQL(statement="SELECT ca FROM basic_types")
- public String getChar2();
-
- //
- // varchar test
- //
- @SQL(statement="SELECT vc FROM basic_types")
- public String getVarchar();
-
- //
- // long varchar test
- //
- @SQL(statement="SELECT lvc FROM basic_types")
- public String getLongvarchar();
-
- //
- // fixed length binary
- //
- @SQL(statement="SELECT bin FROM basic_types")
- public Binary getFixedLengthBinary();
-
- //
- // var length binary
- //
- @SQL(statement="SELECT varbin FROM basic_types")
- public Binary getVarLengthBinary();
-
- //
- // long binary
- //
- @SQL(statement="SELECT lvarbin FROM basic_types")
- public Binary getLongVarLengthBinary();
-
- //
- // small int
- //
- @SQL(statement="SELECT sint FROM basic_types")
- public short getSmallIntValue();
-
- //
- // small int
- //
- @SQL(statement="SELECT sint FROM basic_types")
- public Short getSmallIntValue2();
-
- //
- // int
- //
- @SQL(statement="SELECT i FROM basic_types")
- public Integer getIntValue2();
-
- //
- // int
- //
- @SQL(statement="SELECT i FROM basic_types")
- public int getIntValue();
-
- //
- // bigint
- //
- @SQL(statement="SELECT bint FROM basic_types")
- public long getBigIntValue();
-
- //
- // bigint
- //
- @SQL(statement="SELECT bint FROM basic_types")
- public Long getBigIntValue2();
-
- //
- // real
- //
- @SQL(statement="SELECT r FROM basic_types")
- public float getRealValue();
-
- //
- // real
- //
- @SQL(statement="SELECT r FROM basic_types")
- public Float getRealValue2();
-
- //
- // double precision
- //
- @SQL(statement="SELECT dp FROM basic_types")
- public double getDoubleValue();
-
- //
- // double precision
- //
- @SQL(statement="SELECT dp FROM basic_types")
- public Double getDoubleValue2();
-
- //
- // decimal
- //
- @SQL(statement="SELECT d FROM basic_types")
- public BigDecimal getDecimalValue();
-
- //
- // numeric
- //
- @SQL(statement="SELECT nu FROM basic_types")
- public BigDecimal getNumericValue();
-
- //
- // date
- //
- @SQL(statement="SELECT dt FROM basic_types")
- public Date getDateValue();
-
- //
- // time
- //
- @SQL(statement="SELECT t FROM basic_types")
- public Time getTimeValue();
-
- //
- // timestamp
- //
- @SQL(statement="SELECT ts FROM basic_types")
- public Date getTimestampValue();
-
-
-}
-
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.system.jdbc.test.results;
+
+import java.sql.SQLException;
+import java.sql.ResultSet;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Time;
+import java.util.Iterator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Date;
+import java.math.BigDecimal;
+
+import org.apache.beehive.controls.system.jdbc.JdbcControl;
+import org.apache.beehive.controls.system.jdbc.DefaultRowSetResultSetMapper;
+
+import javax.sql.RowSet;
+
+import test.customerDb.XStoogeRowDocument;
+
+/**
+ * This control is used for unit tests for results returned from the db control.
+ */
+@org.apache.beehive.controls.api.bean.ControlExtension
+@JdbcControl.ConnectionDriver(databaseDriverClass="org.apache.derby.jdbc.EmbeddedDriver", databaseURL="jdbc:derby:MyDB")
+public interface ResultsTestCtrl extends JdbcControl {
+
+ public static class Customer {
+ private String fname;
+ public int userid;
+
+ public void setFname(String fname) { this.fname = fname; }
+ public String getFname() { return fname; }
+ }
+
+ public static class CustomerInput1 {
+ private int _userid;
+
+ public int getUserid() {return _userid;}
+ public void setUserid(int userid) {_userid = userid;}
+ }
+
+ public static class CustomerInput2 {
+ public int userid;
+ }
+
+ public static class CustomerWrapper {
+ public CustomerInput2 c;
+ }
+
+ public static class CustomerInput3 extends CustomerInput1 {
+ private int foo;
+ }
+
+ public static class CustomerInput4 extends CustomerInput2 {
+ private int foo;
+ }
+
+ public static class BlobInfo {
+ private Blob blb;
+
+ public void setBlb(Blob blb) { this.blb = blb; }
+ public Blob getBlb() { return blb; }
+
+ }
+
+ public static class Binary {
+ private byte[] _bytes;
+ private byte[] _varbytes;
+ private byte[] _lvarbytes;
+
+ public void setBin(byte[] bytes) { _bytes = bytes; }
+ public byte[] getBin() { return _bytes; }
+
+ public void setVarbin(byte[] varbytes) { _varbytes = varbytes; }
+ public byte[] getVarbin() { return _varbytes; }
+
+ public void setLvarbin(byte[] lvarbytes) { _lvarbytes = lvarbytes; }
+ public byte[] getLvarbin() { return _lvarbytes; }
+ }
+
+ //
+ // simple query
+ //
+ @SQL(statement="SELECT fname FROM USERS")
+ public ResultSet getAllUsers() throws SQLException;
+
+ //
+ // simple query with param substitution
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE fname={someUser}")
+ public ResultSet getSomeUser(String someUser) throws SQLException;
+
+ //
+ // from a object getMethod
+ //
+ @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
+ public String getSomeUser(CustomerInput1 customer) throws SQLException;
+
+ //
+ // from a object getField
+ //
+ @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
+ public String getSomeUser(CustomerInput2 customer) throws SQLException;
+
+ //
+ // from a object getField
+ //
+ @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
+ public String getSomeUser(CustomerInput3 customer) throws SQLException;
+
+ //
+ // from a object getField
+ //
+ @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
+ public String getSomeUser(CustomerInput4 customer) throws SQLException;
+
+ //
+ // from a object getField
+ //
+ @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.userid}")
+ public String getSomeUser(Map customer) throws SQLException;
+
+ //
+ // from a object nested getField
+ //
+ @SQL(statement="SELECT fname FROM USERS WHERE userid={customer.c.userid}")
+ public String getSomeUser(CustomerWrapper customer) throws SQLException;
+
+ //
+ // simple query with param substitution
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
+ public ResultSet getSomeUser(int someUserId) throws SQLException;
+
+ //
+ // query with sql substitution
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE {sql: where}")
+ public ResultSet getJustOneUser(String where) throws SQLException;
+
+ //
+ // query returning an array of Object
+ //
+ @SQL(statement="SELECT * FROM USERS")
+ public Customer[] getCustomerArray() throws SQLException;
+
+ //
+ // query returning an array of Object / array size is limited in annotation
+ //
+ @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2)
+ public Customer[] getCustomerArrayLimitedSize() throws SQLException;
+
+ //
+ // query returning an array of Object / array size is limited in annotation
+ //
+ @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2, maxRows=1)
+ public Customer[] getCustomerArrayLimitedSize2() throws SQLException;
+
+ //
+ // query returning an array of Object / array size is limited in annotation
+ //
+ @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2, maxRows=4)
+ public Customer[] getCustomerArrayLimitedSize3() throws SQLException;
+
+ //
+ // query returning an array of Object / array size is limited in annotation by maxRows
+ //
+ @SQL(statement="SELECT * FROM USERS", maxRows=1)
+ public Customer[] getCustomerArrayLimitedSize4() throws SQLException;
+
+ //
+ // query returning a HashMap
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
+ public HashMap getCustomerHashMap(int someUserId) throws SQLException;
+
+ //
+ // query returning an array of HashMap
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
+ public HashMap[] getCustomerHashMapArray(int someUserId) throws SQLException;
+
+ //
+ // query returning a Map
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
+ public Map getCustomerMap(int someUserId) throws SQLException;
+
+ //
+ // query returning an iterator
+ //
+ @SQL(statement="SELECT * FROM USERS", iteratorElementType=Customer.class)
+ public Iterator getCustomerIterator() throws SQLException;
+
+ //
+ // query returning an empty value
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
+ public int getNoUsers(int someUserId) throws SQLException;
+
+ //
+ // query returning an object
+ //
+ @SQL(statement="SELECT * FROM USERS WHERE userid={someUserId}")
+ public Customer getACustomer(int someUserId) throws SQLException;
+
+ //
+ // query returning a RowSet -- NOTE: uses default row set mapper
+ //
+ @SQL(statement="SELECT * FROM USERS", resultSetMapper=DefaultRowSetResultSetMapper.class)
+ public RowSet getAllUsersINRS() throws SQLException;
+
+ //
+ // query returning an XmlObject
+ //
+ @SQL(statement="SELECT * FROM XBEAN_USERS WHERE stooge_name={someStooge}")
+ public XStoogeRowDocument.XStoogeRow getAUserXmlBean(String someStooge) throws SQLException;
+
+ //
+ // query returning an array of XmlObjects
+ //
+ @SQL(statement="SELECT * FROM XBEAN_USERS")
+ public XStoogeRowDocument.XStoogeRow[] getAllUserXmlBean() throws SQLException;
+
+ //
+ // set a db row with a XmlObject
+ //
+ @SQL(statement="insert into XBEAN_USERS VALUES ({stooge.STOOGENAME}, {stooge.STOOGEPECKINGORDER}, {stooge.STOOGEPANTSIZE})")
+ public void insertAXmlBean(XStoogeRowDocument.XStoogeRow stooge) throws SQLException;
+
+ //
+ // query which invokes a stored procedure
+ //
+ @SQL(statement="{call getExpensiveProductSP(?)}")
+ public void getExpensiveProduct(SQLParameter[] results) throws SQLException;
+
+ //
+ // query which invokes a stored procedure
+ //
+ @SQL(statement="{call getExpensiveProductsSP(?)}")
+ public void getExpensiveProducts(SQLParameter[] results) throws SQLException;
+
+ //
+ // query which invokes a stored procedure
+ //
+ @SQL(statement="{call getProductsByColorSP(?,?)}")
+ public void getProductsByColor(SQLParameter[] results) throws SQLException;
+
+ //
+ // creates a stored procedure
+ //
+ @SQL(statement="CREATE PROCEDURE getProductSP(IN color VARCHAR(64), IN sku INT) " +
+ "PARAMETER STYLE JAVA " +
+ "READS SQL DATA " +
+ "LANGUAGE JAVA " +
+ "EXTERNAL NAME 'org.apache.beehive.controls.system.jdbc.units.utils.StoredProcedures.getProductSP'")
+ public void createStoredProc() throws SQLException;
+
+ //
+ // invokes the stored proc -- with 2 IN params
+ //
+ @SQL(statement="{call getProductSP({inColor},{inSKU})}")
+ public void getProduct(String inColor, int inSKU) throws SQLException;
+
+ //
+ // batch updates
+ //
+ @SQL(statement="INSERT INTO users VALUES ({fname}, {userid})", batchUpdate=true)
+ public int[] doABatchUpdate(String[] fname, int[] userid);
+
+ //
+ // a basic usage of the getGeneratedKeys annotation member
+ //
+ @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
+ public ResultSet getGenKeys(String aValue);
+
+ //
+ // a basic usage of the getGeneratedKeys and generatedKeyColumnNames members
+ //
+ @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true, generatedKeyColumnNames = {"user_id"})
+ public ResultSet getGenKeys2(String aValue);
+
+ //
+ // a basic usage of the getGeneratedKeys annotation member with return type mapping
+ //
+ @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
+ public int getGenKeys3(String aValue);
+
+ //
+ // a basic usage of the getGeneratedKeys annotation member with return type mapping
+ //
+ @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
+ public String getGenKeys4(String aValue);
+
+ //
+ // a basic usage of the getGeneratedKeys annotation member with return type mapping
+ //
+ @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true)
+ public int[] getGenKeys5(String aValue);
+
+ //
+ // a basic usage of the getGeneratedKeys and generatedKeyColumnIndexes annotation members
+ //
+ @SQL(statement="INSERT INTO usergen (person) VALUES ({aValue})", getGeneratedKeys=true, generatedKeyColumnIndexes = {1})
+ public ResultSet getGenKeys6(String aValue);
+
+ //
+ // a basic usage of the scrollableResultSet element
+ //
+ @SQL(statement="SELECT * FROM USERS", scrollableResultSet=ScrollType.SCROLL_INSENSITIVE_UPDATABLE)
+ public ResultSet getScrollableResultSet_IU();
+
+ //
+ // a basic usage of the scrollableResultSet element
+ //
+ @SQL(statement="SELECT * FROM USERS", scrollableResultSet=ScrollType.SCROLL_SENSITIVE)
+ public ResultSet getScrollableResultSet_SR();
+
+ //
+ // a basic usage of the fetchSize/fetchDirection elements
+ //
+ @SQL(statement="SELECT * FROM USERS", fetchDirection=FetchDirection.REVERSE, fetchSize=10)
+ public ResultSet getFetchOptmizedResultSet();
+
+ //
+ // query with non-default holdability specified
+ //
+ @SQL(statement="SELECT * FROM USERS", resultSetHoldabilityOverride=HoldabilityType.HOLD_CURSORS)
+ public ResultSet getResultSetHoldablity();
+
+ //
+ // select a single column of values from the users table,
+ // specifically tests mapping single column result set values to return type
+ //
+ @SQL(statement="SELECT fname FROM users")
+ public String[] getFnameColumn();
+
+ //
+ // /////////////////////////////// methods for JDBC types tests ////////////////////////////////////////
+ //
+
+ //
+ // insert a blob
+ //
+ @SQL(statement="INSERT INTO blob_table VALUES ({id}, {blob})")
+ public int insertABlob(int id, Blob blob);
+
+ //
+ // select a blob
+ //
+ @SQL(statement="SELECT blb FROM blob_table WHERE id={id}")
+ public BlobInfo getABlob(int id);
+
+ //
+ // select a clob
+ //
+ @SQL(statement="SELECT clb FROM clob_table WHERE id={id}")
+ public Clob getAClob(int id);
+
+ //
+ // get a char
+ //
+ @SQL(statement="SELECT c FROM basic_types")
+ public String getChar();
+
+ //
+ // get a char string
+ //
+ @SQL(statement="SELECT ca FROM basic_types")
+ public String getChar2();
+
+ //
+ // varchar test
+ //
+ @SQL(statement="SELECT vc FROM basic_types")
+ public String getVarchar();
+
+ //
+ // long varchar test
+ //
+ @SQL(statement="SELECT lvc FROM basic_types")
+ public String getLongvarchar();
+
+ //
+ // fixed length binary
+ //
+ @SQL(statement="SELECT bin FROM basic_types")
+ public Binary getFixedLengthBinary();
+
+ //
+ // var length binary
+ //
+ @SQL(statement="SELECT varbin FROM basic_types")
+ public Binary getVarLengthBinary();
+
+ //
+ // long binary
+ //
+ @SQL(statement="SELECT lvarbin FROM basic_types")
+ public Binary getLongVarLengthBinary();
+
+ //
+ // small int
+ //
+ @SQL(statement="SELECT sint FROM basic_types")
+ public short getSmallIntValue();
+
+ //
+ // small int
+ //
+ @SQL(statement="SELECT sint FROM basic_types")
+ public Short getSmallIntValue2();
+
+ //
+ // int
+ //
+ @SQL(statement="SELECT i FROM basic_types")
+ public Integer getIntValue2();
+
+ //
+ // int
+ //
+ @SQL(statement="SELECT i FROM basic_types")
+ public int getIntValue();
+
+ //
+ // bigint
+ //
+ @SQL(statement="SELECT bint FROM basic_types")
+ public long getBigIntValue();
+
+ //
+ // bigint
+ //
+ @SQL(statement="SELECT bint FROM basic_types")
+ public Long getBigIntValue2();
+
+ //
+ // real
+ //
+ @SQL(statement="SELECT r FROM basic_types")
+ public float getRealValue();
+
+ //
+ // real
+ //
+ @SQL(statement="SELECT r FROM basic_types")
+ public Float getRealValue2();
+
+ //
+ // double precision
+ //
+ @SQL(statement="SELECT dp FROM basic_types")
+ public double getDoubleValue();
+
+ //
+ // double precision
+ //
+ @SQL(statement="SELECT dp FROM basic_types")
+ public Double getDoubleValue2();
+
+ //
+ // decimal
+ //
+ @SQL(statement="SELECT d FROM basic_types")
+ public BigDecimal getDecimalValue();
+
+ //
+ // numeric
+ //
+ @SQL(statement="SELECT nu FROM basic_types")
+ public BigDecimal getNumericValue();
+
+ //
+ // date
+ //
+ @SQL(statement="SELECT dt FROM basic_types")
+ public Date getDateValue();
+
+ //
+ // time
+ //
+ @SQL(statement="SELECT t FROM basic_types")
+ public Time getTimeValue();
+
+ //
+ // timestamp
+ //
+ @SQL(statement="SELECT ts FROM basic_types")
+ public Date getTimestampValue();
+
+
+}
+
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/TxTestCtrl.jcx
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/TxTestCtrl.jcx?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/TxTestCtrl.jcx (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/TxTestCtrl.jcx Tue Jun 14 14:14:42 2005
@@ -1,38 +1,38 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-
-package org.apache.beehive.controls.system.jdbc.test.results;
-
-import java.sql.SQLException;
-
-import org.apache.beehive.controls.system.jdbc.JdbcControl;
-
-/**
- * This control is used for unit tests for transactional support for the jdbc control.
- */
-@org.apache.beehive.controls.api.bean.ControlExtension
-@JdbcControl.ConnectionDriver(databaseDriverClass="org.apache.derby.jdbc.EmbeddedDriver", databaseURL="jdbc:derby:MyDB")
-public interface TxTestCtrl extends JdbcControl {
-
- @SQL(statement="SELECT stooge_name FROM tx_users WHERE stooge_name={stooge}")
- public String getAUser(String stooge) throws SQLException;
-
- @SQL(statement="INSERT INTO tx_users VALUES ({name}, {order}, {size})")
- public void insertUserRow(String name, int order, String size) throws SQLException;
-}
-
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.system.jdbc.test.results;
+
+import java.sql.SQLException;
+
+import org.apache.beehive.controls.system.jdbc.JdbcControl;
+
+/**
+ * This control is used for unit tests for transactional support for the jdbc control.
+ */
+@org.apache.beehive.controls.api.bean.ControlExtension
+@JdbcControl.ConnectionDriver(databaseDriverClass="org.apache.derby.jdbc.EmbeddedDriver", databaseURL="jdbc:derby:MyDB")
+public interface TxTestCtrl extends JdbcControl {
+
+ @SQL(statement="SELECT stooge_name FROM tx_users WHERE stooge_name={stooge}")
+ public String getAUser(String stooge) throws SQLException;
+
+ @SQL(statement="INSERT INTO tx_users VALUES ({name}, {order}, {size})")
+ public void insertUserRow(String name, int order, String size) throws SQLException;
+}
+
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/TxTestCtrl.jcx
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/badusers/badusers.xsd
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/badusers/badusers.xsd?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/badusers/badusers.xsd (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/badusers/badusers.xsd Tue Jun 14 14:14:42 2005
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns="http://test_bad/customer_db"
- targetNamespace="http://test_bad/customer_db"
- elementFormDefault="qualified">
-
- <xs:element name="XCustomerRowBad">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="FANME" type="xs:string" minOccurs="1" nillable="true"/>
- <xs:element name="USERID" type="xs:int" minOccurs="1" nillable="true"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://test_bad/customer_db"
+ targetNamespace="http://test_bad/customer_db"
+ elementFormDefault="qualified">
+
+ <xs:element name="XCustomerRowBad">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="FANME" type="xs:string" minOccurs="1" nillable="true"/>
+ <xs:element name="USERID" type="xs:int" minOccurs="1" nillable="true"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/badusers/badusers.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/users/users.xsd
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/users/users.xsd?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/users/users.xsd (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/users/users.xsd Tue Jun 14 14:14:42 2005
@@ -1 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://test/customer_db"
targetNamespace="http://test/customer_db"
elementFormDefault="qualified">
<xs:simpleType name="SMLXSizeType">
<xs:restriction base="xs:token">
<xs:enumeration value="small"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="large"/>
<xs:enumeration value="xlarge"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="XStoogeRow">
<xs:complexType>
<xs:sequence>
<xs:element name="STOOGE_NAME" type="xs:string" minOccurs="1" nillable="true"/>
<xs:element name="STOOGE_PECKINGORDER" type="xs:int" minOccurs="1" nillable="true"/>
<xs:element name="STOOGE_PANTSIZE" type="SMLXSizeType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://test/customer_db"
+ targetNamespace="http://test/customer_db"
+ elementFormDefault="qualified">
+
+ <xs:simpleType name="SMLXSizeType">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="small"/>
+ <xs:enumeration value="medium"/>
+ <xs:enumeration value="large"/>
+ <xs:enumeration value="xlarge"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="XStoogeRow">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="STOOGE_NAME" type="xs:string" minOccurs="1" nillable="true"/>
+ <xs:element name="STOOGE_PECKINGORDER" type="xs:int" minOccurs="1" nillable="true"/>
+ <xs:element name="STOOGE_PANTSIZE" type="SMLXSizeType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/controls/schemas/users/users.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/README.txt
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/README.txt?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/README.txt (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/README.txt Tue Jun 14 14:14:42 2005
@@ -1,14 +1,14 @@
-
-
-GENERAL
--------------------------------------------------------------------------------
-
-All container tests require that Apache Cactus be installed on your system and
-that the CACTUS_HOME environment variable be set to the Cactus installation
-directory.
-
-
-TOMCAT5x
--------------------------------------------------------------------------------
-Requires that Jakarta Tomcat be installed on your system and the CATALINA_HOME
-environment variable be set.
+
+
+GENERAL
+-------------------------------------------------------------------------------
+
+All container tests require that Apache Cactus be installed on your system and
+that the CACTUS_HOME environment variable be set to the Cactus installation
+directory.
+
+
+TOMCAT5x
+-------------------------------------------------------------------------------
+Requires that Jakarta Tomcat be installed on your system and the CATALINA_HOME
+environment variable be set.
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/application/application.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/application/application.xml?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/application/application.xml (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/application/application.xml Tue Jun 14 14:14:42 2005
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-
-<!DOCTYPE application
- PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
- 'http://java.sun.com/j2ee/dtds/application_1_3.dtd'>
-
-<!-- TODO: In the future you won't have to create a specific
- application.xml in which you have to declare a Cactus test
- war if you don't have a war in your EAR -->
-
-<application>
- <display-name>jdbcontrol-tests</display-name>
- <description>Cactus Unit Tests for JdbcControl</description>
- <module>
- <web>
- <web-uri>jdbccontrol-cactified.war</web-uri>
- <context-root>/jdbccontrol-cactified</context-root>
- </web>
- </module>
-</application>
+<?xml version="1.0" encoding="UTF-8"?>
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+<!DOCTYPE application
+ PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
+ 'http://java.sun.com/j2ee/dtds/application_1_3.dtd'>
+
+<!-- TODO: In the future you won't have to create a specific
+ application.xml in which you have to declare a Cactus test
+ war if you don't have a war in your EAR -->
+
+<application>
+ <display-name>jdbcontrol-tests</display-name>
+ <description>Cactus Unit Tests for JdbcControl</description>
+ <module>
+ <web>
+ <web-uri>jdbccontrol-cactified.war</web-uri>
+ <context-root>/jdbccontrol-cactified</context-root>
+ </web>
+ </module>
+</application>
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/application/application.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.properties?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.properties (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.properties Tue Jun 14 14:14:42 2005
@@ -1,15 +1,15 @@
-
-# properties file for build.xml
-
-##############################################################################
-# Tomcat 5x server properties
-##############################################################################
-tomcat5x.port=8080
-
-###############################################################################
-# WEBLOGIC 9x server properties
-###############################################################################
-weblogic9x.port=7001
-weblogic9x.username=weblogic
-weblogic9x.password=weblogic
-weblogic9x.domain.dir=D:/src_15002javac/bea/user_projects/domains/cs_domain
+
+# properties file for build.xml
+
+##############################################################################
+# Tomcat 5x server properties
+##############################################################################
+tomcat5x.port=8080
+
+###############################################################################
+# WEBLOGIC 9x server properties
+###############################################################################
+weblogic9x.port=7001
+weblogic9x.username=weblogic
+weblogic9x.password=weblogic
+weblogic9x.domain.dir=D:/src_15002javac/bea/user_projects/domains/cs_domain
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.xml?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.xml (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.xml Tue Jun 14 14:14:42 2005
@@ -1,237 +1,237 @@
-<?xml version="1.0"?>
-<!--
-Copyright 2005 The Apache Software Foundation.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<project name="JdbcControl Container Cactus Unit Tests" basedir=".">
-
- <dirname property="my.home" file="${ant.file}"/>
- <!--
- <property name="jdbcc.home" location="${my.home}/../.."/>
- <import file="${jdbcc.home}/jdbccontrol-imports.xml"/>
- -->
- <import file="../../../ant/test-imports.xml"/>
-
- <property environment="os"/>
- <property name="cactus.home" location="${os.CACTUS_HOME}"/>
- <property name="catalina.home" location="${os.CATALINA_HOME}"/>
-
- <!-- Generic properties -->
- <property name="debug" value="on"/>
- <property name="optimize" value="off"/>
- <property name="deprecation" value="off"/>
-
- <property name="src.cactus.dir" location="${my.home}/src"/>
- <property name="src.webapp.dir" location="${my.home}/webapp"/>
-
- <!-- Global project properties -->
- <property name="project.name.text" value="JdbcControl Container Test"/>
- <property name="project.name.file" value="jdbccontrol"/>
- <property name="project.version" value="1.7"/>
-
- <!-- Libraries required for the Cactus tests -->
- <property name="aspectjrt.jar"
- location="${cactus.home}/lib/aspectjrt-1.2.1.jar"/>
- <property name="cactus.jar"
- location="${cactus.home}/lib/cactus-1.7.jar"/>
- <property name="cactus.ant.jar"
- location="${cactus.home}/lib/cactus-ant-1.7.jar"/>
- <property name="commons.httpclient.jar"
- location="${cactus.home}/lib/commons-httpclient-2.0.2.jar"/>
- <property name="commons.logging.jar"
- location="${cactus.home}/lib/commons-logging-1.0.4.jar"/>
- <property name="junit.jar"
- location="${cactus.home}/lib/junit-3.8.1.jar"/>
- <path id="cactus.classpath">
- <pathelement location="${aspectjrt.jar}"/>
- <pathelement location="${cactus.jar}"/>
- <pathelement location="${cactus.ant.jar}"/>
- <pathelement location="${commons.httpclient.jar}"/>
- <pathelement location="${commons.logging.jar}"/>
- <pathelement location="${junit.jar}"/>
- </path>
-
- <!-- load the ant cactus tasks -->
- <taskdef resource="cactus.tasks" classpathref="cactus.classpath"/>
- <taskdef name="apt" classname="org.apache.beehive.controls.runtime.generator.AptTask"
- classpathref="controls.dependency.path" onerror="report"/>
-
- <!-- Destination locations for the build -->
- <property name="module.name" value="jdbc-container"/>
- <property name="module.dir" location="${test.src.dir}/jdbc/${module.name}"/>
- <property name="module.classes.dir" location="${test.classes.dir}/${module.name}"/>
- <property name="module.gensrc.dir" location="${test.classes.dir}/${module.name}-generated-src"/>
- <property name="module.classes.cactus.dir" location="${module.classes.dir}/cactus"/>
-
- <!--
- <property name="target.dir" location="${jdbcc.home}/build/container"/>
- <property name="target.gensrc.dir" location="${jdbcc.home}/build/container/gensrc"/>
- <property name="target.classes.dir" location="${target.dir}/classes"/>
- <property name="target.classes.cactus.dir" location="${target.classes.dir}/cactus"/>
- -->
-
- <!-- class path for running these tests -->
- <path id="test.classpath">
- <!--<pathelement location="${testcontrols.jar}"/>-->
- <path refid="test-controls.dependency.path"/>
- <pathelement location="${module.classes.cactus.dir}"/>
- <!--<pathelement location="${target.classes.cactus.dir}"/>-->
- <pathelement location="${test.classes.dir}/junitTests"/>
- <!-- <pathelement location="${jdbcc.build.dir}/test/classes/units"/> -->
- <!--<pathelement location="${jdbcc.jar}"/>-->
- <path refid="jdbc-control.dependency.path"/>
- <path refid="controls.dependency.path"/>
- <path refid="xbean.dependency.path"/>
- <path refid="log4j.dependency.path"/>
- <path refid="velocity.dependency.path"/>
- <path refid="tools.dependency.path"/>
- <path refid="derby.dependency.path"/>
- <path refid="junit.dependency.path"/>
- <path refid="commons-discovery.dependency.path"/>
- <path refid="commons-codec.dependency.path"/>
- </path>
-
-
- <!--
- ========================================================================
- Clean generated files (including distributables)
- ========================================================================
- -->
- <target name="clean" description="Clean all generated files">
- <delete dir="${module.classes.dir}"/>
- <delete dir="${module.gensrc.dir}"/>
- <delete dir="${module.classes.cactus.dir}"/>
- </target>
-
-
- <!--
- ========================================================================
- Build the catus test file.
- ========================================================================
- -->
- <target name="compile.cactus">
-
- <mkdir dir="${module.classes.cactus.dir}"/>
- <apt srcdir="${src.cactus.dir}"
- gendir="${module.gensrc.dir}"
- destdir="${module.classes.cactus.dir}"
- compileByExtension="true"
- debug="${compiler.debug}"
- srcExtensions="*.jcx,*.jcs,*.java">
- <classpath>
- <path refid="cactus.classpath"/>
- <path refid="test.classpath"/>
- </classpath>
- </apt>
- </target>
-
- <!--
- ========================================================================
- Run the tests on the containers for which the Ant property
- "cactus.home.[container name]" has been defined.
- ========================================================================
- -->
- <target name="test.prepare" depends="test.war">
- <!-- Prepare the directories for the JUnit reports -->
- </target>
-
-
- <!--
- ========================================================================
- Create the war file that will hold the Cactus tests. At this point in
- time, as there isn't a <cactifyear> Ant task, we need to create
- manually a war file even if our application doesn't need one.
- ========================================================================
- -->
- <target name="test.war" depends="compile.cactus">
-
- <war warfile="${test.lib.dir}/${project.name.file}.war"
- webxml="${src.webapp.dir}/WEB-INF/web.xml">
- </war>
-
- <!-- Cactify the web-app archive -->
- <cactifywar srcfile="${test.lib.dir}/${project.name.file}.war"
- destfile="${test.lib.dir}/${project.name.file}-cactified.war"
- mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml">
-
- <classes dir="${module.classes.cactus.dir}"/>
- <classes dir="${test.classes.dir}/junitTests"/>
- <classes dir="${test.classes.dir}/controls"/>
-
- <!-- Needed for Clover coverage reports -->
- <lib file="${clover.jar}"/>
-
- <lib file="${build.lib.dir}/${jdbccontrol.jar.name}"/>
- <lib file="${beehive.home}/controls/build/jars/controls.jar"/>
- <lib file="${beehive.home}/external/xmlbeans/apache-xbean.jar"/>
- <lib file="${beehive.home}/external/commons/commons-codec-1.3.jar"/>
- <lib file="${beehive.home}/external/commons/commons-discovery-0.2.jar"/>
- <lib file="${beehive.home}/external/log4j/log4j-1.2.8.jar"/>
- <lib file="${beehive.home}/installed/jsr173/jsr173_1.0_api.jar"/>
- <lib file="${beehive.home}/external/derby/derby_46005.jar"/>
- </cactifywar>
- </target>
-
- <!--
- ========================================================================
- Run the cactus tests.
- ========================================================================
- -->
- <target name="test" depends="clean, test.prepare"
- description="Run the tests on the defined containers">
-
- <!-- NOTE: Temporary location for now -->
- <property name="cactus.testlog.dir" location="${test.lib.dir}/jdbc-container-logs"/>
- <property name="test.derby.dir" location="${test.lib.dir}/derby"/>
- <mkdir dir="${cactus.testlog.dir}"/>
- <mkdir dir="${test.derby.dir}"/>
-
- <!-- Run the tests -->
- <cactus warfile="${test.lib.dir}/${project.name.file}-cactified.war"
- fork="yes" failureproperty="tests.failed">
- <sysproperty key="derby.system.home" value="${test.derby.dir}"/>
- <classpath>
- <path refid="cactus.classpath"/>
- <path refid="test.classpath"/>
- </classpath>
- <containerset>
-
- <!-- tomcat5x -->
- <!-- <tomcat5x dir="${catalina.home}" port="8080" if="tomcat5x"> -->
- <tomcat5x dir="${catalina.home}">
- <conf dir="${my.home}/webapp/conf"/>
- </tomcat5x>
-
- </containerset>
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <batchtest todir="${cactus.testlog.dir}">
- <fileset dir="${src.cactus.dir}">
- <include name="**/Test*.java"/>
- <exclude name="**/Test*All.java"/>
- <exclude name="**/Test*ClientInitializer.java"/>
- </fileset>
- </batchtest>
- </cactus>
-
- <!-- Generate the JUnit reports -->
- <junitreport todir="${cactus.testlog.dir}">
- <fileset dir="${cactus.testlog.dir}" includes="TEST-*.xml"/>
- <report todir="${cactus.testlog.dir}" format="frames"/>
- </junitreport>
-
- <fail if="tests.failed">At least one test failed!</fail>
- </target>
-
-</project>
+<?xml version="1.0"?>
+<!--
+Copyright 2005 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<project name="JdbcControl Container Cactus Unit Tests" basedir=".">
+
+ <dirname property="my.home" file="${ant.file}"/>
+ <!--
+ <property name="jdbcc.home" location="${my.home}/../.."/>
+ <import file="${jdbcc.home}/jdbccontrol-imports.xml"/>
+ -->
+ <import file="../../../ant/test-imports.xml"/>
+
+ <property environment="os"/>
+ <property name="cactus.home" location="${os.CACTUS_HOME}"/>
+ <property name="catalina.home" location="${os.CATALINA_HOME}"/>
+
+ <!-- Generic properties -->
+ <property name="debug" value="on"/>
+ <property name="optimize" value="off"/>
+ <property name="deprecation" value="off"/>
+
+ <property name="src.cactus.dir" location="${my.home}/src"/>
+ <property name="src.webapp.dir" location="${my.home}/webapp"/>
+
+ <!-- Global project properties -->
+ <property name="project.name.text" value="JdbcControl Container Test"/>
+ <property name="project.name.file" value="jdbccontrol"/>
+ <property name="project.version" value="1.7"/>
+
+ <!-- Libraries required for the Cactus tests -->
+ <property name="aspectjrt.jar"
+ location="${cactus.home}/lib/aspectjrt-1.2.1.jar"/>
+ <property name="cactus.jar"
+ location="${cactus.home}/lib/cactus-1.7.jar"/>
+ <property name="cactus.ant.jar"
+ location="${cactus.home}/lib/cactus-ant-1.7.jar"/>
+ <property name="commons.httpclient.jar"
+ location="${cactus.home}/lib/commons-httpclient-2.0.2.jar"/>
+ <property name="commons.logging.jar"
+ location="${cactus.home}/lib/commons-logging-1.0.4.jar"/>
+ <property name="junit.jar"
+ location="${cactus.home}/lib/junit-3.8.1.jar"/>
+ <path id="cactus.classpath">
+ <pathelement location="${aspectjrt.jar}"/>
+ <pathelement location="${cactus.jar}"/>
+ <pathelement location="${cactus.ant.jar}"/>
+ <pathelement location="${commons.httpclient.jar}"/>
+ <pathelement location="${commons.logging.jar}"/>
+ <pathelement location="${junit.jar}"/>
+ </path>
+
+ <!-- load the ant cactus tasks -->
+ <taskdef resource="cactus.tasks" classpathref="cactus.classpath"/>
+ <taskdef name="apt" classname="org.apache.beehive.controls.runtime.generator.AptTask"
+ classpathref="controls.dependency.path" onerror="report"/>
+
+ <!-- Destination locations for the build -->
+ <property name="module.name" value="jdbc-container"/>
+ <property name="module.dir" location="${test.src.dir}/jdbc/${module.name}"/>
+ <property name="module.classes.dir" location="${test.classes.dir}/${module.name}"/>
+ <property name="module.gensrc.dir" location="${test.classes.dir}/${module.name}-generated-src"/>
+ <property name="module.classes.cactus.dir" location="${module.classes.dir}/cactus"/>
+
+ <!--
+ <property name="target.dir" location="${jdbcc.home}/build/container"/>
+ <property name="target.gensrc.dir" location="${jdbcc.home}/build/container/gensrc"/>
+ <property name="target.classes.dir" location="${target.dir}/classes"/>
+ <property name="target.classes.cactus.dir" location="${target.classes.dir}/cactus"/>
+ -->
+
+ <!-- class path for running these tests -->
+ <path id="test.classpath">
+ <!--<pathelement location="${testcontrols.jar}"/>-->
+ <path refid="test-controls.dependency.path"/>
+ <pathelement location="${module.classes.cactus.dir}"/>
+ <!--<pathelement location="${target.classes.cactus.dir}"/>-->
+ <pathelement location="${test.classes.dir}/junitTests"/>
+ <!-- <pathelement location="${jdbcc.build.dir}/test/classes/units"/> -->
+ <!--<pathelement location="${jdbcc.jar}"/>-->
+ <path refid="jdbc-control.dependency.path"/>
+ <path refid="controls.dependency.path"/>
+ <path refid="xbean.dependency.path"/>
+ <path refid="log4j.dependency.path"/>
+ <path refid="velocity.dependency.path"/>
+ <path refid="tools.dependency.path"/>
+ <path refid="derby.dependency.path"/>
+ <path refid="junit.dependency.path"/>
+ <path refid="commons-discovery.dependency.path"/>
+ <path refid="commons-codec.dependency.path"/>
+ </path>
+
+
+ <!--
+ ========================================================================
+ Clean generated files (including distributables)
+ ========================================================================
+ -->
+ <target name="clean" description="Clean all generated files">
+ <delete dir="${module.classes.dir}"/>
+ <delete dir="${module.gensrc.dir}"/>
+ <delete dir="${module.classes.cactus.dir}"/>
+ </target>
+
+
+ <!--
+ ========================================================================
+ Build the catus test file.
+ ========================================================================
+ -->
+ <target name="compile.cactus">
+
+ <mkdir dir="${module.classes.cactus.dir}"/>
+ <apt srcdir="${src.cactus.dir}"
+ gendir="${module.gensrc.dir}"
+ destdir="${module.classes.cactus.dir}"
+ compileByExtension="true"
+ debug="${compiler.debug}"
+ srcExtensions="*.jcx,*.jcs,*.java">
+ <classpath>
+ <path refid="cactus.classpath"/>
+ <path refid="test.classpath"/>
+ </classpath>
+ </apt>
+ </target>
+
+ <!--
+ ========================================================================
+ Run the tests on the containers for which the Ant property
+ "cactus.home.[container name]" has been defined.
+ ========================================================================
+ -->
+ <target name="test.prepare" depends="test.war">
+ <!-- Prepare the directories for the JUnit reports -->
+ </target>
+
+
+ <!--
+ ========================================================================
+ Create the war file that will hold the Cactus tests. At this point in
+ time, as there isn't a <cactifyear> Ant task, we need to create
+ manually a war file even if our application doesn't need one.
+ ========================================================================
+ -->
+ <target name="test.war" depends="compile.cactus">
+
+ <war warfile="${test.lib.dir}/${project.name.file}.war"
+ webxml="${src.webapp.dir}/WEB-INF/web.xml">
+ </war>
+
+ <!-- Cactify the web-app archive -->
+ <cactifywar srcfile="${test.lib.dir}/${project.name.file}.war"
+ destfile="${test.lib.dir}/${project.name.file}-cactified.war"
+ mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml">
+
+ <classes dir="${module.classes.cactus.dir}"/>
+ <classes dir="${test.classes.dir}/junitTests"/>
+ <classes dir="${test.classes.dir}/controls"/>
+
+ <!-- Needed for Clover coverage reports -->
+ <lib file="${clover.jar}"/>
+
+ <lib file="${build.lib.dir}/${jdbccontrol.jar.name}"/>
+ <lib file="${beehive.home}/controls/build/jars/controls.jar"/>
+ <lib file="${beehive.home}/external/xmlbeans/apache-xbean.jar"/>
+ <lib file="${beehive.home}/external/commons/commons-codec-1.3.jar"/>
+ <lib file="${beehive.home}/external/commons/commons-discovery-0.2.jar"/>
+ <lib file="${beehive.home}/external/log4j/log4j-1.2.8.jar"/>
+ <lib file="${beehive.home}/installed/jsr173/jsr173_1.0_api.jar"/>
+ <lib file="${beehive.home}/external/derby/derby_46005.jar"/>
+ </cactifywar>
+ </target>
+
+ <!--
+ ========================================================================
+ Run the cactus tests.
+ ========================================================================
+ -->
+ <target name="test" depends="clean, test.prepare"
+ description="Run the tests on the defined containers">
+
+ <!-- NOTE: Temporary location for now -->
+ <property name="cactus.testlog.dir" location="${test.lib.dir}/jdbc-container-logs"/>
+ <property name="test.derby.dir" location="${test.lib.dir}/derby"/>
+ <mkdir dir="${cactus.testlog.dir}"/>
+ <mkdir dir="${test.derby.dir}"/>
+
+ <!-- Run the tests -->
+ <cactus warfile="${test.lib.dir}/${project.name.file}-cactified.war"
+ fork="yes" failureproperty="tests.failed">
+ <sysproperty key="derby.system.home" value="${test.derby.dir}"/>
+ <classpath>
+ <path refid="cactus.classpath"/>
+ <path refid="test.classpath"/>
+ </classpath>
+ <containerset>
+
+ <!-- tomcat5x -->
+ <!-- <tomcat5x dir="${catalina.home}" port="8080" if="tomcat5x"> -->
+ <tomcat5x dir="${catalina.home}">
+ <conf dir="${my.home}/webapp/conf"/>
+ </tomcat5x>
+
+ </containerset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <batchtest todir="${cactus.testlog.dir}">
+ <fileset dir="${src.cactus.dir}">
+ <include name="**/Test*.java"/>
+ <exclude name="**/Test*All.java"/>
+ <exclude name="**/Test*ClientInitializer.java"/>
+ </fileset>
+ </batchtest>
+ </cactus>
+
+ <!-- Generate the JUnit reports -->
+ <junitreport todir="${cactus.testlog.dir}">
+ <fileset dir="${cactus.testlog.dir}" includes="TEST-*.xml"/>
+ <report todir="${cactus.testlog.dir}" format="frames"/>
+ </junitreport>
+
+ <fail if="tests.failed">At least one test failed!</fail>
+ </target>
+
+</project>
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/TestJdbcControlContainer.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/TestJdbcControlContainer.java?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/TestJdbcControlContainer.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/TestJdbcControlContainer.java Tue Jun 14 14:14:42 2005
@@ -1,74 +1,74 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-
-package org.apache.beehive.controls.system.jdbc.containertest;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.context.ControlThreadContext;
-import org.apache.beehive.controls.api.context.ControlContainerContext;
-import org.apache.cactus.ServletTestSuite;
-import org.apache.beehive.controls.system.jdbc.test.dbconnection.DataSourceConnectionCtrl;
-import org.apache.beehive.controls.system.jdbc.units.errors.ErrorPathsTest;
-import org.apache.beehive.controls.system.jdbc.units.results.DBMultiRowResultsTest;
-import org.apache.beehive.controls.system.jdbc.units.results.DBSingleRowResultsTest;
-import org.apache.beehive.controls.system.jdbc.units.results.JdbcTypesTest;
-import org.apache.beehive.controls.system.jdbc.units.results.XmlBeanResultsTest;
-import org.apache.beehive.controls.system.jdbc.units.sqlparser.SqlParserTest;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-/**
- */
-public class TestJdbcControlContainer extends TestCase {
-
- private ControlContainerContext _controlContext = null;
-
- @Control
- private DataSourceConnectionCtrl ctrl;
-
- /**
- * Wrap the standalone Junit tests in Cactus.
- *
- * @return
- */
- public static Test suite() {
- ServletTestSuite suite = new ServletTestSuite();
- suite.addTestSuite(TestJdbcControlContainer.class);
- suite.addTestSuite(DBSingleRowResultsTest.class);
- suite.addTestSuite(DBMultiRowResultsTest.class);
- suite.addTestSuite(XmlBeanResultsTest.class);
- suite.addTestSuite(JdbcTypesTest.class);
- suite.addTestSuite(SqlParserTest.class);
- suite.addTestSuite(ErrorPathsTest.class);
- return suite;
- }
-
- public void setUp() throws Exception {
- super.setUp();
- _controlContext = ControlThreadContext.getContext();
- TestJdbcControlContainerClientInitializer.initialize(_controlContext, this);
- }
-
- public void testDataSourceConnection() throws SQLException {
- Connection conn = ctrl.getConnection();
- assertNotNull(conn);
- }
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.system.jdbc.containertest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.context.ControlThreadContext;
+import org.apache.beehive.controls.api.context.ControlContainerContext;
+import org.apache.cactus.ServletTestSuite;
+import org.apache.beehive.controls.system.jdbc.test.dbconnection.DataSourceConnectionCtrl;
+import org.apache.beehive.controls.system.jdbc.units.errors.ErrorPathsTest;
+import org.apache.beehive.controls.system.jdbc.units.results.DBMultiRowResultsTest;
+import org.apache.beehive.controls.system.jdbc.units.results.DBSingleRowResultsTest;
+import org.apache.beehive.controls.system.jdbc.units.results.JdbcTypesTest;
+import org.apache.beehive.controls.system.jdbc.units.results.XmlBeanResultsTest;
+import org.apache.beehive.controls.system.jdbc.units.sqlparser.SqlParserTest;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+/**
+ */
+public class TestJdbcControlContainer extends TestCase {
+
+ private ControlContainerContext _controlContext = null;
+
+ @Control
+ private DataSourceConnectionCtrl ctrl;
+
+ /**
+ * Wrap the standalone Junit tests in Cactus.
+ *
+ * @return
+ */
+ public static Test suite() {
+ ServletTestSuite suite = new ServletTestSuite();
+ suite.addTestSuite(TestJdbcControlContainer.class);
+ suite.addTestSuite(DBSingleRowResultsTest.class);
+ suite.addTestSuite(DBMultiRowResultsTest.class);
+ suite.addTestSuite(XmlBeanResultsTest.class);
+ suite.addTestSuite(JdbcTypesTest.class);
+ suite.addTestSuite(SqlParserTest.class);
+ suite.addTestSuite(ErrorPathsTest.class);
+ return suite;
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ _controlContext = ControlThreadContext.getContext();
+ TestJdbcControlContainerClientInitializer.initialize(_controlContext, this);
+ }
+
+ public void testDataSourceConnection() throws SQLException {
+ Connection conn = ctrl.getConnection();
+ assertNotNull(conn);
+ }
+}
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/TestJdbcControlContainer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/cactus-web.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/cactus-web.xml?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/cactus-web.xml (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/cactus-web.xml Tue Jun 14 14:14:42 2005
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
- <!-- Put Cactus specific definitions here. Note that by default
- the <cactifywar> Ant task automatically adds Servlet, Filter
- and JSP redirector definitions and mappings. You only need
- to edit this file if you want to change these defaults or
- add other definitions required for Cactus testing. -->
-
-</web-app>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+ <!-- Put Cactus specific definitions here. Note that by default
+ the <cactifywar> Ant task automatically adds Servlet, Filter
+ and JSP redirector definitions and mappings. You only need
+ to edit this file if you want to change these defaults or
+ add other definitions required for Cactus testing. -->
+
+</web-app>
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/cactus-web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/web.xml?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/web.xml (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/web.xml Tue Jun 14 14:14:42 2005
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
- <filter>
- <filter-name>ControlFilter</filter-name>
- <filter-class>org.apache.beehive.controls.runtime.servlet.ControlFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>ControlFilter</filter-name>
- <url-pattern>*.jws</url-pattern>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <resource-ref>
- <description>DB Connection</description>
- <res-ref-name>jdbc/TestDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
-
-</web-app>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+ <filter>
+ <filter-name>ControlFilter</filter-name>
+ <filter-class>org.apache.beehive.controls.runtime.servlet.ControlFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ControlFilter</filter-name>
+ <url-pattern>*.jws</url-pattern>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <resource-ref>
+ <description>DB Connection</description>
+ <res-ref-name>jdbc/TestDB</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
+</web-app>
Propchange: incubator/beehive/trunk/system-controls/test/src/jdbc/jdbc-container/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native