Skip to main content



      Home
Home » Eclipse Projects » Virgo » Virgo and JNDI Data Sources
Virgo and JNDI Data Sources [message #549020] Fri, 23 July 2010 13:19 Go to next message
Eclipse UserFriend
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 07:48 Go to previous messageGo to next message
Eclipse UserFriend
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 07:48 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 12:04:38 EDT 2025

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

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

Back to the top