Re: [JBoss-user] non embedded Tomcat vs. embedded Tomcat
see inline - Original Message - From: "John Menke" [EMAIL PROTECTED] What is the main reason for using embedded Tomcat? Embedded Tomcat will enable your servlets/jsp to access the ejb container within the same VM. This means that the invocation of methods will be intra-VM and extremely fast. Running tour jsp/servlets and your ejb container in spearate VMs will cause a remote method call which is a magnitude or more slower. Embedded Tomcat also gives you the ability to deploy an ear file that contains *both* ejbs and web apps. With Tomcat in separate VMs, webapps are deployed separately from the ejbs. IMHO, embedded Tomcat does not represent a "robust" environment. (Some ppl would argue that Tomcat itself does not represent a robust environment.) For a scalable architecture on a typical web site (static and dynamic targets), I would place Apache at the door and set up one or more tomcat engines to handle the servlet/jsp load. I would then deploy one or more ejb containers. As the load increases you can determine where the bottleneck is and deploy more VMs/Machines to address the need. Currently, Tomcat can be set up to load balance multiple containers against apache. I do not believe the jBoss can be effectively load balanced in the same manner. For example, to communicate to a jBoss server, you get access to the naming service. To do this, you have to hardcode the address of the naming service. Now jBoss will allow multiple containers to share the same naming service, however the service does not allow multiple beans to be deployed to this naming service. When the team addresses this deficiency, jBoss will have taken a huge step forward in failover/clustering support. If there are reasons for the integration, can I achieve the same results with an already existing Tomcat installation and, if so, how do I configure this? As I mentioned, I think running Tomcat in a separate VM makes more sense for any reasonably active web site. There is nothing really to configure. Obviously you need to provide the appropriate jndi properties to allow your servlet/jsp to contact the JNDI service of the ejb container. I would like to run the Java PetStore application and debug JBoss from inside JBuilder, does running a non-embedded version of Tomcat have any implications on either of these areas? When running Embedded Tomcat, you should be able to debug *both* your webapp *and* your ejbs simultaneously. When you separate Tomcat, you can still debug servlet/jsp code *and* ejbs, just not at the same time. Debug can occur remotely or not...your choice. jim ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] non embedded Tomcat vs. embedded Tomcat
Thanks Jim, That clears up allot of questions. The Petstore application uses an .ear file. Maybe if I break this file down into it's ejb and web components I can make it work with a separate Tomcat. As for JNDI, If I had a servlet or JSP page running in a separate Tomcat the call to instantiate the JNDI context would have to be changed in what way? The current examples for a JNDI inside a client show code like this: Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome"); How would the code in my servlet or JSP do this? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of James Cook Sent: Wednesday, April 18, 2001 9:17 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] "non" embedded Tomcat vs. embedded Tomcat see inline - Original Message - From: "John Menke" [EMAIL PROTECTED] What is the main reason for using embedded Tomcat? Embedded Tomcat will enable your servlets/jsp to access the ejb container within the same VM. This means that the invocation of methods will be intra-VM and extremely fast. Running tour jsp/servlets and your ejb container in spearate VMs will cause a remote method call which is a magnitude or more slower. Embedded Tomcat also gives you the ability to deploy an ear file that contains *both* ejbs and web apps. With Tomcat in separate VMs, webapps are deployed separately from the ejbs. IMHO, embedded Tomcat does not represent a "robust" environment. (Some ppl would argue that Tomcat itself does not represent a robust environment.) For a scalable architecture on a typical web site (static and dynamic targets), I would place Apache at the door and set up one or more tomcat engines to handle the servlet/jsp load. I would then deploy one or more ejb containers. As the load increases you can determine where the bottleneck is and deploy more VMs/Machines to address the need. Currently, Tomcat can be set up to load balance multiple containers against apache. I do not believe the jBoss can be effectively load balanced in the same manner. For example, to communicate to a jBoss server, you get access to the naming service. To do this, you have to hardcode the address of the naming service. Now jBoss will allow multiple containers to share the same naming service, however the service does not allow multiple beans to be deployed to this naming service. When the team addresses this deficiency, jBoss will have taken a huge step forward in failover/clustering support. If there are reasons for the integration, can I achieve the same results with an already existing Tomcat installation and, if so, how do I configure this? As I mentioned, I think running Tomcat in a separate VM makes more sense for any reasonably active web site. There is nothing really to configure. Obviously you need to provide the appropriate jndi properties to allow your servlet/jsp to contact the JNDI service of the ejb container. I would like to run the Java PetStore application and debug JBoss from inside JBuilder, does running a non-embedded version of Tomcat have any implications on either of these areas? When running Embedded Tomcat, you should be able to debug *both* your webapp *and* your ejbs simultaneously. When you separate Tomcat, you can still debug servlet/jsp code *and* ejbs, just not at the same time. Debug can occur remotely or not...your choice. jim ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] non embedded Tomcat vs. embedded Tomcat
- Original Message - From: "John Menke" [EMAIL PROTECTED] As for JNDI, If I had a servlet or JSP page running in a separate Tomcat the call to instantiate the JNDI context would have to be changed in what way? You have to get the jndi poperties for jBoss into the Tomcat server. This can be done a number of ways. The easiest is to add: -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.nam ing.provider.url=localhost:1099 to the startup call for Tomcat. You could also put these properties in a jndi.properties file and locate it anywhere in your classpath. Also you can hardcode System.setProperty() calls in your servlet code before you call new InitialContext(). The current examples for a JNDI inside a client show code like this: Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome"); How would the code in my servlet or JSP do this? This wouldn't change a bit. jim ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] non embedded Tomcat vs. embedded Tomcat
Sorry if I'm asking a stupid question, but it's not clear to me what the difference between embedded and non-embedded Tomcat configurations are. Is there any information on how to setup JBoss to work with a "non - embedded" Tomcat? I have Tomcat already installed on my webserver and would like to add JBoss for EJB processing. I don't want to install a new version of Tomcat via embedded-Tomcat for this reason. My questions are: What is the main reason for using embedded Tomcat? If there are reasons for the integration, can I achieve the same results with an already existing Tomcat installation and, if so, how do I configure this? I would like to run the Java PetStore application and debug JBoss from inside JBuilder, does running a non-embedded version of Tomcat have any implications on either of these areas? Thanks in advance for any help. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user