Author |
Message |
08/06/2012 07:08:29
|
mreich
Power User
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
Hi,
we want to use CDI with an embedded tomcat application. But it seems that it it doesn't work
Could it be that Tomcat6 is used for the embedded tomcat scenario?
Would it be possible to change?
http://stackoverflow.com/questions/5866237/changing-embedded-tomcat-from-v6-to-v7-causes-initialcontext-lookup-to-fail
May you can also add:
File configFile = new File("META-INF/context.xml")
Context context = tomcat.addWebapp("", "ROOT");
context.setConfigFile(configFile.toURI().toURL());
regards
Markus
|
|
|
08/06/2012 08:13:48
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
Tomcat 7 so far failed out embedded tests, this is the reason, why embedded scenario still is working with Tomcat 6.
Of course, you can run Tomcat 6 embedded going through normal http-localhost-commuinication (and not through the embedded API that enters some API levels deeper). From performance point of view this is not a big deal + also from starting-the-system point of view.
Is this an option for you...?
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
08/06/2012 08:27:01
|
mreich
Power User
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
the problem is that CDI requires Tomcat 7
so as I know that I can't use CDI, I will change my implementations
|
|
|
11/03/2014 13:53:12
|
cfuchs
Active
Joined: 21/01/2013 09:33:01
Messages: 16
Offline
|
*push*
Björn, is there any intent to raise the embedded Tomcat version to v7 in near future?
Thanks!
|
|
|
11/03/2014 16:05:19
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
...in principal: yes. ;-)
The earlier Tomcat 7 versions had some problems with embedded mode, so we kept using Tomcat 6.
We have not invested yet any time in checking the newest Tomcat 7 releases (and also do not have it on the plannig for the next weeks).
Is it a "general question" of your side, or do you really plan to use the embedded scenario?
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
17/03/2014 18:25:31
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
Yes: We're planning an offline tool which is used in production and, of course, want to use Captain Casa capabilities. ;-) So it would be really helpful if the embedded mode supported Tomcat 7.
Since we plan the to use the offline client in production, another questions is: Will a Tomcat 7 (and embedded mode) be maintained in the future? (I think so, because the Dev-Tools use it?)
And: Is it possible to exchange the loaded libs of Tomcat, at least to switch between minor versions later?
BR
|
|
|
18/03/2014 08:30:28
|
Admin
Power User
Joined: 21/11/2007 11:36:10
Messages: 38
Offline
|
..we'll check latest Tomcat release if it is usable in embedded mode. But will take some days. Hope to have answer for you till begin of next week.
Btw: what always works without any problem is to run Tomat in the same process as the client, both communicating through http ("in process http"). Of course you might require some port selection (in order to start the fat client multiple times). So, even if there are problems with "real embedded" mode - this might be an option. (?)
Regards, Björn
|
|
|
18/03/2014 09:43:00
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
in Tomcat 6 we used the "MemoryProtocolHandler" in order to communicate between client and aserver without going through http. This handler is not available anymore from Tomcat 7 on.
So, the only option (currently) seems to be the "in process http" way...
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
31/03/2014 13:22:52
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
So no increased interest on an upgrade (incl the DevTools) up to now?
BR
|
|
|
31/03/2014 14:17:07
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
oh, sorry, my last repsonse was meant to be some summary on what's possible:
1. Real embedded mode == client and server in one VM, communication through internal API:
This only works with Tomcat 6 and is unfortunately not supported with Tomcat 7. Missing MemoryProtocolHandler
2. "Decoupled" embedded mode == client and server in one VM, communication through localhostxxxx-http:
This also works with Tomcat7 - but this has not CaptainCasa specific issues. CaptainCasa is started in the normal way, Tomcat as well (via start API) - the start URL of CaptainCasa is just normal "http://localhostxxxxxx/faces/xxxx.jsp). So there is NO "embedded://"-/URL.
Please contact me if you want to set up (2.). It's just normal APIs but I can pass you existing code to start Tomcat etc.
Please also note: with 2. there is a port problem is starting the server multiple times. ("Problem" means: there must be a dynamic assignment of the port.)
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|