Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328174 - Provide ability to turn off tomcat naming (jndi) support
Summary: Provide ability to turn off tomcat naming (jndi) support
Status: CLOSED FIXED
Alias: None
Product: Gemini.Web
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1.0.M01   Edit
Assignee: Violeta Georgieva CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 332042
Blocks: 361144 361173
  Show dependency tree
 
Reported: 2010-10-19 15:33 EDT by Dmitry Sklyut CLA
Modified: 2011-10-31 14:00 EDT (History)
3 users (show)

See Also:


Attachments
Patch proposal (6.54 KB, patch)
2011-07-19 09:52 EDT, Violeta Georgieva CLA
no flags Details | Diff
Patch proposal (7.09 KB, patch)
2011-10-17 10:34 EDT, Violeta Georgieva CLA
glyn.normington: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Sklyut CLA 2010-10-19 15:33:26 EDT
Build Identifier: 

Tomcat insists on registering a System level properties for Context.INITIAL_CONTEXT_FACTORY and Context.URL_PKG_PREFIXES.  This interferes with gemini naming.  Gemini Naming can't find the class specified by Context.INITIAL_CONTEXT_FACTORY (mainly because catalina bundle does not export it) and fails to create any InitialContext.

Looking for a way to set "useNaming" flag to "false" in org.eclipse.gemini.web.tomcat.internal.Tomcat.  Maybe with a system property?  -DuseNaming=false?

Reproducible: Always
Comment 1 Dmitry Sklyut CLA 2010-10-19 15:33:48 EDT
Discussion from Virgo mailing list: http://dev.eclipse.org/mhonarc/lists/virgo-dev/msg00293.html
Comment 2 Glyn Normington CLA 2010-10-20 03:48:27 EDT
Flagging as an enhancement, especially as this will involve an externals change.
Comment 3 Violeta Georgieva CLA 2011-05-18 09:13:08 EDT
With migration to Tomcat 7 now we can introduce such switch. See TODO comment in
org.eclipse.gemini.web.tomcat.internal.OsgiAwareEmbeddedTomcat.init() method.
Comment 4 Violeta Georgieva CLA 2011-07-19 09:52:19 EDT
Created attachment 199902 [details]
Patch proposal

Could you please review the patch and comment.

Thanks
Violeta
Comment 5 Violeta Georgieva CLA 2011-10-17 10:34:46 EDT
Created attachment 205335 [details]
Patch proposal

Change the meaning of the property from 

useTomcatNaming - true/false

to

useNaming - tomcat/osgi/disabled

"tomcat" is by default if the property is not set
Comment 6 Glyn Normington CLA 2011-10-17 10:36:44 EDT
Comment on attachment 205335 [details]
Patch proposal

Looks good to me.
Comment 7 Violeta Georgieva CLA 2011-10-17 14:17:27 EDT
Change is tested, committed and pushed.
Commit Id: 64696debc57e333d5adb55ae5f3ff56fc931c17f
Documentation will be covered in Bug 361173
Comment 8 Alex Blewitt CLA 2011-10-18 05:55:07 EDT
Given that both the Jetty and Tomcat distributions can be used, why not move towards OSGi as the standard property for both of those and change in a future release, instead of having tomcat as the default?
Comment 9 Glyn Normington CLA 2011-10-18 06:08:04 EDT
(In reply to comment #8)
> Given that both the Jetty and Tomcat distributions can be used, why not move
> towards OSGi as the standard property for both of those and change in a future
> release, instead of having tomcat as the default?

I'm not sure I understand.

Gemini Web is currently tied to Tomcat. Virgo Jetty Server uses Jetty as an alternative RFC 66 (OSGi Web Applications) container to Gemini Web which is used by Virgo Tomcat Server. So there is no obvious need for Gemini Web to support Jetty.