Nov 19th, 2010, 10:10 AM
JDBC Not Bound
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.
Nov 22nd, 2010, 08:13 AM
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