Just to prefix this a little - I still don't have a complete understanding of all this tech so please bear with me!
The current setup is that we deploy a non-dynamic web project (which uses Terracotta and ehcache with RESTful web services) to a glassfish web container. The application is governed by spring and everything is weaved in accordingly as and when required. The database that is being written too is ms sql server 2005
The process to build, deploy and remote debug takes an age at around ~8mins (260seconds to deploy alone) and I have had it! My last project was a dynamic web project and not being able to develop on the fly and deploy (almost) instantly is a right nightmare.
So the first question before I go down the tomcat6 route, is there any reason why the project is not a dynamic web project with full hot-deployment facilities? If not, is it a simple case of re-importing everything into a new dynamic web project?
I would still like to use tomcat as well - it seems far lighter and faster than glassfish and we are not using EJB or anything complicated (other than above which may inturn use something like this however I am unaware of that at this stage).
So as I understand it I can set tomcat to recognise new complied files using this guide. Therefore I have to successfully deploy the app first then I can set my eclipse ide to save the compiled class files to the tomcat location.
On deployment I get the following error:
Related cause: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'dataSourceQSQ' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
I think I may have confused setup's between tomcat versions, so I have attached my setup as guided by the web.
Files not changed:
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
<Resource name="UserDatabase" auth="Container"
description="User database that can be updated and saved"
<context:component-scan base-package="com.pivetal.qspeeq.rest" />
<context:property-placeholder location="classpath:META-INF/jpa.properties" />
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
<!-- The following beans define the interface with the QSQ database -->
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaDialect" />
<bean id="dataSourceQSQ" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/qsdb"/>
Please tell me if I am missing anything and I look forward to any feedback. Thank you people!
<Context path="" debug="5" reloadable="true" crossContext="true">
<!-- Default set of monitored resources -->
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<Manager pathname="" />
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />