Yes, in separate Wars it works fine... But if I try to use two Turbine servlets in the same War, one of them crashes... It would be nice to be able to do this, otherwise we would end up with 2 or 3 wars for every project, which seems unreasonable.


Thanks anyway!
Paulo Santos
www.Wiaxis.com

madhuranjan kumar sinha wrote:

I think we do not have any problem in Multiple instanitation of Turbine
servlet. Though we do not have same war but we are using multiple
application under same servlet engine.

Madhuranjan Kumar Sinha,
Sr. Software Engineer & CC,
Cybage Software Pvt. Ltd.(a CMM Level 3 Company),
Marisoft, Kalyani nagar,
Pune - 411006.
E-Mail: [EMAIL PROTECTED]
Tel no.: 91-20-56044700, 56041700 Ext : 753

----- Original Message ----- From: "Paulo Schlup Santos" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, February 28, 2005 2:15 AM
Subject: Using 2 Turbine Servlets in the same WAR





Hi guys!

I just hit a problem with Turbine, thought maybe someone has tried this
before.

I have a shopping cart app in a place like http://host/eCommerce/app/,
and the owner should be able to manage the site through an address like
http://host/eCommerce/manager/. These sub-sites have common business
objects, but different screens and templates.

I tried configuring a second servlet for Turbine in web.xml like this:

<servlet>
  <servlet-name>eCommerce</servlet-name>
  <servlet-class>org.apache.turbine.Turbine</servlet-class>
  <init-param>
    <param-name>properties</param-name>
    <param-value>WEB-INF/conf/TurbineResources.properties</param-value>
  </init-param>
</servlet>

<servlet-mapping>
  <servlet-name>eCommerce</servlet-name>
  <url-pattern>/app/*</url-pattern>
</servlet-mapping>

<servlet>
  <servlet-name>Manager</servlet-name>
  <servlet-class>org.apache.turbine.Turbine</servlet-class>
  <init-param>
    <param-name>properties</param-name>
    <param-value>WEB-INF/conf/ManagerResources.properties</param-value>
  </init-param>
</servlet>
<servlet-mapping>
  <servlet-name>Manager</servlet-name>
  <url-pattern>/manager/*</url-pattern>
</servlet-mapping>

In theory, this should not be a problem. However, the first servlet
that's called works just fine - the second one crashes on
initialization. I'm guessing that Turbine uses several static
properties, which should be initialized a second time for the second
servlet, but aren't. I'm also guessing that the problem is with de
RunDataService, because it crashes on line 831 of Turbine.java (where it
tries to release the RunData object to be used again). I'm using version
2.3.1 with m.e.t.a. and maven, everything else working great so far.

Has anyone experienced this, or has had any success creating two
instances of Turbine on the same app? I *really* would like to have
separate areas in the app without having to split the code into several
different .WARs... I think this would be really useful to anyone
building complex apps or even integrating two or more modules built with
Turbine into a single App.

Thanks!

Paulo Santos




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to