Announcement Announcement Module
No announcement yet.
Configuring a "Traditional" Datasource for Spring dm Server's Tomcat Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.


    • #3
      dm Server has deferred support for JNDI pending some work in the OSGi Alliance to standardise the way JNDI plugs into OSGi.