RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
   
   I'm trying a different path that will reduce the breakage 
 and make /admin
   work with embeded as well.
   Basically I'm creating the Service and Server, even for 
 embeded ( where only
   engine is used ). That will make the model consistent - 
 even if Server and Service
   are barely used.
   

Is the embedded working in 5.0?
I've kill myself trying to make that operable, and the only one I've
succeeded is the 4.0.6, but only when I put the entire distribution in a
single jar or unpack all the classes, or make a 4k classpath.

By the way, can we make a build for 5.0 that will be like sun's j2ee?

MT.


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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   
   I'm trying a different path that will reduce the breakage
 and make /admin
   work with embeded as well.
   Basically I'm creating the Service and Server, even for
 embeded ( where only
   engine is used ). That will make the model consistent -
 even if Server and Service
   are barely used.
   
 
 Is the embedded working in 5.0?
 I've kill myself trying to make that operable, and the only one I've
 succeeded is the 4.0.6, but only when I put the entire distribution in a
 single jar or unpack all the classes, or make a 4k classpath.

 By the way, can we make a build for 5.0 that will be like sun's j2ee?

What do you mean ? A single jar ? I don't think that's a good idea :-)
( but it should work, as well as a flat jar directory - that's what 
embed uses )

If you execute the emebed target in tomcat5, you'll get an embed/
dir, and inside you'll have a lib/ with an ( almost ) minimal set
of jars - you can rejar them in a single jar if you really want.

The tomcat-ant.xml file is a sample on how to embed tomcat - all you
have to do is to make the same JMX calls in your favorite application
( where you embed tomcat ).

In other words - you'll need to create o.a.commons.modeler.BaseModelMBean
components, with a String constructor ( the name of the tomcat class ). Then
set all the attributes you want, and call init()/start().

Get it first working with ant, it's easier.

It works for me :-)

Costin


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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
 If you execute the emebed target in tomcat5, you'll get an 
 embed/ dir, and inside you'll have a lib/ with an ( almost ) 
 minimal set of jars - you can rejar them in a single jar if 
 you really want.
 

What I ment was a catalina.bat or catalina.sh embedded
calling o.a.c.s.Embedded

 The tomcat-ant.xml file is a sample on how to embed tomcat - 
 all you have to do is to make the same JMX calls in your 
 favorite application ( where you embed tomcat ).
 
 In other words - you'll need to create 
 o.a.commons.modeler.BaseModelMBean
 components, with a String constructor ( the name of the 
 tomcat class ). Then set all the attributes you want, and 
 call init()/start().
 
 Get it first working with ant, it's easier.
 

I'll try.

 It works for me :-)
 
Cool ;-)

MT.


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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
 
 Just wanted to let you know that the new embedded in 5.0 is great. 
 Costin (and I, to some extent) got it running with JBoss 3.2 
 without any 
 problem. The big advantage is that it's just like Tomcat standalone, 
 except it also implements the Embedded API. The big trick however is 
 that if the embbedding component uses JMX already, you can do 
 everything 
 using MBeans. It's really cool :)
 

Well that's great, can you send some cookbook?

I'd like to make a class for JK2 that will call the embedded TC from
_dirty_ JVM, something like LouncherBootstrap.
The class will be in that case be injected in JVM from class file itself
using DefineClass.


MT.



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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 What I ment was a catalina.bat or catalina.sh embedded
 calling o.a.c.s.Embedded

I think Embedded class should be deprecated in 5.0, and all
'embedding' should be done via JMX.

I haven't tested Embedded recently ( but it was working about a 
week ago ). 

You can create your own main() ( or use the small startup class in
modeler ) and load an mbeans.xml file. 

Controlling everything via JMX is much more flexible and powerfull
than using wrappers or helpers like Embedded.

Costin


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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 
 
 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 
 Just wanted to let you know that the new embedded in 5.0 is great.
 Costin (and I, to some extent) got it running with JBoss 3.2
 without any
 problem. The big advantage is that it's just like Tomcat standalone,
 except it also implements the Embedded API. The big trick however is
 that if the embbedding component uses JMX already, you can do
 everything
 using MBeans. It's really cool :)
 
 
 Well that's great, can you send some cookbook?
 
 I'd like to make a class for JK2 that will call the embedded TC from
 _dirty_ JVM, something like LouncherBootstrap.
 The class will be in that case be injected in JVM from class file itself
 using DefineClass.

Sounds complicated :-) What is a 'dirty' JVM ? And what's the use case ?

For JK2, the code is already organized as almost independent MBeans - 
and in time we should increase this - ChannelSocket and many other
pieces should be made completely reusable ( for example it would be nice
to use it for HTTP as well ). 

JkMain was the model for the modeler Main - and I'll try to write a 
modeler source that supports a simple .properties ( jk2.properties is a sort
of mbeans.xml - and JkMain loades sort-of mbeans )

Costin


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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
You may notice that the JNDI stuff is not yet finished, and I haven't tested
the authentication ( JAAS realm works fine with our LoginModule, but it may
still have some non-standard behaviors it relies on ). Well - I wrote the 
code that would support the more sane pattern used by jboss for Principals
( the Group named roles ), but it needs to be tested.

Costin

Remy Maucherat wrote:

 Mladen Turk wrote:
 
-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]

Just wanted to let you know that the new embedded in 5.0 is great.
Costin (and I, to some extent) got it running with JBoss 3.2
without any
problem. The big advantage is that it's just like Tomcat standalone,
except it also implements the Embedded API. The big trick however is
that if the embbedding component uses JMX already, you can do
everything
using MBeans. It's really cool :)

 
 
 Well that's great, can you send some cookbook?
 
 I'd like to make a class for JK2 that will call the embedded TC from
 _dirty_ JVM, something like LouncherBootstrap.
 The class will be in that case be injected in JVM from class file itself
 using DefineClass.
 
 
 Here's the JBoss integration class. This should give you an idea.
 Note that the class can be compiled independently of TC 5. Zero coupling
 :)
 
 Costin is awesome :-D
 Well, except when he's doing build related stuff, of course ;-)
 
 Remy



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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
  What I ment was a catalina.bat or catalina.sh embedded calling 
  o.a.c.s.Embedded
 
 I think Embedded class should be deprecated in 5.0, and all 
 'embedding' should be done via JMX.
 
 I haven't tested Embedded recently ( but it was working about a 
 week ago ). 
 
 You can create your own main() ( or use the small startup 
 class in modeler ) and load an mbeans.xml file. 
 
 Controlling everything via JMX is much more flexible and 
 powerfull than using wrappers or helpers like Embedded.
 

Well what I want to do is TC distribution from JK2 point of view, where
I will install the TC into the web server, and not adapt the web server
to Tomcat.

Want I need is a single java class that will be loaded from bytes,
launch the 'light' TC without it's own http server, set all the
configuration from workers2.properties, ... Think you follow me.

The problem is that all that has to be able to start from _dirty_ JVM,
meaning that the web server already has loaded JVM, with the different
classpath from the one that I want.

Do you have some leads on that?

MT.


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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
  What I ment was a catalina.bat or catalina.sh embedded calling
  o.a.c.s.Embedded
 
 I think Embedded class should be deprecated in 5.0, and all
 'embedding' should be done via JMX.
 
 I haven't tested Embedded recently ( but it was working about a
 week ago ).
 
 You can create your own main() ( or use the small startup
 class in modeler ) and load an mbeans.xml file.
 
 Controlling everything via JMX is much more flexible and
 powerfull than using wrappers or helpers like Embedded.
 
 
 Well what I want to do is TC distribution from JK2 point of view, where
 I will install the TC into the web server, and not adapt the web server
 to Tomcat.
 
 Want I need is a single java class that will be loaded from bytes,
 launch the 'light' TC without it's own http server, set all the
 configuration from workers2.properties, ... Think you follow me.
 
 The problem is that all that has to be able to start from _dirty_ JVM,
 meaning that the web server already has loaded JVM, with the different
 classpath from the one that I want.
 
 Do you have some leads on that?

Well - you need at least something in the classpath :-) That something can
create a class loader with all the other jars - and call a method inside.

What you should call is Registry.loadMBeans() or ant or something like that
- which in turn will load an mbeans.xml file ( either ant tasks or just
extended mlet or even plain mlet ).

The target is to allow it to start with only jmx.jar, commons-modeler.jar,
an xml parser - but I need to implement a class loader in modeler ( so
classpath can be declared in mbeans.xml ). If you use ant as JMX controler
- that should work fine - and you'll need ant.jar. jmx.jar,
commons-modeler.jar and a parser in your path.

Costin   










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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
 Well - you need at least something in the classpath :-) That 
 something can create a class loader with all the other jars - 
 and call a method inside.


Why?
The java/lang/ClassLoader is all that I have.

 What you should call is Registry.loadMBeans() or ant or 
 something like that
 - which in turn will load an mbeans.xml file ( either ant 
 tasks or just extended mlet or even plain mlet ).
 

No .xml  co., all the config is set by the JNI.

 The target is to allow it to start with only jmx.jar, 
 commons-modeler.jar, an xml parser - but I need to implement 
 a class loader in modeler ( so classpath can be declared in 
 mbeans.xml ). If you use ant as JMX controler
 - that should work fine - and you'll need ant.jar. jmx.jar, 
 commons-modeler.jar and a parser in your path.
 

Remember I don't have nothing in the classpath.
I'm trying to start the TC simply with the following:

java SomeClass

MT.


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