This content has been marked as final. Show 11 replies
Hi,1 person found this helpful
When Oracle(String jdbcUrl, String username, String password) constructor is used, a brand new connection is created. It is considered heavy duty. That is why a different constructor that accepts OracleConnection is provided.
In an application server environment, you may want to create a pool of Oracle objects and reuse them to serve requests.
If you are using your JEE container to manage connection pools, then the interface that takes
oracle.jdbc.OracleConnection is still not sufficient. Container pooling mechanisms don't return the
physical connection when a connection is obtained from the pool. What you get is a container
specific connection wrapper, that implements the java.sql.Connection interface.
Clearly, the adaptor requires the Oracle semantic extensions, but is there any reason why it can't
use the standard JDBC connection interface? This would facilitate things like use of container-managed
connection pools as well as other types of JDBC wrappers. I've developed a wrapper that allows me
to use OLS security with pooled connections, but I don't give the application direct access to the
It's not clear from the Javadocs if the oracle.jdbc.OracleConnection passed to the Oracle constructor
can be reused at some point.
If the adaptor isn't making explict calls to the OracleConnection API is cleaning up the connection state
at the end, then it should probably be changed to accept a standard JDBC connection object.
The new constructor of Oracle class now takes Connection object as input. You can get it when next version is released.
That's great. Do you have a timeframe for the next version?
Let's take this offline. Please send an email to alan dot wu at oracle dot com.
I am having the exact same issue. I want to run Jena from glassfish, and set up my connection pool from the container.
What is the timeframe for the release of the patched code ?
Support for connection pooling has been added in the Jena Adapter for Oracle 11 g Release 2. See this for more details:
Note that OC4J and WebLogic server are supported as web servers/application containers for this Jena Adapter release. If you encounter any problems with deploying Jena Adapter/Joseki in GlassFish, you might want to try OC4J or WebLogic Server.
Which Oracle datasource class should I use when trying to configure the pool in my container ?
And can you point me to the javadoc for OraclePool ?
Edited by: user2570981 on 12-Mar-2010 10:17
Please check Section 7.2.1 Creating the Required Data Source Using WebLogic Server of the following document.
The data source we use is "oracle.jdbc.pool.OracleDataSource"
To find the Javadoc, go to http://www.oracle.com/technology/software/tech/semantic_technologies/index.html
click on "Download the Jena Adaptor for Oracle Database 11g Release 2" link. The javadoc is in the release zip package.
Is it possible to get the oracle jena adapter working in something other than weblogic ? I can use either glassfish or tomcat.
I have tried to configure the OracleSemDS data source in both, but I am not sure how the Oracle java code does the look up. I am not sure of the context...
The datasource never gets found in tomcat, and in glassfish it gets found, but the connection is wrapper and not of type OracleConnection.
Any suggestions ?
I was also wondering whether I could have one joseki deployment and several oracle triple stores referenced by it if there is only one JNDI ?
Is there are more recent spatial release that is available that addresses some of these issues ?
Let me suggest using OC4J as an application/web server for Joseki. It's part of the Oracle database installation and we have verified that Jena Adapter/Joseki can be setup deployed using it.
If you want to pursue the OC4J route, please contact me at vladimir dot kolovski at oracle dot com and I'll help you set it up.
As for your other question - with one Joseki deployment you could refer to multiple semantic models within one Oracle database. You can create a separate SPARQL endpoint for each model if you want. You need to modify the Joseki configuration file for this. Please see section 7.2.2. of the Semantic Technologies user guide for more details.
The next patch release of Jena Adapter will have Tomcat support; although I did notice someone in the forum already using Tomcat with Jena Adapter:
When i run load test on oracle RDF i get the following modelname_RI busy