|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (CARGO-582) Can't override the Tomcat JNDI environmentCan't override the Tomcat JNDI environment
------------------------------------------ Key: CARGO-582 URL: http://jira.codehaus.org/browse/CARGO-582 Project: Cargo Issue Type: Bug Components: Tomcat Affects Versions: 1.0 Reporter: Matthew Jensen By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139369#action_139369 ] Matthew Jensen commented on CARGO-582: -------------------------------------- Tomcat initializes its JNDI environment like this: org.apache.catalina.startup.Embedded: {code} protected void initNaming() { // Setting additional variables if (!useNaming) { log.info( "Catalina naming disabled"); System.setProperty("catalina.useNaming", "false"); } else { System.setProperty("catalina.useNaming", "true"); String value = "org.apache.naming"; String oldValue = System.getProperty(javax.naming.Context.URL_PKG_PREFIXES); if (oldValue != null) { value = value + ":" + oldValue; } System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value); if( log.isDebugEnabled() ) log.debug("Setting naming prefix=" + value); value = System.getProperty (javax.naming.Context.INITIAL_CONTEXT_FACTORY); if (value == null) { System.setProperty (javax.naming.Context.INITIAL_CONTEXT_FACTORY, "org.apache.naming.java.javaURLContextFactory"); } else { log.debug( "INITIAL_CONTEXT_FACTORY alread set " + value ); } } } {code} This code overwrites the relevant system properties. If you set these up before hand Tomcat will nuke them, replacing them with its own. This behavior can be disabled by calling {{Embedded.setUseNaming(false)}}. > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139370#action_139370 ] Matthew Jensen commented on CARGO-582: -------------------------------------- My first thought of a fix was to expose a property (cargo.tomcat.usenaming) and allow embedders to decide if they want to use Tomcat's JNDI implementation. Although now I think its more appropriate to just disable the naming when ever Tomcat is embedded. > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthew Jensen updated CARGO-582: --------------------------------- Attachment: CARGO-582.patch This patch will disable Tomcat's JNDI creation. > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthew Jensen updated CARGO-582: --------------------------------- Attachment: CARGO-582.patch This patch will disable Tomcat's JNDI creation. > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthew Jensen updated CARGO-582: --------------------------------- Attachment: (was: CARGO-582.patch) > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139374#action_139374 ] Matt Wringe commented on CARGO-582: ----------------------------------- I don't know if I want to just out right disable this feature (I am not sure how this would affect other users). How would something like this: if no jndi system properties are set, do nothing and continue like before if any jndi system properties are set through cargo, setUseNaming to false and use the values the user specified (and use defaults if the user has not specified all required jndi properties). Would this be good enough? > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139381#action_139381 ] Matthew Jensen commented on CARGO-582: -------------------------------------- bq. if no jndi system properties are set, do nothing and continue like before Yes that sounds good. bq. if any jndi system properties are set through cargo, setUseNaming to false and use the values the user specified (and use defaults if the user has not specified all required jndi properties). Not sure what you mean by "system properties set through cargo". I think you just mean to check the system properties and if they are there disable Tomcat's JNDI. ---- That said, I don't think this is actually an issue after all, {{initNaming}} will alwatys update URL_PKG_PREFIXES but only set INITIAL_CONTEXT_FACTORY if its not set. URL_PKG_PREFIXES is only used by "url loading context factories". So if your initial factory is something else, this should not conflict. Doing some more testing. > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139382#action_139382 ] Matthew Jensen commented on CARGO-582: -------------------------------------- http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/Context.html#URL_PKG_PREFIXES > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139926#action_139926 ] Matthew Jensen commented on CARGO-582: -------------------------------------- You can override the tomcat behavior by setting a system property: {code} value = System.getProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY); {code} I used [simple-jndi|http://www.osjava.org/simple-jndi/] to create a context before starting tomcat. I can't close this issue. > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Closed: (CARGO-582) Can't override the Tomcat JNDI environment[ http://jira.codehaus.org/browse/CARGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Wringe closed CARGO-582. ----------------------------- Resolution: Not A Bug Closing as not a bug since this can be set using system properties > Can't override the Tomcat JNDI environment > ------------------------------------------ > > Key: CARGO-582 > URL: http://jira.codehaus.org/browse/CARGO-582 > Project: Cargo > Issue Type: Bug > Components: Tomcat > Affects Versions: 1.0 > Reporter: Matthew Jensen > Attachments: CARGO-582.patch > > > By default, Tomcat will initialize its own JNDI environment. If you are trying to embed tomcat with a your own, then Tomcat will override this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |