java - moving from single webapp to multiple webapps connecting to same database -
i have java webapp using db connection pooling tomcat+mysql config.
i have java webapp want deploy in same tomcat , connect same mysql database (even access data same tables).
i havent figured out way how achieve same.
should have connection pooling context.xml each of webapps? or should have global configuration.
in first case , assume there nothing different need do. deploy webapp has own context.xml.. please correct me if i'm wrong.
if having global config better solution, how achieve that. haven't found tutorials it. changes in each of webapps need made , knows needs read global config.
there's nothing wrong having separate context each webapp unless want centrally manage changes database (i.e. migrate different db, change connection parameters). if think connection properties change or want flexibility can use jndi datasource in tomcat , manage there (google friend that).
Comments
Post a Comment