Results 1 to 3 of 3

Thread: Configuring a "Traditional" Datasource for Spring dm Server's Tomcat

  1. #1

    Default Configuring a "Traditional" Datasource for Spring dm Server's Tomcat

    We're trying to just get our old J2EE WAR deployed and working on spring dm server with minimal (if any) changes to the application prior to starting a major effort to "osgi-ify" the WAR and its components (meaning turn it into a shared services WAR and eventually a PAR).

    However, this application uses a JNDI lookup to find a datasource. For regular Tomcat, we just add a resource to the tomcat's conf/context.xml file and we're good to go, but doing that for the spring dm server (we're on 1.0.2.SR02) seems to have zero effect. In fact, if I purposefully mis-spell my "resource" element in this file, hoping to prove that it is being read by having an error about it logged somewhere, I don't see evidence of that, either.

    I've scoured all I could for how to accomplish this task (setting up a JNDI datasource for spring dm server). User/programmer guide, forums, googling many sites. I am just not seeing anything about this. Sorry if I am missing something obvious.

    This brings me to my 2 questions.
    1. How can one set up a datasource in spring dm server that my app can look up using a JNDI name?
    2. Is the config/context.xml file read at all by spring dm server?

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    For what I know JNDI doesn't work/isn't enabled in dm Server which also means that the context.xml is ignored, the configuration is done in the dm server configuration (port etc). I would have to check the sources on how tomcat is bootstrapped but probably someone of the team is reading here, maybe he can give a more detailed answer.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    dm Server has deferred support for JNDI pending some work in the OSGi Alliance to standardise the way JNDI plugs into OSGi.
    Glyn Normington
    SpringSource

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •