Rob,
On 11/7/22 16:40, Rob Sargent wrote:
On 11/7/22 14:26, Christopher Schultz wrote:
Rob,
On 11/7/22 14:09, Rob Sargent wrote:
Are there any semantics to Resourse name attributes?
Or is <Resource name="jdbc/here/there" ... /> no more or less valid
than <Resource name="jdbcHereThere" ... />
As far as Tomcat is concerned, it's basically the Wild West.
Some other application servers (usually the "enterprise" ones) are
super strict about where things go in the JNDI space. It's very common
to see JDBC connections placed into
java:comp/env/jdbc/[connection-name] but I think technically you could
put them just about anywhere.
If you put them somewhere else, someone's gonna say "hey, what the
heck are you doing that for?" because, well, #conventions.
-chris
Thank you. Indeed I use
Context sgsContext = (Context) ic.lookup("java:/comp/env");
but I am playing fast and loose with resource names within that
context. Is that a foot gun?
Do you mean because you used "java:/comp/env" and I used
"java:comp/env"? I think the leading slash doesn't matter.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org