Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo and JNDI Data Sources
Virgo and JNDI Data Sources [message #549020] Fri, 23 July 2010 17:19 Go to next message
Dustin McIlvain is currently offline Dustin McIlvainFriend
Messages: 2
Registered: July 2010
Junior Member
I am working on migrating from Tomcat 5.5 to Virgo and I am having problems getting JNDI Data Sources to work. The documentation seems to imply that JNDI should work but as of yet I have been unsuccessful. I have added the necessary configuration to the tomcat-server.xml and added a context.xml to the configuration directory but I continue to get the "Name jdbc not bound in this context" exception.

I have added the following to the tomcat-server.xml and context.xml files.

server.xml
    <GlobalNamingResources>
        <Resource auth="Container" driverClassName="..." scope="Shareable"  ...   />
        <ResourceLink global="..." name="..." type="javax.sql.datasource" />
    </GlobalNamingResources>

context.xml
    <ResourceLink global="..." name="..." type="javax.sql.datasource" />


I guess the main question here is does Virgo even support this or do I need to roll my own way to access a set of global connection pools?
Re: Virgo and JNDI Data Sources [message #550798 is a reply to message #549020] Wed, 04 August 2010 11:48 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
It is not clear to me that the necessary JNDI support from Tomcat is available in Virgo and I am not aware of any specific claims of JNDI support in the documentation.

In general, I would advise you to use the OSGi service registry instead of JNDI as this is much more flexible and has really good support in Virgo.

Essentially you need to publish the necessary datasource to the service registry and then the other parts of your application that need the datasource can obtain it from the service registry. You can use the Spring DM support in Virgo to simplify publishing and looking up in the service registry.

The general approach is covered in the programmer guide and an example is given of how to access services from a WAR.
Re: Virgo and JNDI Data Sources [message #595992 is a reply to message #549020] Wed, 04 August 2010 11:48 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
It is not clear to me that the necessary JNDI support from Tomcat is available in Virgo and I am not aware of any specific claims of JNDI support in the documentation.

In general, I would advise you to use the OSGi service registry instead of JNDI as this is much more flexible and has really good support in Virgo.

Essentially you need to publish the necessary datasource to the service registry and then the other parts of your application that need the datasource can obtain it from the service registry. You can use the Spring DM support in Virgo to simplify publishing and looking up in the service registry.

The general approach is covered in the programmer guide and an http://www.eclipse.org/virgo/documentation/virgo-documentati on-2.1.0.M02-incubation/docs/virgo-programmer-guide/htmlsing le/virgo-programmer-guide.html#formtags-case-study-war-share d-services is given of how to access services from a WAR.
Previous Topic:UnitTests and Code coverage for Virgo
Next Topic:Logging output in Virgo M2
Goto Forum:
  


Current Time: Thu Sep 26 21:10:02 GMT 2024

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

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

Back to the top