Tribes Startup Help

2009-01-07 Thread Mike Wannamaker
Hi,

We are using 5.5.27 and using tribes, however instead of tomcat
initializing and starting tribes we are doing it ourselves.  Below is my
code.  I was just wondering if you see anything wrong with what I'm
doing.

public synchronized void startup()
{
if(_tribesChannel == null)
{ // nothing to do if already running
try
{
_tribesChannel = new GroupChannel();
// must be done before start:
MembershipService mService =
_tribesChannel.getMembershipService();
McastService mCastService = (McastService)mService;
mCastService.setPort(_mainPort);
mCastService.setAddress(_multicastIPAddr);
mCastService.setRecoveryCounter(10);
// 10 Seconds instead of 3 seconds?
mCastService.setDropTime(10*1000);
ChannelReceiver receiver =
_tribesChannel.getChannelReceiver();
// _desiredLocalIPAddr may be set to select one nic in multihome
environments
if(_desiredLocalIPAddr != null &&
_desiredLocalIPAddr.length() > 0)
{
// Question: Set both of these, to have heartbeat and messages sent on
same nic?
mCastService.setBind(_desiredLocalIPAddr);
if(receiver instanceof ReceiverBase)
{

((ReceiverBase)receiver).setAddress(_desiredLocalIPAddr);
}
}
// Set if we want a different port than what tomcat uses as default
"4000"
if(_ancillaryPort > 0)
{
if(receiver.getPort() != _ancillaryPort)
{
if(receiver instanceof ReceiverBase)
{

((ReceiverBase)receiver).setPort(_ancillaryPort);
}
}
}
_tribesChannel.addInterceptor(new
TcpFailureDetector());
 
_tribesChannel.addMembershipListener(_tribesMembershipListener);
 
_tribesChannel.addChannelListener(_tribesChannelListener);
_tribesChannel.start(CHANNEL_COMPONENTS);
// This just adds this machine to our internal cluster topology list
addToTopology();
}
catch(ChannelException ex)
{
try { _tribesChannel.stop(CHANNEL_COMPONENTS); }
catch(Throwable t) { /*gulp*/}
_tribesChannel = null;
throw new RuntimeException(ex); // todo, exception
handling?
}
}
}

public void shutdown()
{
super.shutdown();
if(_tribesChannel != null)
{
try
{
synchronized(_tribesChannel)
{
 
_tribesChannel.removeMembershipListener(_tribesMembershipListener);
 
_tribesChannel.removeChannelListener(_tribesChannelListener);
_tribesChannel.stop(CHANNEL_COMPONENTS);
}
}
catch(ChannelException ex)
{
throw new RuntimeException(ex); // todo, exception
handling?
}
finally
{
_tribesChannel = null;
}
}
}

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tribes and IPv6 Support

2008-12-02 Thread Mike Wannamaker
I'm having an issue starting tribes under tomcat 5.5 on Windows 2008 Server, 
IPv6 only setup.

Get the following exception

Dec 1, 2008 11:25:07 AM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Unable to bind server socket to:/fe80:0:0:0:c8cb:7933:1d84:c05d:4099 
throwing error.
Dec 1, 2008 11:25:07 AM org.apache.catalina.tribes.transport.nio.NioReceiver 
start
SEVERE: Unable to start cluster receiver
java.net.SocketException: Address family not supported by protocol family: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:205)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
at 
org.apache.catali

RE: cluster configuration

2008-11-21 Thread Mike Wannamaker
Hi Filip

I found the cause

if(_desiredLocalIPAddr != null)
{
mCastService.setBind(_desiredLocalIPAddr);
}

_ desiredLocalIPAddr was not actually null but empty and therefore call
mCastService.setBind("");

Perhaps setBind(); should check the given ip?  However, I have fixed my
code to not allow this.

Cheers
Mike

-Original Message-----
From: Mike Wannamaker [mailto:[EMAIL PROTECTED] 
Sent: November 21, 2008 2:26 PM
To: Tomcat Users List
Subject: RE: cluster configuration

Hi Filip

1. We are using tribes from 6.0.18, we have a unique situation we are on
5.5.25, however we are starting tribes ourselves.  See my startup code
below.
2. It should be valid 239.176.50.121 is a valid Class D IPv4 address
(224.0.0.0 - 239.255.255.255)
3. No Windows XP 64 bit.


Tribes startup code:

public synchronized void startup()
{
if(_tribesChannel == null)
{ // nothing to do if already running
try
{
_tribesChannel = new GroupChannel();
// must be done before start:
MembershipService mService =
_tribesChannel.getMembershipService();
McastService mCastService = (McastService)mService;
mCastService.setPort(_mainPort);
mCastService.setAddress(_multicastIPAddr);
mCastService.setRecoveryCounter(10);
// 10 Seconds instead of 3 seconds?
mCastService.setDropTime(10*1000);
if(_desiredLocalIPAddr != null)
{
mCastService.setBind(_desiredLocalIPAddr);
}
if(_ancillaryPort > 0)
{
ChannelReceiver receiver =
_tribesChannel.getChannelReceiver();
if(receiver.getPort() != _ancillaryPort)
{
if(receiver instanceof ReceiverBase)
{
 
((ReceiverBase)receiver).setPort(_ancillaryPort);
}
}
}
_tribesChannel.addInterceptor(new
TcpFailureDetector());
 
_tribesChannel.addMembershipListener(_tribesMembershipListener);
 
_tribesChannel.addChannelListener(_tribesChannelListener);
_tribesChannel.start(CHANNEL_COMPONENTS);
addToTopology();
}
catch(ChannelException ex)
{
try { _tribesChannel.stop(CHANNEL_COMPONENTS); }
catch(Throwable t) { /*gulp*/}
_tribesChannel = null;
throw new RuntimeException(ex); // todo, exception
handling?
}
}
}



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: November 19, 2008 5:01 PM
To: Tomcat Users List
Subject: Re: cluster configuration

just to make sure

1. you are using 6.0.18
and
2. the IP you are trying to bind to is valid
and
3. could you be using linux?

this is the code that is telling you about the failure

186 : fhanik 586228  if (mcastBindAddress != null) {
187 : try {
188 : log.info("Attempting to bind the multicast socket 
to "+address+":"+port);
189 : socket = new MulticastSocket(new 
InetSocketAddress(address,port));
190 : } catch (BindException e) {
191 : /*
192 : * On some plattforms (e.g. Linux) it is not 
possible to bind
193 : * to the multicast address. In this case only bind

to the
194 : * port.
195 : */
196 : log.info("Binding to multicast address, failed. 
Binding to port only.");
197 : socket = new MulticastSocket(port);
198 : }

Mike Wannamaker wrote:
> I'm having an issue with clustering in tomcat and tribes.
>
> I get this output, I'm not sure why Tribes can't bind to the multicast
> address?  It then binds to localhost which doesn't allow machines to
see
> each other.
>
> Any help is appreciated.
>
> 19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.transport.ReceiverBase
> bind
> INFO: Receiver Server Socket bound to:/10.6.2.89:4000
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Attempting to bind the multicast socket to /239.176.50.121:45566
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Binding to multicast address, failed. Binding to port only.
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Setting multihome multicast interface to:localhost/127.0.0.1
> 19-Nov-2008 3:30:23 PM
> org.apach

RE: cluster configuration

2008-11-21 Thread Mike Wannamaker
Hi Filip

1. We are using tribes from 6.0.18, we have a unique situation we are on
5.5.25, however we are starting tribes ourselves.  See my startup code
below.
2. It should be valid 239.176.50.121 is a valid Class D IPv4 address
(224.0.0.0 - 239.255.255.255)
3. No Windows XP 64 bit.


Tribes startup code:

public synchronized void startup()
{
if(_tribesChannel == null)
{ // nothing to do if already running
try
{
_tribesChannel = new GroupChannel();
// must be done before start:
MembershipService mService =
_tribesChannel.getMembershipService();
McastService mCastService = (McastService)mService;
mCastService.setPort(_mainPort);
mCastService.setAddress(_multicastIPAddr);
mCastService.setRecoveryCounter(10);
// 10 Seconds instead of 3 seconds?
mCastService.setDropTime(10*1000);
if(_desiredLocalIPAddr != null)
{
mCastService.setBind(_desiredLocalIPAddr);
}
if(_ancillaryPort > 0)
{
ChannelReceiver receiver =
_tribesChannel.getChannelReceiver();
if(receiver.getPort() != _ancillaryPort)
{
if(receiver instanceof ReceiverBase)
{
 
((ReceiverBase)receiver).setPort(_ancillaryPort);
}
}
}
_tribesChannel.addInterceptor(new
TcpFailureDetector());
 
_tribesChannel.addMembershipListener(_tribesMembershipListener);
 
_tribesChannel.addChannelListener(_tribesChannelListener);
_tribesChannel.start(CHANNEL_COMPONENTS);
addToTopology();
}
catch(ChannelException ex)
{
try { _tribesChannel.stop(CHANNEL_COMPONENTS); }
catch(Throwable t) { /*gulp*/}
_tribesChannel = null;
throw new RuntimeException(ex); // todo, exception
handling?
}
}
}



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: November 19, 2008 5:01 PM
To: Tomcat Users List
Subject: Re: cluster configuration

just to make sure

1. you are using 6.0.18
and
2. the IP you are trying to bind to is valid
and
3. could you be using linux?

this is the code that is telling you about the failure

186 : fhanik 586228  if (mcastBindAddress != null) {
187 : try {
188 : log.info("Attempting to bind the multicast socket 
to "+address+":"+port);
189 : socket = new MulticastSocket(new 
InetSocketAddress(address,port));
190 : } catch (BindException e) {
191 : /*
192 : * On some plattforms (e.g. Linux) it is not 
possible to bind
193 : * to the multicast address. In this case only bind

to the
194 : * port.
195 : */
196 : log.info("Binding to multicast address, failed. 
Binding to port only.");
197 : socket = new MulticastSocket(port);
198 :     }

Mike Wannamaker wrote:
> I'm having an issue with clustering in tomcat and tribes.
>
> I get this output, I'm not sure why Tribes can't bind to the multicast
> address?  It then binds to localhost which doesn't allow machines to
see
> each other.
>
> Any help is appreciated.
>
> 19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.transport.ReceiverBase
> bind
> INFO: Receiver Server Socket bound to:/10.6.2.89:4000
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Attempting to bind the multicast socket to /239.176.50.121:45566
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Binding to multicast address, failed. Binding to port only.
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Setting multihome multicast interface to:localhost/127.0.0.1
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Setting cluster mcast soTimeout to 500
> 19-Nov-2008 3:30:23 PM
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Sleeping for 1000 milliseconds to establish cluster membership,
> start level:4
> 19-Nov-2008 3:30:24 PM
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Done sleeping, membership established, start level:4
> 19-Nov-2008 3:30:24 PM
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Sleeping for 1000 milliseconds to establish cl

cluster configuration

2008-11-19 Thread Mike Wannamaker
I'm having an issue with clustering in tomcat and tribes.

I get this output, I'm not sure why Tribes can't bind to the multicast
address?  It then binds to localhost which doesn't allow machines to see
each other.

Any help is appreciated.

19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/10.6.2.89:4000
19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Attempting to bind the multicast socket to /239.176.50.121:45566
19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Binding to multicast address, failed. Binding to port only.
19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting multihome multicast interface to:localhost/127.0.0.1
19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
19-Nov-2008 3:30:23 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership,
start level:4
19-Nov-2008 3:30:24 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
19-Nov-2008 3:30:24 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership,
start level:8
19-Nov-2008 3:30:25 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Initializing 3rdParty Loggers

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Basic Tribes Questions

2008-10-08 Thread Mike Wannamaker
Yes, I know it's in the tomcat distribution, but lets say you fix the 
TCPFailureDetector I would have to wait until a new version of tomcat is 
published before getting the fix?  There is no repository I could get it from 
and build myself?

Mike

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: October 8, 2008 3:09 PM
To: Tomcat Users List
Subject: Re: Basic Tribes Questions

catalina-tribes.jar

it depends on

tomcat-juli.jar

both of them are in the binary distribution for Tomcat

Filip

Mike Wannamaker wrote:
> Cool,
>
> Is there a repository to just get the tribes jar or just the tribes source 
> without having to get all of tomcat to get it?
>
> Like a SVN or CVS repository I could get the fix from and build myself?
>
> Thanks
> Mike
>
> -Original Message-
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
> Sent: October 7, 2008 5:13 PM
> To: Tomcat Users List
> Subject: Re: Basic Tribes Questions
>
> hi Mike, that's great. yes, the TCP failure detector could give multiple 
> "DISAPPEARED" messages, that is something I'm about to fix
>
> Filip
>
> Mike Wannamaker wrote:
>   
>> Hi Filip,
>>
>> I think I am seeing the message, it was just hidden amongst other log 
>> messages I guess I missed it.
>>
>> However I do see something else when I added the TcpFailureDetector to the 
>> interceptor list, I see two DISAPPEARED messages?
>>
>> Without TcpFailureDetector:
>>
>>  1) Start Server #1, then #2
>>  2) Unplug #2 network
>>  3) On #1 - #2 DISAPPEARED, on #2 - #1 DISAPPEARED
>>  4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 
>> ADDED
>>
>> Add TcpFailureDetector
>>
>>  1) Start Server #1, #2
>>  2) Unplug #2 network
>>  3) On #1 - #2 DISAPPEARED;#2 DISAPPEARED, on #2 - #1 DISAPPEARED;#1 
>> DISAPPEARED
>>  4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 
>> ADDED
>>
>> I take it I get the 2 DISAPPEARED messages because I have another 
>> interceptor, but is this the correct behaviour?
>>
>> TIA
>> Mike
>>
>>
>>
>> -Original Message-
>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
>> Sent: October 6, 2008 11:28 AM
>> To: Tomcat Users List
>> Subject: Re: Basic Tribes Questions
>>
>> there are getters and setters for everything
>> and they are all documented here
>> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html
>>
>> each component has getters/setters, for example, the multicast address
>>
>> setAddress
>> getAddress
>>
>> breakpoints might not work very well, since you are stopping one thread, 
>> and not really emulating a real scenario.
>>
>> again, sounds like you have a simple test case, if you can share that, I 
>> can get more understanding, and help you further.
>>
>> Filip
>>
>> Mike Wannamaker wrote:
>>   
>> 
>>> Hi Filip
>>>
>>> Thanks for the info.  However, I don't see the documentation for the 
>>> setters/getters you mention below?
>>> Also I'm having issues while debugging.  When I hit a breakpoint in my code 
>>> and while stepping thru code, I get DISAPPEARED/ADDED messages over and 
>>> over on the other server?  I would think the heartbeat is running in a 
>>> separate thread for both send/receive?  How to solve this, bump the 
>>> heartbeat timeout?
>>>
>>> TIA
>>> Mike
>>>
>>> -Original Message-
>>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
>>> Sent: October 3, 2008 2:51 PM
>>> To: Tomcat Users List
>>> Subject: Re: Basic Tribes Questions
>>>
>>> answers inline
>>>
>>> Mike Wannamaker wrote:
>>>   
>>> 
>>>   
>>>> Hi, I am currently trying to use Tribes as the clustering layer on our 
>>>> server.
>>>>
>>>> My startup code looks like this.
>>>>
>>>> if(_tribesChannel == null)
>>>> { // nothing to do if already running
>>>> try
>>>> {
>>>> _tribesChannel = new GroupChannel();
>>>> // must be done before start:
>>>>   
>>>> 
>>>>   
>>>> 
>>> no need to use any properties, there are getters and setters for everything
>>&g

RE: Basic Tribes Questions

2008-10-08 Thread Mike Wannamaker
Cool,

Is there a repository to just get the tribes jar or just the tribes source 
without having to get all of tomcat to get it?

Like a SVN or CVS repository I could get the fix from and build myself?

Thanks
Mike

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: October 7, 2008 5:13 PM
To: Tomcat Users List
Subject: Re: Basic Tribes Questions

hi Mike, that's great. yes, the TCP failure detector could give multiple 
"DISAPPEARED" messages, that is something I'm about to fix

Filip

Mike Wannamaker wrote:
> Hi Filip,
>
> I think I am seeing the message, it was just hidden amongst other log 
> messages I guess I missed it.
>
> However I do see something else when I added the TcpFailureDetector to the 
> interceptor list, I see two DISAPPEARED messages?
>
> Without TcpFailureDetector:
>
>   1) Start Server #1, then #2
>   2) Unplug #2 network
>   3) On #1 - #2 DISAPPEARED, on #2 - #1 DISAPPEARED
>   4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 
> ADDED
>
> Add TcpFailureDetector
>
>   1) Start Server #1, #2
>   2) Unplug #2 network
>   3) On #1 - #2 DISAPPEARED;#2 DISAPPEARED, on #2 - #1 DISAPPEARED;#1 
> DISAPPEARED
>   4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 
> ADDED
>
> I take it I get the 2 DISAPPEARED messages because I have another 
> interceptor, but is this the correct behaviour?
>
> TIA
> Mike
>
>
>
> -Original Message-
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
> Sent: October 6, 2008 11:28 AM
> To: Tomcat Users List
> Subject: Re: Basic Tribes Questions
>
> there are getters and setters for everything
> and they are all documented here
> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html
>
> each component has getters/setters, for example, the multicast address
>
> setAddress
> getAddress
>
> breakpoints might not work very well, since you are stopping one thread, 
> and not really emulating a real scenario.
>
> again, sounds like you have a simple test case, if you can share that, I 
> can get more understanding, and help you further.
>
> Filip
>
> Mike Wannamaker wrote:
>   
>> Hi Filip
>>
>> Thanks for the info.  However, I don't see the documentation for the 
>> setters/getters you mention below?
>> Also I'm having issues while debugging.  When I hit a breakpoint in my code 
>> and while stepping thru code, I get DISAPPEARED/ADDED messages over and over 
>> on the other server?  I would think the heartbeat is running in a separate 
>> thread for both send/receive?  How to solve this, bump the heartbeat timeout?
>>
>> TIA
>> Mike
>>
>> -Original Message-
>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
>> Sent: October 3, 2008 2:51 PM
>> To: Tomcat Users List
>> Subject: Re: Basic Tribes Questions
>>
>> answers inline
>>
>> Mike Wannamaker wrote:
>>   
>> 
>>> Hi, I am currently trying to use Tribes as the clustering layer on our 
>>> server.
>>>
>>> My startup code looks like this.
>>>
>>> if(_tribesChannel == null)
>>> { // nothing to do if already running
>>> try
>>> {
>>> _tribesChannel = new GroupChannel();
>>> // must be done before start:
>>>   
>>> 
>>>   
>> no need to use any properties, there are getters and setters for everything
>> and they are all documented here
>> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html
>>   
>> 
>>> 
>>> _tribesChannel.getMembershipService().getProperties().put("mcastPort", 
>>> String.valueOf(_mainPort));
>>> 
>>> _tribesChannel.getMembershipService().getProperties().put("mcastAddress", 
>>> _multicastIPAddr);
>>>   
>>> 
>>>   
>> not sure what you are trying to do in the code below. if you wanna set 
>> the port, then simply do it.
>> the membership will pick it up automatically
>>   
>> 
>>> if(_ancillaryPort > 0)
>>> {
>>> 
>>> _tribesChannel.getMembershipService().getProperties().put("tcpListenPort", 
>>> String.valueOf(_ancillaryPort));
>>> // hack alert: Default Tribes instantiation (Tomcat 
>>> 6.0.16) does not read value 

RE: Basic Tribes Questions

2008-10-07 Thread Mike Wannamaker
Hi Filip,

I think I am seeing the message, it was just hidden amongst other log messages 
I guess I missed it.

However I do see something else when I added the TcpFailureDetector to the 
interceptor list, I see two DISAPPEARED messages?

Without TcpFailureDetector:

1) Start Server #1, then #2
2) Unplug #2 network
3) On #1 - #2 DISAPPEARED, on #2 - #1 DISAPPEARED
4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 
ADDED

Add TcpFailureDetector

1) Start Server #1, #2
2) Unplug #2 network
3) On #1 - #2 DISAPPEARED;#2 DISAPPEARED, on #2 - #1 DISAPPEARED;#1 
DISAPPEARED
4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 
ADDED

I take it I get the 2 DISAPPEARED messages because I have another interceptor, 
but is this the correct behaviour?

TIA
Mike



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: October 6, 2008 11:28 AM
To: Tomcat Users List
Subject: Re: Basic Tribes Questions

there are getters and setters for everything
and they are all documented here
http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html

each component has getters/setters, for example, the multicast address

setAddress
getAddress

breakpoints might not work very well, since you are stopping one thread, 
and not really emulating a real scenario.

again, sounds like you have a simple test case, if you can share that, I 
can get more understanding, and help you further.

Filip

Mike Wannamaker wrote:
> Hi Filip
>
> Thanks for the info.  However, I don't see the documentation for the 
> setters/getters you mention below?
> Also I'm having issues while debugging.  When I hit a breakpoint in my code 
> and while stepping thru code, I get DISAPPEARED/ADDED messages over and over 
> on the other server?  I would think the heartbeat is running in a separate 
> thread for both send/receive?  How to solve this, bump the heartbeat timeout?
>
> TIA
> Mike
>
> -Original Message-
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
> Sent: October 3, 2008 2:51 PM
> To: Tomcat Users List
> Subject: Re: Basic Tribes Questions
>
> answers inline
>
> Mike Wannamaker wrote:
>   
>> Hi, I am currently trying to use Tribes as the clustering layer on our 
>> server.
>>
>> My startup code looks like this.
>>
>> if(_tribesChannel == null)
>> { // nothing to do if already running
>> try
>> {
>> _tribesChannel = new GroupChannel();
>> // must be done before start:
>>   
>> 
> no need to use any properties, there are getters and setters for everything
> and they are all documented here
> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html
>   
>> 
>> _tribesChannel.getMembershipService().getProperties().put("mcastPort", 
>> String.valueOf(_mainPort));
>> 
>> _tribesChannel.getMembershipService().getProperties().put("mcastAddress", 
>> _multicastIPAddr);
>>   
>> 
> not sure what you are trying to do in the code below. if you wanna set 
> the port, then simply do it.
> the membership will pick it up automatically
>   
>> if(_ancillaryPort > 0)
>> {
>> 
>> _tribesChannel.getMembershipService().getProperties().put("tcpListenPort", 
>> String.valueOf(_ancillaryPort));
>> // hack alert: Default Tribes instantiation (Tomcat 
>> 6.0.16) does not read value for "tcpListenPort" from properties.
>> // Therefore, set it directly
>> ChannelReceiver receiver = 
>> _tribesChannel.getChannelReceiver();
>> if(receiver.getPort() != _ancillaryPort)
>> {
>> if(receiver instanceof ReceiverBase)
>> {
>> ((ReceiverBase)receiver).setPort(_ancillaryPort);
>> }
>> }
>> }
>>
>> 
>> _tribesChannel.addMembershipListener(_tribesMembershipListener);
>> _tribesChannel.addChannelListener(_tribesChannelListener);
>> _tribesChannel.start(CHANNEL_COMPONENTS);
>> }
>> catch(ChannelException ex)
>> {
>> try { _tribesChannel.stop(CHANNEL_COMPONENTS); } 
>> catch(Throwable t) { /*gulp*/}
>> _tribesChannel = null;
>> throw new RuntimeException

RE: Basic Tribes Questions

2008-10-06 Thread Mike Wannamaker
Hi Filip

Thanks for the info.  However, I don't see the documentation for the 
setters/getters you mention below?
Also I'm having issues while debugging.  When I hit a breakpoint in my code and 
while stepping thru code, I get DISAPPEARED/ADDED messages over and over on the 
other server?  I would think the heartbeat is running in a separate thread for 
both send/receive?  How to solve this, bump the heartbeat timeout?

TIA
Mike

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: October 3, 2008 2:51 PM
To: Tomcat Users List
Subject: Re: Basic Tribes Questions

answers inline

Mike Wannamaker wrote:
> Hi, I am currently trying to use Tribes as the clustering layer on our server.
>
> My startup code looks like this.
>
> if(_tribesChannel == null)
> { // nothing to do if already running
> try
> {
> _tribesChannel = new GroupChannel();
> // must be done before start:
>   
no need to use any properties, there are getters and setters for everything
and they are all documented here
http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html
> 
> _tribesChannel.getMembershipService().getProperties().put("mcastPort", 
> String.valueOf(_mainPort));
> 
> _tribesChannel.getMembershipService().getProperties().put("mcastAddress", 
> _multicastIPAddr);
>   
not sure what you are trying to do in the code below. if you wanna set 
the port, then simply do it.
the membership will pick it up automatically
> if(_ancillaryPort > 0)
> {
> 
> _tribesChannel.getMembershipService().getProperties().put("tcpListenPort", 
> String.valueOf(_ancillaryPort));
> // hack alert: Default Tribes instantiation (Tomcat 
> 6.0.16) does not read value for "tcpListenPort" from properties.
> // Therefore, set it directly
> ChannelReceiver receiver = 
> _tribesChannel.getChannelReceiver();
> if(receiver.getPort() != _ancillaryPort)
> {
> if(receiver instanceof ReceiverBase)
> {
> ((ReceiverBase)receiver).setPort(_ancillaryPort);
> }
> }
> }
>
> 
> _tribesChannel.addMembershipListener(_tribesMembershipListener);
> _tribesChannel.addChannelListener(_tribesChannelListener);
> _tribesChannel.start(CHANNEL_COMPONENTS);
> }
> catch(ChannelException ex)
> {
> try { _tribesChannel.stop(CHANNEL_COMPONENTS); } 
> catch(Throwable t) { /*gulp*/}
> _tribesChannel = null;
> throw new RuntimeException(ex); // todo, exception handling?
> }
> }
>
> My Question is that when I start Server #1, then Server #2, then unplug 
> Server #2 network cable, Server #1 gets the DISAPPEARED message but Server #2 
> just keeps logging the message below.  As I write this it's at attempt #120.  
> How do I get this to notify on Server #2 that Server #1 has DISAPPEARED or 
> can I set the number of attempts to a maximum number before notifying?
>   
the message you are getting is cause the membership tries to recover.
you can limit this, by doing
setRecoveryEnabled(true|false);
setRecoveryCounter(nr-of-times-to-try-recover)

also, you haven't added in the TCP failure detector, which adds one more 
layer of protection
see it in this default configuration
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

you should still get the member disappeared error (eventually after the 
timeout), if you can supply a simple test case, I can try it out over here.

best
Filip

> Also is there any other documentation for tribes, other than the limited docs 
> on the apache site?
>
>   INFO: Done sleeping, membership established, start level:8
>   Oct 3, 2008 1:12:44 PM 
> org.apache.catalina.tribes.transport.nio.NioReplicationTask run
>   WARNING: IOException in replication worker, unable to drain channel. 
> Probable cause: Keep alive socket closed[An existing connection was
> forcibly closed by the remote host].
>   Oct 3, 2008 1:12:44 PM 
> org.apache.catalina.tribes.membership.McastServiceImpl$SenderThread run
>   WARNING: Unable to send mcast message.
>   java.net.NoRouteToHostException: No route to host: Datagram send failed
>   at java.net.PlainDatagramSocketImpl.send(Native Method)
>   at java.net.DatagramSocket.send(Datagr

Basic Tribes Questions

2008-10-03 Thread Mike Wannamaker
Hi, I am currently trying to use Tribes as the clustering layer on our server.

My startup code looks like this.

if(_tribesChannel == null)
{ // nothing to do if already running
try
{
_tribesChannel = new GroupChannel();
// must be done before start:

_tribesChannel.getMembershipService().getProperties().put("mcastPort", 
String.valueOf(_mainPort));

_tribesChannel.getMembershipService().getProperties().put("mcastAddress", 
_multicastIPAddr);
if(_ancillaryPort > 0)
{

_tribesChannel.getMembershipService().getProperties().put("tcpListenPort", 
String.valueOf(_ancillaryPort));
// hack alert: Default Tribes instantiation (Tomcat 6.0.16) 
does not read value for "tcpListenPort" from properties.
// Therefore, set it directly
ChannelReceiver receiver = 
_tribesChannel.getChannelReceiver();
if(receiver.getPort() != _ancillaryPort)
{
if(receiver instanceof ReceiverBase)
{
((ReceiverBase)receiver).setPort(_ancillaryPort);
}
}
}

_tribesChannel.addMembershipListener(_tribesMembershipListener);
_tribesChannel.addChannelListener(_tribesChannelListener);
_tribesChannel.start(CHANNEL_COMPONENTS);
}
catch(ChannelException ex)
{
try { _tribesChannel.stop(CHANNEL_COMPONENTS); } 
catch(Throwable t) { /*gulp*/}
_tribesChannel = null;
throw new RuntimeException(ex); // todo, exception handling?
}
}

My Question is that when I start Server #1, then Server #2, then unplug Server 
#2 network cable, Server #1 gets the DISAPPEARED message but Server #2 just 
keeps logging the message below.  As I write this it's at attempt #120.  How do 
I get this to notify on Server #2 that Server #1 has DISAPPEARED or can I set 
the number of attempts to a maximum number before notifying?

Also is there any other documentation for tribes, other than the limited docs 
on the apache site?

INFO: Done sleeping, membership established, start level:8
Oct 3, 2008 1:12:44 PM 
org.apache.catalina.tribes.transport.nio.NioReplicationTask run
WARNING: IOException in replication worker, unable to drain channel. 
Probable cause: Keep alive socket closed[An existing connection was
forcibly closed by the remote host].
Oct 3, 2008 1:12:44 PM 
org.apache.catalina.tribes.membership.McastServiceImpl$SenderThread run
WARNING: Unable to send mcast message.
java.net.NoRouteToHostException: No route to host: Datagram send failed
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:612)
at 
org.apache.catalina.tribes.membership.McastServiceImpl.send(McastServiceImpl.java:385)
at 
org.apache.catalina.tribes.membership.McastServiceImpl$SenderThread.run(McastServiceImpl.java:445)
Oct 3, 2008 1:12:49 PM 
org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread run
INFO: Tribes membership, running recovery thread, multicasting is not 
functional.
Oct 3, 2008 1:12:49 PM 
org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread 
stopService
WARNING: Recovery thread failed to stop membership service.
java.net.NoRouteToHostException: No route to host: Datagram send failed
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:612)
at 
org.apache.catalina.tribes.membership.McastServiceImpl.send(McastServiceImpl.java:385)
at 
org.apache.catalina.tribes.membership.McastServiceImpl.stop(McastServiceImpl.java:299)
at 
org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread.stopService(McastServiceImpl.java:480)
at 
org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread.run(McastServiceImpl.java:504)
Oct 3, 2008 1:12:49 PM 
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Oct 3, 2008 1:12:49 PM 
org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread 
startService
WARNING: Recovery thread failed to start membership service.
java.net.SocketException: error setting options
at java.net.PlainDatagramSocketImpl.join(Native Method)
at 
java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:172)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:276)

RE: Need my Protocol to be Seen in Tomcat!!

2007-11-16 Thread Mike Wannamaker
Sorry, tomcat 5.5.25 and sorry about the typo.

I thought it was the other way around?  Common is visible to tomcat and
web apps and shared was for just webapps?  At least this is the way it
used to be?

The resource entry in server.xml looks like this:





I believe the issue is that the URL class is loaded in the bootstrap
classloader and my Handler class is in the commons classloader.  Even
though I set the "java.protocol.handler.pkgs" System property correctly,
the URL class tries to load it but it can't because parent classloaders
can't load classes from their children.

So what I'm wondering is if I can hook into that
DirContextURLStreamHandlerFactory class somehow through configuration to
return my handler class?

Thanks
Mike


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 16, 2007 5:07 PM
To: Tomcat Users List
Subject: Re: Need my Protocol to be Seen in Tomcat!!

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mike,

Version numbers?

Mike Wannamaker wrote:
> So now we put classes into commons/lib/...

Er... common/lib  ?

> and we add a global resource to server.xml that starts our services.

[snip]

> have debugged into the URL code and it can't find my class because
> tomcat must put a classloader between the jvm classloader and my
> classes loaded in tomcat. Because URL is loaded in the parent
> classloader it can't find classes in the child classloader.

Have you tried putting your protocol handler into shared/lib instead of
common/lib? common/lib is for webapps to share. shared/lib is for both
webapps /and/ Tomcat to share.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPhSJ9CaO5/Lv0PARAukKAJ0VwO78eMLIC4Bk575R0BGvp5zXkACdFMNO
1jPpRrcsvxSaEIWmH5b6MM8=
=gRma
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need my Protocol to be Seen in Tomcat!!

2007-11-16 Thread Mike Wannamaker
Hi I need some help.

 

I have a Handler class for my protocol.  Before we embedded tomcat in
our own "App Server" like runtime.  This handler class could be loaded.
But now we were forced to change to install into tomcat.  So now we put
classes into commons/lib/... and we add a global resource to server.xml
that starts our services.  This all works fine except now my protocol
can't be loaded.  We use new URL("myprotocol:\\..."); and this throws an
exception because it now can't find the handler class.  I have debugged
into the URL code and it can't find my class because tomcat must put a
classloader between the jvm classloader and my classes loaded in tomcat.
Because URL is loaded in the parent classloader it can't find classes in
the child classloader.  

 

My question is how can I get this to work?  There is a
DirContextURLStreamHandlerFactory that tomcat installs as the stream
handler factory used in URL class, is there a way to add my handler
there?  We had a similar idea where this static factory class had a
addURLStreamHandler(sProtocol, sClass); method.

 

Any help is appreciated.

 

Thanks Mike



Filter Like behaviour within Tomcat Itself?

2006-09-22 Thread Mike Wannamaker

What I would like to do is have something registered with Tomcat so that all
requests that come to all contexts, or configured per context, will first go
through this class before even getting to the applications servlets/filtes.

This itself would act much like a Filter does, but I don't want to have to
enforce all web apps to setup the filter, just want to do it at Tomcat level
with apps even knowing.

Thanks

--ekiM

--
Every man should believe in something, and I believe I will have another
beer!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



URIEncoding and POSTS

2006-09-12 Thread Mike Wannamaker

I can specify URIEncoding="UTF-8" in Tomcat's connector settings within the
server.xml file. Now, my Tomcat server correctly reads the URL GET
parameters correctly...sending out "Hello, José!" or "Hello, 田中!" as
expected. 

However, there's still a problem.

What if I want to POST some non-ASCII data, presumably to enter into a
backend database? All is well since I set that URIEncoding flag, right?
Wrong. It turns out that Tomcat, doesn't use this URIEncoding flag for
POSTed form data. So, what does it use? ISO-8859-1 of course! So now, I'm
back to where I started, and my imaginary application still greets Mr. ç”°ä¸
instead of Mr. 田中. Not good.

Why is this so?  Can I get the POST to behave the same as the GET??

Mike Wannamaker
Senior Software Developer 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Shared code but different pages on different virtual hosts? W AS: RE: BOOBIES!

2006-07-21 Thread Mike Wannamaker
Can't you just put the jar files into tomcat/shared/lib

Mike Wannamaker
Senior Software Developer 
Hummingbird Ltd.
552 Princess St, Kingston, ON, K7L 1C7
Tel: (613) 548-4355 x4535
Fax (613) 548-7801
E-Mail: Mike Wannamaker
 
www.hummingbird.com
 
IMPORTANT NOTICE: This communication is privileged and contains confidential
information for the sole use of the intended recipient(s). Any unauthorized
disclosure, copying or use of this communication is strictly prohibited. If
you have received this message in error, please contact the sender and
delete this message without printing it or otherwise retaining a copy.

-Original Message-
From: Harris, Thomas [mailto:[EMAIL PROTECTED] 
Sent: July 21, 2006 2:19 PM
To: Tomcat Users List
Subject: Shared code but different pages on different virtual hosts? WAS:
RE: BOOBIES!


I wanted to have multiple web applications defined, all using the same
core Java code, but each having different JSP and tag file folders. I
tried following the example in the Tomcat Wiki at
http://wiki.apache.org/tomcat/CreateVirtualHosts, but it assumes all the
web apps have the same JSP and tag files, inside a WAR. I would like to
package up all of the common code for all the sites in a WAR file, then
point each separate web app to private JSP and tag file folders. What I
was trying to determine is:

1. Is it even possible?
2. If so, how could it be done?

As for the subject line, my previous email sat with the subject "Shared
code but different pages on different virtual hosts?" for two weeks
without a single response, and I'm still waiting so that my project can
continue down it's path. No offense is meant, and it should be pretty
obvious, I think, that I just wanted a little attention for my issue.
Sorry for any offense it may have caused.

Tom

-Original Message-----
From: Mike Wannamaker [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 2:09 PM
To: 'Tomcat Users List'
Subject: RE: BOOBIES!

I believe the subject was posted under different subject heading with no
response and he's trying to get people looking at it, which I'm sure he
will now.

That said, some proper netiquette is appreciated in forums.

I believe that I'm doing something similar, but using a different
approach.
I too want to have some common resources that all webapps use.  To do
this I'm installing my own FileDirContext for web apps which I inject
what we call aliases.

IE:  /basefiles = /home/tomcat/basefiles

Thus when someone in the webapp makes a request for
/basefiles/common.css it looks it up in /home/tomcat/basefiles, which is
outside of any web app context.

Is this what you want to do?

Mike Wannamaker

-Original Message-
From: Mead, Jennifer L - VSCM [mailto:[EMAIL PROTECTED]
Sent: July 21, 2006 2:01 PM
To: Tomcat Users List
Subject: RE: BOOBIES!

Could this person (inject other undesirable word) please consider the
fact that women are in the user's group also.  

Jennifer 

-Original Message-
From: Harris, Thomas [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 10:59 AM
To: users@tomcat.apache.org
Subject: BOOBIES!


I have been trying to determine how to configure Tomcat 5.5.17 to have a
shared appBase on multiple webapps, but have a different set of JSPs for
each web app. I've followed the Wiki's CreateVirtualHosts page to
configure multiple webapps that use exactly the same WAR file. But, I
would like to share the Java, but supply a different docBase for each
site. Is this possible?

Reference:
http://wiki.apache.org/tomcat/CreateVirtualHosts

Thanks!

Tom Harris

"This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution"

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


"This communication is intended solely for the addressee and is confidential
and not for third party unauthorized distribution"

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: BOOBIES!

2006-07-21 Thread Mike Wannamaker
I believe the subject was posted under different subject heading with no
response and he's trying to get people looking at it, which I'm sure he will
now.

That said, some proper netiquette is appreciated in forums.

I believe that I'm doing something similar, but using a different approach.
I too want to have some common resources that all webapps use.  To do this
I'm installing my own FileDirContext for web apps which I inject what we
call aliases.

IE:  /basefiles = /home/tomcat/basefiles

Thus when someone in the webapp makes a request for /basefiles/common.css it
looks it up in /home/tomcat/basefiles, which is outside of any web app
context.

Is this what you want to do?

Mike Wannamaker

-Original Message-
From: Mead, Jennifer L - VSCM [mailto:[EMAIL PROTECTED] 
Sent: July 21, 2006 2:01 PM
To: Tomcat Users List
Subject: RE: BOOBIES!

Could this person (inject other undesirable word) please consider the
fact that women are in the user's group also.  

Jennifer 

-Original Message-
From: Harris, Thomas [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 10:59 AM
To: users@tomcat.apache.org
Subject: BOOBIES!


I have been trying to determine how to configure Tomcat 5.5.17 to have a
shared appBase on multiple webapps, but have a different set of JSPs for
each web app. I've followed the Wiki's CreateVirtualHosts page to
configure multiple webapps that use exactly the same WAR file. But, I
would like to share the Java, but supply a different docBase for each
site. Is this possible?

Reference:
http://wiki.apache.org/tomcat/CreateVirtualHosts

Thanks!

Tom Harris

"This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution"

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Loading TLD from JAR file?

2006-07-20 Thread Mike Wannamaker
Is it possible to have your tld files inside your jar file and then have
them loaded by tomcat?

Example: WEB-INF/lib/my.jar contains meta-inf/my.tld

Could I add an entry to my jsp or web.xml to load it from inside the jar
file on Tomcat 5.5.x?

Mike Wannamaker


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-18 Thread Mike Wannamaker
We do use JNDI, however every web app still needs to have the classes
available and I need some way to get the services into JNDI at startup.  I
don't want to have each web app do it.

I haven't looked at JavaEE or 2.5 spec however resource injection sounds
nice.

I think I'll look at Dave's suggestion with LifecycleListener interface.
This could be the easiest way for now.

Thanks

Mike Wannamaker

-Original Message-
From: Avi Deitcher [mailto:[EMAIL PROTECTED] 
Sent: July 18, 2006 10:19 AM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

Mike,

Have you thought of wrapping the connection to the container? If you
look at the interaction between any webapp and its container, there are
just a few key interaction points: servletcontext/filtercontext,
servletrequest, servletresponse, session, a few others. You can fairly
extend or wrap any of those, so that the webapp only gets /your
/versions, which provide the necessary services.

I know of a number of large enterprises that have done exactly that. I
run a small consulting, mostly focused on general operations and
technology (as opposed to specializing in middleware), but I have
considered getting into this space to advise around this.

The process is essentially as follows:
- determine exactly which services these applications expect, abstracted
from their container, and how they expect to get them
- map out all the interaction points between the app and its container
(see above)
- wrap what is necessary and provide interfaces

A slightly simpler way to do this, but requires some work in the webapps
themselves, is to make all the services available via JNDI, and let the
apps look up what they need from the JNDI. They then become abstract
from the container, and the middleware manager can put in place what
they need in JNDI, which has to be available in any Web container. This
becomes even easier in JavaEE and Servlet Spec 2.5, where resource
injection will be available.

Avi

Mike Wannamaker wrote:

>I'll try to be a little more specific.
>
>We have many groups within our company.  Portal (Ottawa Office), Document
>Management (Toronto Office), Collaboration (UK Office), Workflow (Toronto
>Office), BI-Reporting (Kingston Office)...
>
>All these different applications have web pieces as well as their own
server
>pieces possibly.  Meaning a few are just plain web apps, some have server
>components as well.
>
>All these components will be built on top of our core services.  Meaning
>that our core services will handle certain aspects for applications to
>abstract away the application server we are on JBoss, WebLogic etc, and to
>provide certain services that all will use/need. 
>
>One of these services obviously will be deployment of these applications
>into our core services layer.  Other services will be user authentication,
>component messaging, configuration of applications, logging for
>applications, a cluster wide locking service, cluster wide singleton
>service, Database Access Layer, Common Scheduler service, a job/task
>executor service which manages resources within the system, a mobility
>messaging service, as well as a common web UI library and common
>administration layer.
>
>We also have a services layer that these other groups will write services
>and plug into it in order to start their services.  
>
>I already have this working on our own app server, as well as JBoss. 
>
>However, we would also like to support possibly straight Tomcat no app
>server.  But to do that I need the same idea that JBoss provides, a way to
>start up something before starting the web apps.  I thought possibly
>something added to the server.xml to get another component to start.
>
>I don't want to have to change the individual web apps because remember
they
>aren't supposed to know what they are running on.  And I also need to have
>these classes available for all web applications on the tomcat server so I
>can't load them within a separate web app because Tomcat ClassLoading won't
>allow you to get at the classes then.
>
>So basically I have a class
>
>public class CoreServicesTomcat extends ???TomcatSomethingOrOther
>{
>   public void start()
>   {
>   RealCoreServices.start();
>   }
>
>   public void stop();
>   {
>   RealCoreServices.stop();
>   }
>}
>
>I hope this clarifies things.
>
>Mike Wannamaker
>
>-Original Message-
>From: Timothy Collett [mailto:[EMAIL PROTECTED] 
>Sent: July 17, 2006 4:14 PM
>To: Tomcat Users List
>Subject: Re: Tomcat Not An App Server
>
>On Jul 17, 2006, at 4:06 PM, Martin Gainty wrote:
>
>  
>
>>commons/lib is for CATALINA specific implementations as well as any  
>>jar'ed versions of new Ja

RE: Tomcat Not An App Server

2006-07-18 Thread Mike Wannamaker
I'll try to be a little more specific.

We have many groups within our company.  Portal (Ottawa Office), Document
Management (Toronto Office), Collaboration (UK Office), Workflow (Toronto
Office), BI-Reporting (Kingston Office)...

All these different applications have web pieces as well as their own server
pieces possibly.  Meaning a few are just plain web apps, some have server
components as well.

All these components will be built on top of our core services.  Meaning
that our core services will handle certain aspects for applications to
abstract away the application server we are on JBoss, WebLogic etc, and to
provide certain services that all will use/need. 

One of these services obviously will be deployment of these applications
into our core services layer.  Other services will be user authentication,
component messaging, configuration of applications, logging for
applications, a cluster wide locking service, cluster wide singleton
service, Database Access Layer, Common Scheduler service, a job/task
executor service which manages resources within the system, a mobility
messaging service, as well as a common web UI library and common
administration layer.

We also have a services layer that these other groups will write services
and plug into it in order to start their services.  

I already have this working on our own app server, as well as JBoss. 

However, we would also like to support possibly straight Tomcat no app
server.  But to do that I need the same idea that JBoss provides, a way to
start up something before starting the web apps.  I thought possibly
something added to the server.xml to get another component to start.

I don't want to have to change the individual web apps because remember they
aren't supposed to know what they are running on.  And I also need to have
these classes available for all web applications on the tomcat server so I
can't load them within a separate web app because Tomcat ClassLoading won't
allow you to get at the classes then.

So basically I have a class

public class CoreServicesTomcat extends ???TomcatSomethingOrOther
{
public void start()
{
RealCoreServices.start();
}

public void stop();
{
RealCoreServices.stop();
}
}

I hope this clarifies things.

Mike Wannamaker

-Original Message-
From: Timothy Collett [mailto:[EMAIL PROTECTED] 
Sent: July 17, 2006 4:14 PM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

On Jul 17, 2006, at 4:06 PM, Martin Gainty wrote:

> commons/lib is for CATALINA specific implementations as well as any  
> jar'ed versions of new Jasper compiler(s)
> http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

I was given the impression that it was more generally the place to  
put anything that is required by the container itself, as well as the  
webapps.

> Can you provide a quick overview of the desired outcome for this  
> effort

The desired outcome is to have something that can start up as soon as  
Tomcat is started, rather than on the first client request, and not  
be attached to any particular webapp.  At least, that's how I see it.

But, as I've said before, I'm relatively new at this, and am willing  
to be contradicted, as long as I'm also educated ;-)

Timothy Collett

--

Stay the patient course
Of little worth is your ire
The network is down
~haiku~


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-17 Thread Mike Wannamaker

I believe you and Martin are saying the same thing.  I could do that however
I would need my jar file to be in $TOMCAT_HOME/shared/lib probably.  I can't
have each different web app starting new instances of the services.
Services are only started once be Tomcat Server.

I thought maybe it was possible to add something to server.xml to get a
component to startup.  Perhaps I'd have it implement a Tomcat Interface but
I could do that and then have it only start once per Tomcat Instance.

Either way I need my jar in $TOMCAT_HOME/shared/lib.  That is the one I put
it in right?  Not $TOMCAT_HOME/common/lib?

Mike Wannamaker

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: July 17, 2006 12:39 PM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

Mike,

> What I've done is ripped out our core services from our internal app
server
> and provided an app server connector layer.  The idea is that we'll be
able
> to plug into any app server like container.  Our own internal, JBoss,
> WebSphere, Tomcat???
> 
> That is the idea.  So we have customers that may have tomcat installed and
> perhaps they would like to utilize that instead of installing another app
> server.

That is perfectly reasonable.

Here's a suggestion: create a new webapp that doesn't actually have any
servlets. Just create a ContextListener that responds to START and STOP
requests, and use the listener to startup your services.

web.xml in each webapp can specify the order of servlets coming into
service... I'd imagine that Tomcat can be configured to load this
"services" webapp before all other webapps are loaded, so that those
services are available.

Would this meet your needs?

-chris




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-17 Thread Mike Wannamaker

Thanks Timothy,

I'm actually looking more for a way to do it with Tomcat out of the box.
Like if a customer has Tomcat installed, I would just want to put my jars
into some lib directory and then add this ??? entry into this ??? xml file
and it will call start() on your class?  

Would it be possible for me to have a Valve to do this?  Forgive me for my
ignorance, but I don't know the tomcat architecture that well yet, just what
little I've read.  As long as it starts before the web apps that is all I
need.

Mike Wannamaker

-Original Message-
From: Timothy Collett [mailto:[EMAIL PROTECTED] 
Sent: July 17, 2006 8:26 AM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

On Jul 17, 2006, at 8:17 AM, Mike Wannamaker wrote:
> So I would like to be able to somehow have Tomcat start our core  
> services, much the way that JBoss would, before loading any web apps.
>
> Does anyone have any ideas on how that could be accomplished.

My guess (which should be taken with a grain of salt, as I'm  
relatively new at this myself) is you want to subclass StandardHost  
or StandardEngine, and have the start() method initialize your core  
services, and the stop() method shut them down.

If subclassing those is as easy as subclassing StandardContext was  
for me, it should be as simple as calling super.start() and super.stop 
() then calling whatever initialization methods you need to run.

Timothy Collett

--

No man is justified in doing evil on the ground of expediency.
  - Theodore Roosevelt



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-17 Thread Mike Wannamaker
I would love to just use JBoss, but there is a lot of political red-tape and
we even have our own App Server, which too is not J2EE compliant.  It was
probably developed before JBoss and the like.  We even had our own Web
Container, but I've recently replaced it with Tomcat.

What I've done is ripped out our core services from our internal app server
and provided an app server connector layer.  The idea is that we'll be able
to plug into any app server like container.  Our own internal, JBoss,
WebSphere, Tomcat???

That is the idea.  So we have customers that may have tomcat installed and
perhaps they would like to utilize that instead of installing another app
server.  So I would like to be able to somehow have Tomcat start our core
services, much the way that JBoss would, before loading any web apps.

Does anyone have any ideas on how that could be accomplished. 

Mike Wannamaker

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: July 13, 2006 4:55 PM
To: Tomcat Users List
Subject: RE: Tomcat Not An App Server

How do your webapps communicate with the core services?

cheers,

David


  |
|
  |   To:   "'Tomcat Users List'" 
|
  |   cc:
|
  |   Subject:  RE: Tomcat Not An App Server
|



Sorry guys I didn't mean to offend anyone.  I know that Tomcat offers a lot
but what I meant is as you said, it's not a full J2EE App Server, like
JBoss, WebSphere ...

What I have is a large enterprise application that does have a web
application.  In fact it has many.  These web apps rely on our core
services
to be running.  Within JBoss etc I can install this as an EAR or SAR and
JBoss will start it.

I was wondering if there is anything in Tomcat like that, were my Core
Services could get loaded/started before the tomcat web container loads the
web apps.  Thus I wouldn't have to code anything into the web apps
themselves to try and start it.

TIA

Mike Wannamaker

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: July 13, 2006 4:05 PM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

Tomcat's not really an app server?  Geee really, I feel so inadequate
now. :-(

Seriously, I think I've seen this religious war around here somewhere
and it really depends on definition.  No, it's not a full J2EE
container, but it's definitely an app server in my opinion.

Have you read the servlet spec and thought about the
ServletContextListener for handling the start/shutdown of a component
within your app?

--David

Mike Wannamaker wrote:

>I know that Tomcat is not really an App Server like JBoss etc... However,
if
>I had a component that was not a web application and I wanted to start it
>inside tomcat how could I do that ?
>
>Is there some configuration file I would need to add something to in order
>to have a component started and would I need to implement some Tomcat
>interface to do it?
>
>TIA
>Mike Wannamaker
>
>
>-
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-13 Thread Mike Wannamaker
Sorry guys I didn't mean to offend anyone.  I know that Tomcat offers a lot
but what I meant is as you said, it's not a full J2EE App Server, like
JBoss, WebSphere ...

What I have is a large enterprise application that does have a web
application.  In fact it has many.  These web apps rely on our core services
to be running.  Within JBoss etc I can install this as an EAR or SAR and
JBoss will start it.

I was wondering if there is anything in Tomcat like that, were my Core
Services could get loaded/started before the tomcat web container loads the
web apps.  Thus I wouldn't have to code anything into the web apps
themselves to try and start it.

TIA

Mike Wannamaker

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: July 13, 2006 4:05 PM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

Tomcat's not really an app server?  Geee really, I feel so inadequate 
now. :-(

Seriously, I think I've seen this religious war around here somewhere 
and it really depends on definition.  No, it's not a full J2EE 
container, but it's definitely an app server in my opinion.

Have you read the servlet spec and thought about the 
ServletContextListener for handling the start/shutdown of a component 
within your app?

--David

Mike Wannamaker wrote:

>I know that Tomcat is not really an App Server like JBoss etc... However,
if
>I had a component that was not a web application and I wanted to start it
>inside tomcat how could I do that ?
>
>Is there some configuration file I would need to add something to in order
>to have a component started and would I need to implement some Tomcat
>interface to do it?
>
>TIA
>Mike Wannamaker
>
>
>-
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Not An App Server

2006-07-13 Thread Mike Wannamaker
I know that Tomcat is not really an App Server like JBoss etc... However, if
I had a component that was not a web application and I wanted to start it
inside tomcat how could I do that ?

Is there some configuration file I would need to add something to in order
to have a component started and would I need to implement some Tomcat
interface to do it?

TIA
Mike Wannamaker


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Installing My Own DirContext

2006-07-11 Thread Mike Wannamaker
Does anyone have any input on this?

What I want is through some config settings install my own DirContext.class
so that when the web app is trying to get resources like pages, it'll use my
DirContext to try to find them.  This way I can have some common files
located outside each web application and not have to have them installed
within the web app itself.

IE:  My DirContext will provide aliasing so that I can do this Alias
"login=c:\tomcat\webres\login"  so that a request to something like
http://myapp/mycontext/login/login.jsp will be given to my DirContext class
and I'll look for c:\tomcat\webres\login\login.jsp and return it if found.

Mike Wannamaker


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Running Tomcat Embedded

2006-07-11 Thread Mike Wannamaker
Thanks Bill,

I've looked at that and we actually have it running that way.  What I'm
looking for is a way to duplicate org.apache.catalina.startup.Bootstrap
class in my own startup.  I believe that JBoss does something similar?  What
I really want to do is get my version of Tomcat that I startup to work like
starting Tomcat manually.  I want it to read the server.xml and context.xml
files for web apps.  

Is this possible?

Mike Wannamaker
Senior Software Developer 
Hummingbird Ltd.
552 Princess St, Kingston, ON, K7L 1C7
Tel: (613) 548-4355 x4535
Fax (613) 548-7801
E-Mail: Mike Wannamaker
 
www.hummingbird.com
 
IMPORTANT NOTICE: This communication is privileged and contains confidential
information for the sole use of the intended recipient(s). Any unauthorized
disclosure, copying or use of this communication is strictly prohibited. If
you have received this message in error, please contact the sender and
delete this message without printing it or otherwise retaining a copy.
-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED] 
Sent: July 10, 2006 11:44 PM
To: users@tomcat.apache.org
Subject: Re: Running Tomcat Embedded


"Mike Wannamaker" <[EMAIL PROTECTED]> wrote in 
message 
news:[EMAIL PROTECTED]
>I wish to run Tomcat from within my own JVM.  I would like it to run just
> like Tomcat does today, however I'd just like to setup the various paths,
> for like web app root directory, config directory, lib directory etc
>
> Is there anyway to do this easily?  Like I said I just want to create an
> instance of Tomcat/Catalina and setProperties(...); and then call start();
>
> Any help is appreciated.
>

Most people use Embedded 
(http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catali
na/startup/Embedded.html) 
since it at least has some documentation.  Commons-modeler has a simple (if 
slightly out of date :) example of how to embed Tomcat using JMX.  This is 
useful if you want Tomcat to run in a different ClassLoader than the rest of

your application (and at least personally, I find it easier to use).

In either case, you need to set the properties on the sub-components (e.g. 
Engine, Host, Contex(s)) yourself, so you are responsible for creating them.

>
> Mike Wannamaker
> Senior Software Developer
> Hummingbird Ltd.
> 552 Princess St, Kingston, ON, K7L 1C7
> Tel: (613) 548-4355 x4535
> Fax (613) 548-7801
> E-Mail: Mike Wannamaker
>
> www.hummingbird.com
>
> IMPORTANT NOTICE: This communication is privileged and contains 
> confidential
> information for the sole use of the intended recipient(s). Any 
> unauthorized
> disclosure, copying or use of this communication is strictly prohibited. 
> If
> you have received this message in error, please contact the sender and
> delete this message without printing it or otherwise retaining a copy.
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Running Tomcat Embedded

2006-07-10 Thread Mike Wannamaker
I wish to run Tomcat from within my own JVM.  I would like it to run just
like Tomcat does today, however I'd just like to setup the various paths,
for like web app root directory, config directory, lib directory etc

Is there anyway to do this easily?  Like I said I just want to create an
instance of Tomcat/Catalina and setProperties(...); and then call start();

Any help is appreciated.


Mike Wannamaker
Senior Software Developer 
Hummingbird Ltd.
552 Princess St, Kingston, ON, K7L 1C7
Tel: (613) 548-4355 x4535
Fax (613) 548-7801
E-Mail: Mike Wannamaker
 
www.hummingbird.com
 
IMPORTANT NOTICE: This communication is privileged and contains confidential
information for the sole use of the intended recipient(s). Any unauthorized
disclosure, copying or use of this communication is strictly prohibited. If
you have received this message in error, please contact the sender and
delete this message without printing it or otherwise retaining a copy.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Installing My Own DirContext

2006-07-10 Thread Mike Wannamaker
I'm not sure I understand.  That shows installed applications?

What I want is through some config settings install my own DirContext.class
so that when the web app is trying to get resources like pages, it'll use my
DirContext to try to find them.  This way I can have some common files
located outside each web application and not have to have them installed
within the web app itself.

IE:  My DirContext will provide aliasing so that I can do this Alias
"login=c:\tomcat\webres\login"  so that a request to something like
http://myapp/mycontext/login/login.jsp will be given to my DirContext class
and I'll look for c:\tomcat\webres\login\login.jsp and return it if found.

Mike Wannamaker
Senior Software Developer 
Hummingbird Ltd.
552 Princess St, Kingston, ON, K7L 1C7
Tel: (613) 548-4355 x4535
Fax (613) 548-7801
E-Mail: Mike Wannamaker
 
www.hummingbird.com
 
IMPORTANT NOTICE: This communication is privileged and contains confidential
information for the sole use of the intended recipient(s). Any unauthorized
disclosure, copying or use of this communication is strictly prohibited. If
you have received this message in error, please contact the sender and
delete this message without printing it or otherwise retaining a copy.

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: July 10, 2006 9:28 AM
To: [EMAIL PROTECTED]
Cc: Tomcat Users List
Subject: Re: Installing My Own DirContext

Good Morning Mike

For listing applications and determining properties/attributes for each take
a look at the features and functions available thru the Manager webapp
http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#List%20Currently%
20Deployed%20and%20Installed%20Applications

HTH,
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Mike Wannamaker" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" 
Sent: Monday, July 10, 2006 8:29 AM
Subject: Installing My Own DirContext


> Hi,
> 
> I need to be able to install my own DirContext into all applications that
> start within Tomcat so that I can get content that is outside the web app
> globally for all web apps. Also I would like to be able to install one as
> well for each web app independent of each other.
> 
> How would I go about doing this?
> 
> Mike Wannamaker
> Senior Software Developer 
> Hummingbird Ltd.
> 552 Princess St, Kingston, ON, K7L 1C7
> Tel: (613) 548-4355 x4535
> Fax (613) 548-7801
> E-Mail: Mike Wannamaker
> 
> www.hummingbird.com
> 
> IMPORTANT NOTICE: This communication is privileged and contains
confidential
> information for the sole use of the intended recipient(s). Any
unauthorized
> disclosure, copying or use of this communication is strictly prohibited.
If
> you have received this message in error, please contact the sender and
> delete this message without printing it or otherwise retaining a copy.
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Installing My Own DirContext

2006-07-10 Thread Mike Wannamaker
Hi,

I need to be able to install my own DirContext into all applications that
start within Tomcat so that I can get content that is outside the web app
globally for all web apps. Also I would like to be able to install one as
well for each web app independent of each other.

How would I go about doing this?

Mike Wannamaker
Senior Software Developer 
Hummingbird Ltd.
552 Princess St, Kingston, ON, K7L 1C7
Tel: (613) 548-4355 x4535
Fax (613) 548-7801
E-Mail: Mike Wannamaker
 
www.hummingbird.com
 
IMPORTANT NOTICE: This communication is privileged and contains confidential
information for the sole use of the intended recipient(s). Any unauthorized
disclosure, copying or use of this communication is strictly prohibited. If
you have received this message in error, please contact the sender and
delete this message without printing it or otherwise retaining a copy.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]