on 04-19-2010 4:35 PM
Hi all,
the runtime environment is:
1) Oracle Database 11.0.6 Enterprise Edition,
2) jBoss Version 4.0.4,
3) OCI driver 11g,
4) crjava-runtime (Java Reporting Component - JRC) Version 11.8.4.1094,
5) Crystal Reports 2008 Versione 12.0.0.63,
6) jdk1.5.0_18
The data source is using in file .rpt is jdbc(JNDI) and the file .rpt not deployed
with the application but are stored in a separate folder /rpt/Area/reportName.rpt.
Below the oracle-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/pippodatasource</jndi-name>
<connection-url>jdbc:oracle:oci:@TEST</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>user</user-name>
<password>password</password>
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
I thought that the max number of concurrent reports was the max number of concurrent connection managed by jboss (in my
case the max number of concurrent connection are 10, defined into tag <max-pool-size> of oracle-ds.xml). Monitoring connections I discovered that the connections for Crystal Reports are always two while the application is used more.
My question:
Is it possible to set the number of concurrent reports?
Thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
thanks for the reply.
I want to ask you the difference between the two following configuratios:
CONFIGURATION 1) reports made with the connection "Oracle Server", within Crystal Reports 2008
and integrated in java with the following code for the connection to db, open a report connection for each report launched by the user without limit on the number of report connection
...........
ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo iConnInfo = new ConnectionInfo();
PropertyBag propertyBag = new PropertyBag();
try {
String connectString = "jdbc:oracle:oci:@TEST";
String driverName = "oracle.jdbc.OracleDriver";
String userName = "username";
String password = "password";
String TRUSTED_CONNECTION = "false";
String SERVER_TYPE = "JDBC (JNDI)";
String USE_JDBC = "true";
String DATABASE_DLL = "crdb_jdbc.dll";
String CONNECTION_URL = connectString;
String DATABASE_CLASS_NAME = driverName;
propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
propertyBag.put("Server Type", SERVER_TYPE);
propertyBag.put("Use JDBC", USE_JDBC);
propertyBag.put("Database DLL", DATABASE_DLL);
propertyBag.put("Connection URL", CONNECTION_URL);
propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
iConnInfo.setAttributes(propertyBag);
iConnInfo.setUserName(userName);
iConnInfo.setPassword(password);
connInfos.add(iConnInfo);
switchTables(reportClientDoc.getDatabaseController(), iConnInfo);
// -
BEGIN SUBREPORT -
IStrings subreportNames = null;
subreportNames = reportClientDoc.getSubreportController().getSubreportNames();
int size = subreportNames.size();
for (int i = 0; i < size; i++) {
ISubreportClientDocument subreportClientDoc = null;
subreportClientDoc = reportClientDoc.getSubreportController()
.getSubreport(subreportNames.getString(i));
switchTables(subreportClientDoc.getDatabaseController(), iConnInfo);
}
// -
END SUBREPORT -
} catch (ReportSDKException e) {
e.printStackTrace();
}
private void switchTables(DatabaseController databaseController,
IConnectionInfo iConnInfo) throws ReportSDKException {
Tables tables = databaseController.getDatabase().getTables();
int size = tables.size();
for (int i = 0; i < size; i++) {
ITable table = tables.getTable(i);
table.setName(table.getName());
table.setAlias(table.getAlias());
table.setQualifiedName(table.getName());
table.setConnectionInfo(iConnInfo);
databaseController.setTableLocation(table, tables.getTable(i));
};
}
...........
CONFIGURATION 2) reports built with the JDBC (JNDI) specifying "java:jdbc/nsisrdatasource" (taken from the oracle-ds.xml's jndi-name tag) as "Connection name (optional)" and integrated without the previous code, has these threads limits, depending on the version of the report engine.
Why this difference?
Thanks a lot.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.