Re: [JBoss-dev] Remote class loading servlet

2003-02-21 Thread Peter Antman
On Fri, 2003-02-21 at 16:52, James Cooley wrote:
> Hi Peter,
> 
>   This was not a requirement for the servlet and I haven't included it - 
> see previous mails. Scott is deciding how we will integrate the servlet 
> into the JBoss startup script and retire the WebService. He might best 
> explain how this will be addressed.

Ok. If there are no new ways of adding the classloader of EJB:s deployed
through an ear with a scoped repository this means that dynamic rmi
classloading will not work for these EJB:s as far as I can see it.

//Peter
> 
> Rgds,
> 
> James
> 
> Peter Antman wrote:
> > Hi,
> > just curious: will this work with a scoped ear-deployer. How are EJBS:
> > deployed from within a scoped ear-deployer made available to the servlet
> > classloader? With WebService this was done through addClassLoader(), but
> > how is it done in this servlet aproach?
> > 
> > //Peter
> > 
> > On Mon, 2003-02-17 at 19:33, James Cooley wrote:
> > 
> >>Hi Dain,
> >>
> >>   I wrote a servlet (attached) and it looks like it will simplify
> >>things.
> >>
> >>It effectively replaces WebService and WebServer (WebService
> >>simply wraps WebServer). WebClassLoader doesn't have a dependency on
> >>WebServ* so it can operate as normal. I ran the DynLoadingUnitTestCase
> >>and it passes. Funnily enough it passes if it succeeds with
> >>./build.sh -Dtest=jrmp tests-client-unit
> >>but fails with
> >>./build.sh -Dtest=jrmp test
> >>I think this is how it's supposed to be called at any rate.
> >>
> >>A couple of points:
> >>
> >>1. I didn't implement addClassLoader - AFAIK Scott said we will use the
> >>servlets class loader to retrieve all classes. Removing addClassLoader
> >>doesn't appear to cause a problem.
> >>2. The WebServ* classes should be removed.
> >>3. run.sh/run.bat will have to be updated with  
> >>-Djava.rmi.server.codebase=http://localhost:8080/class-loader/
> >>4. Do we need to have a jmx service for this?
> >>
> >>I've been working on the 3.2 branch but it should work with 4.0. I have
> >>been using my own xdoclet ant script to build it as a .war - do you want
> >>me to use another deployment script as a template?
> >>
> >>I'll have some time over the next couple of days to write a compliant 
> >>build script and make any other changes you may want.
> >>
> >>James
> >>
> >>Dain Sundstrom wrote:
> >>
> >>>We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
> >>>a custom lightweight web server (port 8083) that returns java class 
> >>>files from the classLoader.getResouceAsStream to RMI clients (this is 
> >>>how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
> >>>and we think it is a good idea to replace this with a plain old Servlet 
> >>>for JBoss 4.0 so it can work with regular security, pooling and such.  
> >>>This is a fairly simple piece of code and shouldn't take longer then a 
> >>>day or two.  If you are interested the code can be found in 
> >>>jboss-head/server/src/main/org/jboss/web/WebServer.java
> >>>
> >>>-dain
> >>>
> >>>
> >>>
> >>>---
> >>>This SF.NET email is sponsored by:
> >>>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> >>>http://www.vasoftware.com
> >>>___
> >>>Jboss-development mailing list
> >>>[EMAIL PROTECTED]
> >>>https://lists.sourceforge.net/lists/listinfo/jboss-development
> >>>
> >>>
> >>
> >>
> >>
> >>
> > 
> > 
> >>/* JBoss, the OpenSource J2EE webOS
> >> *
> >> * Distributable under LGPL license.
> >> * See terms of license at gnu.org.
> >> */
> >>
> >>package org.jboss.web;
> >>
> >>import javax.servlet.ServletException;
> >>import javax.servlet.ServletConfig;
> >>import javax.servlet.http.HttpServlet;
> >>import javax.servlet.http.HttpServletRequest;
> >>import javax.servlet.http.HttpServletResponse;
> >>import java.io.IOException;
> >>import java.io.InputStream;
> >>import org.jboss.logging.Logger;
> >>import org.jboss.util.stream.Streams;
> >>
> >>/**
> >> * The HTTPClassLoader Servlet's primary purpose is to simplify dynamic 
>class-loading in RMI.
> >> *
> >> * It can serve any file that is available, including class-files.
> >> * This is a replacement for the WebServer class in this package. 
> >> * 
> >> * @web.servlet
> >> * display-name="JBoss HTTPClassLoaderServlet"
> >> * load-on-startup="1"
> >> * name="HTTPClassLoaderServlet"
> >> *
> >> * @web.servlet-mapping
> >> * url-pattern="/*"
> >> *
> >> * @link org.jboss.test.jrmp.test.DynLoadingUnitTestCase
> >> * @see http://java.sun.com/j2se/1.4/docs/guide/rmi/codebase.html
> >> *
> >> * @author  mailto:[EMAIL PROTECTED]";>James Cooley
> >> */
> >>
> >>public class HTTPClassLoaderServlet extends HttpServlet
> >>{
> >>  
> >>   // Constants -
> >>   
> >>   // Attributes 
> >>   private static Logger log = Lo

Re: [JBoss-dev] Remote class loading servlet

2003-02-21 Thread James Cooley
Hi Peter,

 This was not a requirement for the servlet and I haven't included it - 
see previous mails. Scott is deciding how we will integrate the servlet 
into the JBoss startup script and retire the WebService. He might best 
explain how this will be addressed.

Rgds,

James

Peter Antman wrote:
Hi,
just curious: will this work with a scoped ear-deployer. How are EJBS:
deployed from within a scoped ear-deployer made available to the servlet
classloader? With WebService this was done through addClassLoader(), but
how is it done in this servlet aproach?

//Peter

On Mon, 2003-02-17 at 19:33, James Cooley wrote:


Hi Dain,

  I wrote a servlet (attached) and it looks like it will simplify
things.

It effectively replaces WebService and WebServer (WebService
simply wraps WebServer). WebClassLoader doesn't have a dependency on
WebServ* so it can operate as normal. I ran the DynLoadingUnitTestCase
and it passes. Funnily enough it passes if it succeeds with
	./build.sh -Dtest=jrmp tests-client-unit
but fails with
	./build.sh -Dtest=jrmp test
I think this is how it's supposed to be called at any rate.

A couple of points:

1. I didn't implement addClassLoader - AFAIK Scott said we will use the
servlets class loader to retrieve all classes. Removing addClassLoader
doesn't appear to cause a problem.
2. The WebServ* classes should be removed.
3. run.sh/run.bat will have to be updated with 		
	-Djava.rmi.server.codebase=http://localhost:8080/class-loader/
4. Do we need to have a jmx service for this?

I've been working on the 3.2 branch but it should work with 4.0. I have
been using my own xdoclet ant script to build it as a .war - do you want
me to use another deployment script as a template?

I'll have some time over the next couple of days to write a compliant 
build script and make any other changes you may want.

James

Dain Sundstrom wrote:

We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
a custom lightweight web server (port 8083) that returns java class 
files from the classLoader.getResouceAsStream to RMI clients (this is 
how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
and we think it is a good idea to replace this with a plain old Servlet 
for JBoss 4.0 so it can work with regular security, pooling and such.  
This is a fairly simple piece of code and shouldn't take longer then a 
day or two.  If you are interested the code can be found in 
jboss-head/server/src/main/org/jboss/web/WebServer.java

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development










/* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/

package org.jboss.web;

import javax.servlet.ServletException;
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import org.jboss.logging.Logger;
import org.jboss.util.stream.Streams;

/**
* The HTTPClassLoader Servlet's primary purpose is to simplify dynamic class-loading in RMI.
*
* It can serve any file that is available, including class-files.
* This is a replacement for the WebServer class in this package. 
* 
* @web.servlet
* display-name="JBoss HTTPClassLoaderServlet"
* load-on-startup="1"
* name="HTTPClassLoaderServlet"
*
* @web.servlet-mapping
* url-pattern="/*"
*
* @link org.jboss.test.jrmp.test.DynLoadingUnitTestCase
* @see http://java.sun.com/j2se/1.4/docs/guide/rmi/codebase.html
*
* @author  mailto:[EMAIL PROTECTED]";>James Cooley
*/

public class HTTPClassLoaderServlet extends HttpServlet
{
 
  // Constants -
  
  // Attributes 
  private static Logger log = Logger.getLogger(HTTPClassLoaderServlet.class);

  public static final String CONTENT_TYPE = "application/binary";


  public void init(ServletConfig conf) throws ServletException
  {
 super.init(conf);
  }
  
  /**
   * Called by the server (via the service method) to allow a servlet to handle a POST request.
   * The HTTP POST method allows the client to send data of unlimited length to the Web server
   * a single time and is useful when posting information such as credit card numbers.
   */
  public void doPost(HttpServletRequest request, HttpServletResponse response)
 throws IOException, ServletException
  {
 log.trace("post called");
 doGet(request, response);
  }

  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException
  {   
 String filePath = null;
 boolea

Re: [JBoss-dev] Remote class loading servlet

2003-02-21 Thread Peter Antman
Hi,
just curious: will this work with a scoped ear-deployer. How are EJBS:
deployed from within a scoped ear-deployer made available to the servlet
classloader? With WebService this was done through addClassLoader(), but
how is it done in this servlet aproach?

//Peter

On Mon, 2003-02-17 at 19:33, James Cooley wrote:
> Hi Dain,
> 
>I wrote a servlet (attached) and it looks like it will simplify
> things.
> 
> It effectively replaces WebService and WebServer (WebService
> simply wraps WebServer). WebClassLoader doesn't have a dependency on
> WebServ* so it can operate as normal. I ran the DynLoadingUnitTestCase
> and it passes. Funnily enough it passes if it succeeds with
>   ./build.sh -Dtest=jrmp tests-client-unit
> but fails with
>   ./build.sh -Dtest=jrmp test
> I think this is how it's supposed to be called at any rate.
> 
> A couple of points:
> 
> 1. I didn't implement addClassLoader - AFAIK Scott said we will use the
> servlets class loader to retrieve all classes. Removing addClassLoader
> doesn't appear to cause a problem.
> 2. The WebServ* classes should be removed.
> 3. run.sh/run.bat will have to be updated with
>   -Djava.rmi.server.codebase=http://localhost:8080/class-loader/
> 4. Do we need to have a jmx service for this?
> 
> I've been working on the 3.2 branch but it should work with 4.0. I have
> been using my own xdoclet ant script to build it as a .war - do you want
> me to use another deployment script as a template?
> 
> I'll have some time over the next couple of days to write a compliant 
> build script and make any other changes you may want.
> 
> James
> 
> Dain Sundstrom wrote:
> > We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
> > a custom lightweight web server (port 8083) that returns java class 
> > files from the classLoader.getResouceAsStream to RMI clients (this is 
> > how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
> > and we think it is a good idea to replace this with a plain old Servlet 
> > for JBoss 4.0 so it can work with regular security, pooling and such.  
> > This is a fairly simple piece of code and shouldn't take longer then a 
> > day or two.  If you are interested the code can be found in 
> > jboss-head/server/src/main/org/jboss/web/WebServer.java
> > 
> > -dain
> > 
> > 
> > 
> > ---
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> > 
> 
> 
> 
> 

> /* JBoss, the OpenSource J2EE webOS
>  *
>  * Distributable under LGPL license.
>  * See terms of license at gnu.org.
>  */
> 
> package org.jboss.web;
> 
> import javax.servlet.ServletException;
> import javax.servlet.ServletConfig;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import java.io.IOException;
> import java.io.InputStream;
> import org.jboss.logging.Logger;
> import org.jboss.util.stream.Streams;
> 
> /**
>  * The HTTPClassLoader Servlet's primary purpose is to simplify dynamic 
>class-loading in RMI.
>  *
>  * It can serve any file that is available, including class-files.
>  * This is a replacement for the WebServer class in this package. 
>  * 
>  * @web.servlet
>  * display-name="JBoss HTTPClassLoaderServlet"
>  * load-on-startup="1"
>  * name="HTTPClassLoaderServlet"
>  *
>  * @web.servlet-mapping
>  * url-pattern="/*"
>  *
>  * @link org.jboss.test.jrmp.test.DynLoadingUnitTestCase
>  * @see http://java.sun.com/j2se/1.4/docs/guide/rmi/codebase.html
>  *
>  * @author  mailto:[EMAIL PROTECTED]";>James Cooley
>  */
> 
> public class HTTPClassLoaderServlet extends HttpServlet
> {
>   
>// Constants -
>
>// Attributes 
>private static Logger log = Logger.getLogger(HTTPClassLoaderServlet.class);
> 
>public static final String CONTENT_TYPE = "application/binary";
> 
> 
>public void init(ServletConfig conf) throws ServletException
>{
>   super.init(conf);
>}
>
>/**
> * Called by the server (via the service method) to allow a servlet to handle a 
>POST request.
> * The HTTP POST method allows the client to send data of unlimited length to the 
>Web server
> * a single time and is useful when posting information such as credit card 
>numbers.
> */
>public void doPost(HttpServletRequest request, HttpServletResponse response)
>   throws IOException, ServletException
>{
>   log.trace("post called");
>   doGet(request, response);
>}
> 
>public void doGet(HttpServletRequest request, HttpServletResponse

RE: [JBoss-dev] Remote class loading servlet

2003-02-17 Thread Bill Burke
I think this deserves CVS access.  James, can you send me your sourceforge
id?  Then you can commit this yourself.

Regards,

Bill

p.s. [EMAIL PROTECTED]



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of James
> Cooley
> Sent: Monday, February 17, 2003 1:34 PM
> To: [EMAIL PROTECTED]; Dain Sundstrom
> Subject: Re: [JBoss-dev] Remote class loading servlet
>
>
> Hi Dain,
>
>I wrote a servlet (attached) and it looks like it will simplify
> things.
>
> It effectively replaces WebService and WebServer (WebService
> simply wraps WebServer). WebClassLoader doesn't have a dependency on
> WebServ* so it can operate as normal. I ran the DynLoadingUnitTestCase
> and it passes. Funnily enough it passes if it succeeds with
>   ./build.sh -Dtest=jrmp tests-client-unit
> but fails with
>   ./build.sh -Dtest=jrmp test
> I think this is how it's supposed to be called at any rate.
>
> A couple of points:
>
> 1. I didn't implement addClassLoader - AFAIK Scott said we will use the
> servlets class loader to retrieve all classes. Removing addClassLoader
> doesn't appear to cause a problem.
> 2. The WebServ* classes should be removed.
> 3. run.sh/run.bat will have to be updated with
>   -Djava.rmi.server.codebase=http://localhost:8080/class-loader/
> 4. Do we need to have a jmx service for this?
>
> I've been working on the 3.2 branch but it should work with 4.0. I have
> been using my own xdoclet ant script to build it as a .war - do you want
> me to use another deployment script as a template?
>
> I'll have some time over the next couple of days to write a compliant
> build script and make any other changes you may want.
>
> James
>
> Dain Sundstrom wrote:
> > We have a small project open for a volunteer.  In Jboss 2 and 3 we have
> > a custom lightweight web server (port 8083) that returns java class
> > files from the classLoader.getResouceAsStream to RMI clients (this is
> > how remote class loading happens).  I talked to Scott at JBoss
> Boot Camp
> > and we think it is a good idea to replace this with a plain old Servlet
> > for JBoss 4.0 so it can work with regular security, pooling and such.
> > This is a fairly simple piece of code and shouldn't take longer then a
> > day or two.  If you are interested the code can be found in
> > jboss-head/server/src/main/org/jboss/web/WebServer.java
> >
> > -dain
> >
> >
> >
> > ---
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> >
>
>
>



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-17 Thread James Cooley
Hi Dain,

  I wrote a servlet (attached) and it looks like it will simplify
things.

It effectively replaces WebService and WebServer (WebService
simply wraps WebServer). WebClassLoader doesn't have a dependency on
WebServ* so it can operate as normal. I ran the DynLoadingUnitTestCase
and it passes. Funnily enough it passes if it succeeds with
	./build.sh -Dtest=jrmp tests-client-unit
but fails with
	./build.sh -Dtest=jrmp test
I think this is how it's supposed to be called at any rate.

A couple of points:

1. I didn't implement addClassLoader - AFAIK Scott said we will use the
servlets class loader to retrieve all classes. Removing addClassLoader
doesn't appear to cause a problem.
2. The WebServ* classes should be removed.
3. run.sh/run.bat will have to be updated with 		
	-Djava.rmi.server.codebase=http://localhost:8080/class-loader/
4. Do we need to have a jmx service for this?

I've been working on the 3.2 branch but it should work with 4.0. I have
been using my own xdoclet ant script to build it as a .war - do you want
me to use another deployment script as a template?

I'll have some time over the next couple of days to write a compliant 
build script and make any other changes you may want.

James

Dain Sundstrom wrote:
We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
a custom lightweight web server (port 8083) that returns java class 
files from the classLoader.getResouceAsStream to RMI clients (this is 
how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
and we think it is a good idea to replace this with a plain old Servlet 
for JBoss 4.0 so it can work with regular security, pooling and such.  
This is a fairly simple piece of code and shouldn't take longer then a 
day or two.  If you are interested the code can be found in 
jboss-head/server/src/main/org/jboss/web/WebServer.java

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





/* JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package org.jboss.web;

import javax.servlet.ServletException;
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import org.jboss.logging.Logger;
import org.jboss.util.stream.Streams;

/**
 * The HTTPClassLoader Servlet's primary purpose is to simplify dynamic class-loading 
in RMI.
 *
 * It can serve any file that is available, including class-files.
 * This is a replacement for the WebServer class in this package. 
 * 
 * @web.servlet
 * display-name="JBoss HTTPClassLoaderServlet"
 * load-on-startup="1"
 * name="HTTPClassLoaderServlet"
 *
 * @web.servlet-mapping
 * url-pattern="/*"
 *
 * @link org.jboss.test.jrmp.test.DynLoadingUnitTestCase
 * @see http://java.sun.com/j2se/1.4/docs/guide/rmi/codebase.html
 *
 * @author  mailto:[EMAIL PROTECTED]";>James Cooley
 */

public class HTTPClassLoaderServlet extends HttpServlet
{
  
   // Constants -
   
   // Attributes 
   private static Logger log = Logger.getLogger(HTTPClassLoaderServlet.class);

   public static final String CONTENT_TYPE = "application/binary";


   public void init(ServletConfig conf) throws ServletException
   {
  super.init(conf);
   }
   
   /**
* Called by the server (via the service method) to allow a servlet to handle a 
POST request.
* The HTTP POST method allows the client to send data of unlimited length to the 
Web server
* a single time and is useful when posting information such as credit card numbers.
*/
   public void doPost(HttpServletRequest request, HttpServletResponse response)
  throws IOException, ServletException
   {
  log.trace("post called");
  doGet(request, response);
   }

   public void doGet(HttpServletRequest request, HttpServletResponse response) throws 
ServletException
   {   
  String filePath = null;
  boolean traceOn = log.isTraceEnabled();
  response.setContentType(CONTENT_TYPE);
  try
  {
 String servletRoot = request.getContextPath(); 
 int startOfFilePath = servletRoot.length() + 1; // +1 to get the trailing "/"
 String rawPath = request.getRequestURI().substring(startOfFilePath);
 boolean usesJBossProtocol = rawPath.indexOf(']') > 0;
 if(usesJBossProtocol)
filePath = extractClassName(rawPath);
 else
filePath = rawPath;
 
 if (traceOn)
 {
log.trace("servl

Re: [JBoss-dev] Remote class loading servlet

2003-02-12 Thread Scott M Stark
Drop it in the deploy directory like everything else and add the
java.rmi.server.codebase=http://localhost:8080/class-loader/ system
property in the server.


Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: "James Cooley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 12, 2003 8:58 AM
Subject: Re: [JBoss-dev] Remote class loading servlet


> On further testing the ExportException went away but I'd still like to 
> know how to plugin the servlet.
> 
> James
> 
> James Cooley wrote:
> > Hi Dain, Scott,
> > 
> > I wrote a servlet that accepts a request from a java.net.URLClassLoader 
> > and returns the class. AFAIK I need only support requests of the kind
> > org/jboss/util/stream/Streams.class
> > but the exising WebServer class also supports
> > 
> >  "SomeClassName[some/object/id]/some/file/path"
> > 
> > I can't find where this protocol is defined elsewhere - please point me 
> > at the spec if we need to support it - I'm a bit blind as to what we 
> > need as you can see from the next question ...
> > 
> > I created a class-loader.war and I tried running the JRMP tests with
> > 
> > ./testsuite/build.sh 
> > -Djava.rmi.server.codebase=http://localhost:8080/class-loader/ 
> > -Dtest=jrmp test
> > 
> > but it doesn't work and I get
> > 
> >  ERROR [JRMPInvoker] Starting failed: java.rmi.server.ExportException: 
> > Port already in use: 4447;
> > 
> > What am I doing wrong? How can I test this.
> > 
> > James
> > 
> > Dain Sundstrom wrote:
> > 
> >> We have a small project open for a volunteer.  In Jboss 2 and 3 we 
> >> have a custom lightweight web server (port 8083) that returns java 
> >> class files from the classLoader.getResouceAsStream to RMI clients 
> >> (this is how remote class loading happens).  I talked to Scott at 
> >> JBoss Boot Camp and we think it is a good idea to replace this with a 
> >> plain old Servlet for JBoss 4.0 so it can work with regular security, 
> >> pooling and such.  This is a fairly simple piece of code and shouldn't 
> >> take longer then a day or two.  If you are interested the code can be 
> >> found in jboss-head/server/src/main/org/jboss/web/WebServer.java
> >>
> >> -dain
> >>
> >>
> >>
> >> ---
> >> This SF.NET email is sponsored by:
> >> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> >> http://www.vasoftware.com
> >> ___
> >> Jboss-development mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/jboss-development
> >>
> >>
> > 
> > 
> > 
> > 
> > ---
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> > 
> 
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-12 Thread Francisco Reverbel
You won't find this in the servlet spec. 

"SomeClassName[some/object/id]/some/file/path" is a JBoss convention
for specifying Java classes and resources dynamically downloaded by
clients. It is used by org.jboss.web.WebClassLoader and by 
org.jboss.iiop.WebCL. See comments in

  server/src/main/org/jboss/web/WebServer.java

See also

  server/src/main/org/jboss/web/WebClassLoader.java 
  iiop/src/main/org/jboss/iiop/WebCL.java

Cheers,

Francisco

On Wed, 12 Feb 2003, James Cooley wrote:

> Hi Dain, Scott,
> 
> I wrote a servlet that accepts a request from a java.net.URLClassLoader 
> and returns the class. AFAIK I need only support requests of the kind
>   org/jboss/util/stream/Streams.class
> but the exising WebServer class also supports
> 
>   "SomeClassName[some/object/id]/some/file/path"
> 
> I can't find where this protocol is defined elsewhere - please point me 
> at the spec if we need to support it - I'm a bit blind as to what we 
> need as you can see from the next question ...
> 
> I created a class-loader.war and I tried running the JRMP tests with
> 
> ./testsuite/build.sh 
> -Djava.rmi.server.codebase=http://localhost:8080/class-loader/ 
> -Dtest=jrmp test
> 
> but it doesn't work and I get
> 
>   ERROR [JRMPInvoker] Starting failed: java.rmi.server.ExportException: 
> Port already in use: 4447;
> 
> What am I doing wrong? How can I test this.
> 
> James
> 
> Dain Sundstrom wrote:
> > We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
> > a custom lightweight web server (port 8083) that returns java class 
> > files from the classLoader.getResouceAsStream to RMI clients (this is 
> > how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
> > and we think it is a good idea to replace this with a plain old Servlet 
> > for JBoss 4.0 so it can work with regular security, pooling and such.  
> > This is a fairly simple piece of code and shouldn't take longer then a 
> > day or two.  If you are interested the code can be found in 
> > jboss-head/server/src/main/org/jboss/web/WebServer.java
> > 
> > -dain
> > 
> > 
> > 
> > ---
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> > 
> 
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-12 Thread James Cooley
On further testing the ExportException went away but I'd still like to 
know how to plugin the servlet.

James

James Cooley wrote:
Hi Dain, Scott,

I wrote a servlet that accepts a request from a java.net.URLClassLoader 
and returns the class. AFAIK I need only support requests of the kind
org/jboss/util/stream/Streams.class
but the exising WebServer class also supports

 "SomeClassName[some/object/id]/some/file/path"

I can't find where this protocol is defined elsewhere - please point me 
at the spec if we need to support it - I'm a bit blind as to what we 
need as you can see from the next question ...

I created a class-loader.war and I tried running the JRMP tests with

./testsuite/build.sh 
-Djava.rmi.server.codebase=http://localhost:8080/class-loader/ 
-Dtest=jrmp test

but it doesn't work and I get

 ERROR [JRMPInvoker] Starting failed: java.rmi.server.ExportException: 
Port already in use: 4447;

What am I doing wrong? How can I test this.

James

Dain Sundstrom wrote:

We have a small project open for a volunteer.  In Jboss 2 and 3 we 
have a custom lightweight web server (port 8083) that returns java 
class files from the classLoader.getResouceAsStream to RMI clients 
(this is how remote class loading happens).  I talked to Scott at 
JBoss Boot Camp and we think it is a good idea to replace this with a 
plain old Servlet for JBoss 4.0 so it can work with regular security, 
pooling and such.  This is a fairly simple piece of code and shouldn't 
take longer then a day or two.  If you are interested the code can be 
found in jboss-head/server/src/main/org/jboss/web/WebServer.java

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development







---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-12 Thread James Cooley
Hi Dain, Scott,

I wrote a servlet that accepts a request from a java.net.URLClassLoader 
and returns the class. AFAIK I need only support requests of the kind
	org/jboss/util/stream/Streams.class
but the exising WebServer class also supports

 "SomeClassName[some/object/id]/some/file/path"

I can't find where this protocol is defined elsewhere - please point me 
at the spec if we need to support it - I'm a bit blind as to what we 
need as you can see from the next question ...

I created a class-loader.war and I tried running the JRMP tests with

./testsuite/build.sh 
-Djava.rmi.server.codebase=http://localhost:8080/class-loader/ 
-Dtest=jrmp test

but it doesn't work and I get

 ERROR [JRMPInvoker] Starting failed: java.rmi.server.ExportException: 
Port already in use: 4447;

What am I doing wrong? How can I test this.

James

Dain Sundstrom wrote:
We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
a custom lightweight web server (port 8083) that returns java class 
files from the classLoader.getResouceAsStream to RMI clients (this is 
how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
and we think it is a good idea to replace this with a plain old Servlet 
for JBoss 4.0 so it can work with regular security, pooling and such.  
This is a fairly simple piece of code and shouldn't take longer then a 
day or two.  If you are interested the code can be found in 
jboss-head/server/src/main/org/jboss/web/WebServer.java

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-08 Thread Francisco Reverbel
The IIOP tests also rely on remote class loading. They should
still work after the simple web server is replaced by a servlet.
(The *-iiop tests run on a server with configuration 'all'.)

Cheers,

Francisco


On Fri, 7 Feb 2003, Scott M Stark wrote:

> There is a dynamic class loading unit test:
> org.jboss.test.jrmp.test.DynLoadingUnitTestCase
> 
> 
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> 
> 
> - Original Message - 
> From: "Dain Sundstrom" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 07, 2003 11:50 AM
> Subject: Re: [JBoss-dev] Remote class loading servlet
> 
> 
> > On Friday, February 7, 2003, at 01:28 PM, James Cooley wrote:
> > 
> > > Dain Sundstrom wrote:
> > >> Scott,
> > >> I'm putting the question for you at the top, so you can see it.  How 
> > >> do we specify the code base for remote loading?  If James writes this 
> > >> he will need to change it to point to the servlet.
> > >> James,
> > >> You are way over thinking this.
> > >
> > > As I said there isn't a unit test for this so I guess it looked like 
> > > it was doing more than it was doing in reality.
> > 
> > Good idea. Can you add a unit test for this also?  :)
> > 
> > -dain
> > 
> > 
> > 
> > ---
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread Scott M Stark
There is a dynamic class loading unit test:
org.jboss.test.jrmp.test.DynLoadingUnitTestCase


Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: "Dain Sundstrom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 11:50 AM
Subject: Re: [JBoss-dev] Remote class loading servlet


> On Friday, February 7, 2003, at 01:28 PM, James Cooley wrote:
> 
> > Dain Sundstrom wrote:
> >> Scott,
> >> I'm putting the question for you at the top, so you can see it.  How 
> >> do we specify the code base for remote loading?  If James writes this 
> >> he will need to change it to point to the servlet.
> >> James,
> >> You are way over thinking this.
> >
> > As I said there isn't a unit test for this so I guess it looked like 
> > it was doing more than it was doing in reality.
> 
> Good idea. Can you add a unit test for this also?  :)
> 
> -dain
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread Dain Sundstrom
On Friday, February 7, 2003, at 01:28 PM, James Cooley wrote:


Dain Sundstrom wrote:

Scott,
I'm putting the question for you at the top, so you can see it.  How 
do we specify the code base for remote loading?  If James writes this 
he will need to change it to point to the servlet.
James,
You are way over thinking this.

As I said there isn't a unit test for this so I guess it looked like 
it was doing more than it was doing in reality.

Good idea. Can you add a unit test for this also?  :)

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread James Cooley
Dain Sundstrom wrote:

Scott,

I'm putting the question for you at the top, so you can see it.  How do 
we specify the code base for remote loading?  If James writes this he 
will need to change it to point to the servlet.



James,

You are way over thinking this.  

As I said there isn't a unit test for this so I guess it looked like it 
was doing more than it was doing in reality.

I suggest you just start coding. :D



Will do.



On Friday, February 7, 2003, at 10:40 AM, James Cooley wrote:


Scott M Stark wrote:


You don't have to worry about the port or interface as these are 
attributes of the
web server context the servlet is deployed to.


Okay the default container listens on 8080 from what you're saying 
there's no need to listen on 8083 anymore. I'm not sure how you'd map 
the WebServer replacement servlet in the web.xml if the port is not 
exclusive - perhaps a filter to check each call or something but 
that's a fair bit of overhead. So what I think is needed here are 2 
Tomcat Connectors/Jetty Adapters to one to bind to 8080 and another to 
bind to 8083 - the 8083 connector/adapter can be setup as part of the 
servlet containers config.


You create a war named say class-loader.  Then we set the codebase for 
remote stubs to be http://whatever:8080/class-loader [the question for 
Scott above].  Then create a servlet that accepts all requests to the 
context-root, convert the requested file (under your context-root) into 
a class name, and return that class from the thread context class loader.


Okay.


You don't have to worry about class loaders. Just use the thread 
context class
loader.


Sorry I wasn't clear on this - WebServer has the following method



You're sill trying too hard.  All of that code is already handled by the 
the Jetty or Tomcat web container in which your servlet is running.  It 
is really as simple as 
Thread().currentThread().getClassLoader().getResourceAsStream(name);


Okay, it looked like there was a lot more going on there.

Thanks,

James



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread Scott M Stark
Via the standard java.rmi.server.codebase system property. This is now set
by the WebService if it is not already set.


Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: "Dain Sundstrom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 10:59 AM
Subject: Re: [JBoss-dev] Remote class loading servlet


> Scott,
> 
> I'm putting the question for you at the top, so you can see it.  How do 
> we specify the code base for remote loading?  If James writes this he 
> will need to change it to point to the servlet.
> 
> 
> 
> James,
> 
> You are way over thinking this.  I suggest you just start coding. :D
> 
> On Friday, February 7, 2003, at 10:40 AM, James Cooley wrote:
> 
> > Scott M Stark wrote:
> >> You don't have to worry about the port or interface as these are 
> >> attributes of the
> >> web server context the servlet is deployed to.
> >
> > Okay the default container listens on 8080 from what you're saying 
> > there's no need to listen on 8083 anymore. I'm not sure how you'd map 
> > the WebServer replacement servlet in the web.xml if the port is not 
> > exclusive - perhaps a filter to check each call or something but 
> > that's a fair bit of overhead. So what I think is needed here are 2 
> > Tomcat Connectors/Jetty Adapters to one to bind to 8080 and another to 
> > bind to 8083 - the 8083 connector/adapter can be setup as part of the 
> > servlet containers config.
> 
> You create a war named say class-loader.  Then we set the codebase for 
> remote stubs to be http://whatever:8080/class-loader [the question for 
> Scott above].  Then create a servlet that accepts all requests to the 
> context-root, convert the requested file (under your context-root) into 
> a class name, and return that class from the thread context class 
> loader.
> 
> >> You don't have to worry about class loaders. Just use the thread 
> >> context class
> >> loader.
> >
> > Sorry I wasn't clear on this - WebServer has the following method
> 
> You're sill trying too hard.  All of that code is already handled by 
> the the Jetty or Tomcat web container in which your servlet is running. 
>   It is really as simple as 
> Thread().currentThread().getClassLoader().getResourceAsStream(name);
> 
> -dain
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread Dain Sundstrom
Scott,

I'm putting the question for you at the top, so you can see it.  How do 
we specify the code base for remote loading?  If James writes this he 
will need to change it to point to the servlet.



James,

You are way over thinking this.  I suggest you just start coding. :D

On Friday, February 7, 2003, at 10:40 AM, James Cooley wrote:

Scott M Stark wrote:

You don't have to worry about the port or interface as these are 
attributes of the
web server context the servlet is deployed to.

Okay the default container listens on 8080 from what you're saying 
there's no need to listen on 8083 anymore. I'm not sure how you'd map 
the WebServer replacement servlet in the web.xml if the port is not 
exclusive - perhaps a filter to check each call or something but 
that's a fair bit of overhead. So what I think is needed here are 2 
Tomcat Connectors/Jetty Adapters to one to bind to 8080 and another to 
bind to 8083 - the 8083 connector/adapter can be setup as part of the 
servlet containers config.

You create a war named say class-loader.  Then we set the codebase for 
remote stubs to be http://whatever:8080/class-loader [the question for 
Scott above].  Then create a servlet that accepts all requests to the 
context-root, convert the requested file (under your context-root) into 
a class name, and return that class from the thread context class 
loader.

You don't have to worry about class loaders. Just use the thread 
context class
loader.

Sorry I wasn't clear on this - WebServer has the following method


You're sill trying too hard.  All of that code is already handled by 
the the Jetty or Tomcat web container in which your servlet is running. 
 It is really as simple as 
Thread().currentThread().getClassLoader().getResourceAsStream(name);

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread James Cooley
Scott M Stark wrote:

You don't have to worry about the port or interface as these are attributes of the
web server context the servlet is deployed to.



Okay the default container listens on 8080 from what you're saying 
there's no need to listen on 8083 anymore. I'm not sure how you'd map 
the WebServer replacement servlet in the web.xml if the port is not 
exclusive - perhaps a filter to check each call or something but that's 
a fair bit of overhead. So what I think is needed here are 2 Tomcat 
Connectors/Jetty Adapters to one to bind to 8080 and another to bind to 
8083 - the 8083 connector/adapter can be setup as part of the servlet 
containers config.


You don't have to worry about class loaders. Just use the thread context class
loader.


Sorry I wasn't clear on this - WebServer has the following method


/** Add a class loader to the web server map and return the URL that
 should be used as the annotated codebase for classes that are to be
 available via RMI dynamic classloading. The codebase URL is formed by
 taking the java.rmi.server.codebase system property and adding a subpath
 unique for the class loader instance.

@see #getClassLoaderKey(ClassLoader)
@param cl, the ClassLoader instance to begin serving download requests for
@return the annotated codebase to use if java.rmi.server.codebase is set,
null otherwise.
*/
public URL addClassLoader(ClassLoader cl)


And it's called by WebService's


   /**
* @jmx:managed-operation
*/
   public URL addClassLoader(ClassLoader cl)
   {
  return server.addClassLoader(cl);
   }


Hope this clarifies my original points

James




Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: "James Cooley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 3:08 AM
Subject: Re: [JBoss-dev] Remote class loading servlet



Hi Dain,

 I had a look at the class and it looks like it should be pretty easy 
to do this in a servlet but the deployment may be an issue. The API 
includes setPort, setBindAddress, etc. Is there an abstract factory to 
create a Tomcat Connector/Jetty Adapter (or whatever the container may 
be) at runtime? If not is is okay to just default to 8083 and configure 
the port in the service xml config file?

The problem is also complicated by the fact that we need to add and 
remove ClassLoaders dynamically and WebService will no longer hold the 
instance of WebServer (unless there is an abstract factory).

You were looking for a volunteer and you get an essay :)

James


Dain Sundstrom wrote:

We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
a custom lightweight web server (port 8083) that returns java class 
files from the classLoader.getResouceAsStream to RMI clients (this is 
how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
and we think it is a good idea to replace this with a plain old Servlet 
for JBoss 4.0 so it can work with regular security, pooling and such.  
This is a fairly simple piece of code and shouldn't take longer then a 
day or two.  If you are interested the code can be found in 
jboss-head/server/src/main/org/jboss/web/WebServer.java

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development







---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread Scott M Stark
You don't have to worry about the port or interface as these are attributes of the
web server context the servlet is deployed to.

You don't have to worry about class loaders. Just use the thread context class
loader.


Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: "James Cooley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 3:08 AM
Subject: Re: [JBoss-dev] Remote class loading servlet


> Hi Dain,
> 
>   I had a look at the class and it looks like it should be pretty easy 
> to do this in a servlet but the deployment may be an issue. The API 
> includes setPort, setBindAddress, etc. Is there an abstract factory to 
> create a Tomcat Connector/Jetty Adapter (or whatever the container may 
> be) at runtime? If not is is okay to just default to 8083 and configure 
> the port in the service xml config file?
> 
> The problem is also complicated by the fact that we need to add and 
> remove ClassLoaders dynamically and WebService will no longer hold the 
> instance of WebServer (unless there is an abstract factory).
> 
> You were looking for a volunteer and you get an essay :)
> 
> James
> 
> 
> Dain Sundstrom wrote:
> > We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
> > a custom lightweight web server (port 8083) that returns java class 
> > files from the classLoader.getResouceAsStream to RMI clients (this is 
> > how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
> > and we think it is a good idea to replace this with a plain old Servlet 
> > for JBoss 4.0 so it can work with regular security, pooling and such.  
> > This is a fairly simple piece of code and shouldn't take longer then a 
> > day or two.  If you are interested the code can be found in 
> > jboss-head/server/src/main/org/jboss/web/WebServer.java
> > 
> > -dain
> > 
> > 
> > 
> > ---
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> > 
> 
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-07 Thread James Cooley
Hi Dain,

 I had a look at the class and it looks like it should be pretty easy 
to do this in a servlet but the deployment may be an issue. The API 
includes setPort, setBindAddress, etc. Is there an abstract factory to 
create a Tomcat Connector/Jetty Adapter (or whatever the container may 
be) at runtime? If not is is okay to just default to 8083 and configure 
the port in the service xml config file?

The problem is also complicated by the fact that we need to add and 
remove ClassLoaders dynamically and WebService will no longer hold the 
instance of WebServer (unless there is an abstract factory).

You were looking for a volunteer and you get an essay :)

James


Dain Sundstrom wrote:
We have a small project open for a volunteer.  In Jboss 2 and 3 we have 
a custom lightweight web server (port 8083) that returns java class 
files from the classLoader.getResouceAsStream to RMI clients (this is 
how remote class loading happens).  I talked to Scott at JBoss Boot Camp 
and we think it is a good idea to replace this with a plain old Servlet 
for JBoss 4.0 so it can work with regular security, pooling and such.  
This is a fairly simple piece of code and shouldn't take longer then a 
day or two.  If you are interested the code can be found in 
jboss-head/server/src/main/org/jboss/web/WebServer.java

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Remote class loading servlet

2003-02-06 Thread Scott M Stark
Dynamic class loading using the default rmi codebase will. You an always
override the codebase system property to vend classes anyway you want.


Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: "Igor Fedorenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 2:00 PM
Subject: RE: [JBoss-dev] Remote class loading servlet


Does this mean that JBoss 4.0 will require integrated web container to run?




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] Remote class loading servlet

2003-02-06 Thread Igor Fedorenko
Does this mean that JBoss 4.0 will require integrated web container to run?

> -Original Message-
> From: Dain Sundstrom [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 06, 2003 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-dev] Remote class loading servlet
> 
> 
> We have a small project open for a volunteer.  In Jboss 2 and 
> 3 we have 
> a custom lightweight web server (port 8083) that returns java class 
> files from the classLoader.getResouceAsStream to RMI clients (this is 
> how remote class loading happens).  I talked to Scott at JBoss Boot 
> Camp and we think it is a good idea to replace this with a plain old 
> Servlet for JBoss 4.0 so it can work with regular security, 
> pooling and 
> such.  This is a fairly simple piece of code and shouldn't 
> take longer 
> then a day or two.  If you are interested the code can be found in 
> jboss-head/server/src/main/org/jboss/web/WebServer.java
> 
> -dain


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development