Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How bundle database drivers and expose a connection pool?
How bundle database drivers and expose a connection pool? [message #721226] Thu, 01 September 2011 08:23 Go to next message
Paul Ramsden is currently offline Paul RamsdenFriend
Messages: 84
Registered: February 2011
Location: BW, Germany
Member
I guess is really more of an OSGi question, but as I'm working on a RAP project I'll ask it here first.

I want to connect to DB2 and MS-SQL databases from my application and connection pooling should also be enabled. Also, I want to be able to configure the connections depending on the current environment - Test, Staging, Production.

I assume the way to do this is to define a separate plugin for each database which contains either the necessary jars or a link to the jars location. This plugin will export the API package. A further plugin imports the API packages and create the connection pools and handle connection requests from application plugins.

Is this a good approach? Are there any working examples out there as, so far, I have not been able to get it to work? (the problem seems to be with the export of the JDBC package)

Thanks
Paul

[Updated on: Mon, 05 September 2011 06:57]

Report message to a moderator

(no subject) [message #724503 is a reply to message #721226] Mon, 12 September 2011 13:30 Go to previous message
Eclipse UserFriend
Originally posted by:

Paul,

as you said, this question is better homed in an OSGi forum. But I think
you are on the right track.
First you will have to 'bundelize' the database driver. Next is to
configure the pool. I would opt for a pooling library that allows you to
provide your own code to actually create the connection or at least
specify the driver as a class (as opposed to a string). This will save
you from the usual class loading trouble.

HTH
Rüdiger

On 01.09.2011 10:23, Paul Ramsden wrote:
> I guess is really more of an OSGi question, but as I'm working on a RAP
> project I'll ask it here first.
>
> I want to connect to DB2 and MS-SQL databases from my application and
> connection pooling should also be enabled. Also, I want to be able to
> configure the connections depending on the current environment - Test,
> Staging, Production.
>
> I assume the way to do this is to define a separate plugin for each
> database which contains either the necessary jars or a link to the jars
> location. The plugin will create the connection pool and handle
> connection requests from other plugins.
>
> Is this a good approach? Are there any working examples out there as, so
> far, I have not been able to get it to work? (the problem seems to be
> with the export of the JDBC package)
>
> Thanks
> Paul

--
Rüdiger Herrmann

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Getting started with Rap/Spring/Tomcat
Next Topic:NullPointerException in SessionSingletonBase.getInstanceLock()
Goto Forum:
  


Current Time: Thu Apr 25 21:09:43 GMT 2024

Powered by FUDForum. Page generated in 0.02791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top