On 10/03/2017 16:29, KARR, DAVID wrote: > I'm currently running a somewhat simple CXF/REST/Spring app in TomEE > 7.0.1. It uses the CXF libraries in WEB-INF/lib, not in the > container. It uses a couple of Environment strings, and some > DataSource resources, all of which it gets from JNDI. > > I'm considering moving this app from TomEE to Tomcat, because as far > as I can see, I don't need anything that TomEE provides over Tomcat, > and I'm also running into classloader conflicts now that I've added > more code using CXF pieces that I haven't used before. I'm pursuing > those issues with the TomEE team (ok, Romain), as I'd like to get > these issues resolved now that I've run into them, but I have to > consider alternative strategies if it's going to take too long to get > them resolved. > > If I attempt to port this to Tomcat, I'm guessing all of the required > changes will be in "conf". It appears that in TomEE, I define > DataSource Resources in "tomee.xml" and environment strings (and > other things) in "Context.xml", but in Tomcat I define all of those > in "Context.xml". I assume that's correct?
It is context.xml (case matters) but otherwise correct. > I also need to understand if there are any syntax differences between > the "Resource" entries I define in "tomee.xml" and the similar ones I > define in "Context.xml" in Tomcat. Almost certainly since these are container specific configuration files. > For instance, in my DataSource Resources in TomEE, I set the "type" > to "DataSource", although I see in the Tomcat example it uses > "javax.sql.DataSource". Will both of these work in Tomcat? No. Tomcat expects the full class name. > In my > current app, I also define the other DataSource properties in the > "body" of the "Resource" element, like "key = value", one on each > line. In the Tomcat example, they are set as traditional XML > attributes. I would also guess that both of these strategies would > work in Tomcat, correct? No. Tomcat requires the XML format. > I also have to determine what the required "JNDI prefix" is for > Tomcat. Presently, in my TomEE app, I don't need a prefix for the > environment entries, but I need to prefix my datasource JNDI names > with "openejb:Resource/". What will I need to prefix my JNDI > references with in Tomcat? java:comp/env Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org