Here is the rest of the code from the entity test client main.
ContentsTagListTestClient4 client = new ContentsTagListTestClient4();
try {
int tagListId = 1;
client.generateTagList(); ... etc ...
public void generateTagList()
{
if (contentsTagListRemote == null)
{
System.out.println("Error in generateTagList(): " + ERROR_NULL_REMOTE);
return ;
}
long startTime = 0;
if (logging)
{
log("Calling generateTagList()");
startTime = System.currentTimeMillis();
}
try
{
contentsTagListRemote.generateTagList(); ... etc ...
Here is the code from the TagListBean.
public void genTagList()
{
String QUERY = "SELECT tl.tagDefTypId FROM TagListSchema tl WHERE tl.masterDocId = 1 AND tl.startPos >= 143816 AND tl.endPos <= 143840";
String DRIVER = "oracle.jdbc.driver.OracleDriver";
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
String url = "jdbc
racle:thin:@10.103.0.69:1421
EVEL";
String userName = "userName";
String password = "password";
try {
Class.forName(DRIVER);
connection = DriverManager.getConnection("jdbc
racle:thin:@10.103.0.69:1421
EVEL", userName, password);
preparedStatement = connection.prepareStatement(QUERY);
preparedStatement.executeQuery();
resultSet = preparedStatement.getResultSet();
while (resultSet.next()) {
System.out.println("resultSet = " + resultSet.getString("tagDefTypId"));
}
//close statement and connection
if (preparedStatement != null) preparedStatement.close();
if (connection != null) connection.close();
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("Exception = " + ex.getMessage());
}
}