Results 1 to 2 of 2

Thread: JDBC Not Bound

  1. #1
    Join Date
    Jun 2010
    Posts
    10

    Default JDBC Not Bound

    Hi All,

    I'm getting a javax.naming.NameNotFoundException thrown in my Spring/Hibernate app, because it can't find the jdbc datasource.

    I'm trying out Cloud Foundry for a new project at a new job. Previously I've worked on small clusters of Tomcat servers hosted on machines in data centers I've had access to, so this Cloud business is all new to me.

    I've got my JNDI datasource defined on my local TV instance in server.xml, and it all works fine.

    What's the 'best practice' approach to setting up the datasource in a cloud environment? I've seen mentions of pre-initialization scripts, but I've no idea how I can get Cloud Foundry to acept/run any such scripts. Should I be using server.xml-defined JNDI datasources at all? Is there a more 'modern' way of doing things these days?

    Any and all help will be muchly appreciated.

  2. #2
    Join Date
    Jun 2010
    Posts
    10

    Default

    I had forgotten about the initialization script options on the "Launch Deployment" screen.

    I'm considering storing my customised server.xml with the datasource defined in S3, then writing a bash script to over-write the default server.xml with mine on deployment.

    This seems a bit long-winded. Is there a simpler solution that I'm missing? Surely lots of other people need custom server.xml files too? It'd be a nice feature to allow such a file to be uploaded along with the extra .jars.

Tags for this Thread

Posting Permissions

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