Re: Is there a kind of EJB container in Tomcat?
On Mon, Jun 20, 2005 at 05:50:47PM -0700, Wendy Smoak wrote: From: Kevin Kang (CSS) [EMAIL PROTECTED] I still have an issue about OpenEJB. 1. Is it an independent EJB Server for Tomcat? Is it necessary to install in Tomcat as a module or something else? This page gives various options for configuring OpenEJB with Tomcat: http://www.openejb.org/tomcat.html Careful with that page as it references 1.0 which is days away from being cut. In 0.9.2 you can embbed OpenEJB so that the ejbs are shared by all webapps (kind of like a big ear). The tomcat.html file inside the 0.9.2 release is far better for getting started. In 1.0 you can do that or have one instance of OpenEJB per webapp, e.g. you get your own private ejb container right there in your webapp classloader that no one else can mess with. You can't do both at the same time yet, though it would be easy for us to add that support. We chose not to just yet as it would require you to have a clear understanding of tomcat classloading. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TOMCAT with EJB??
On Mon, Jul 07, 2003 at 10:25:26PM -0700, vipul viz wrote: HI all I am using Tomcat 4. as an application server but it doesn't support EJB could any one tell me which is the best EJB Server available in the category of Open cource. i have found 2-3 like Jboss,OpenEJB , Jonas. but not sure which one to use for some commercial development There is a demo of Tomcat/OpenEJB running here if you wanted to poke around in it. Most people really like the JNDI browser and the Object invoker, both can save you a ton of time. http://www.openejb.info:8080 There are a couple of features I think are really nice for Tomcat/servlet people. You can use any Tomcat 4.x, 5.x (never tried 3.x) version you want, we don't bundle or embed Tomcat. You don't have to code explicit local interfaces just to get fast performance in a local setup, you can just use regular remote interfaces and just tell OpenEJB to shut-off the marshalling of parameters and return values. This last one is really nice as it will allow you to change your mind and run your app with the Servlets and EJBs in different machines without any code changes at all. You get the benefits of local performance without having to commit to in in code. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError -- solved
This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work. An actual path is required. - Some set it to point to the OpenEJB /bin directory. - The rest are usually typos in the path. Hope this helps everyone out. As an archive-searcher, I always appreciate finding emails like this. If anyone has any ideas on making the integration process even easier, I am all ears. -David -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:44 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib). The class file for org/openejb/OpenEJB is in the openejb-0.9.1.jar. Deploy that and you should be set (well, this error will go away, at least) . HTH, Jon Jeremy Whitlock wrote: Tomcat List, This might not be a Tomcat problem but I imagine that you might be able to help anyways. Every time I start Tomcat, I get this error: StandardContext[/openejb_loader-0.9.1]: Servlet /openejb_loader-0.9.1 threw load() exception javax.servlet.ServletException: Servlet.init() for servlet loader threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(Standard Wrapper.ja v a:962) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper .java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(Standa rdContext. j ava:3420) at org.apache.catalina.core.StandardContext.start(StandardContex t.java:360 8 ) at org.apache.catalina.core.ContainerBase.addChildInternal(Conta inerBase.j a va:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase .java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(Standar dHostDeplo y er.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig. java:502) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig. java:410) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostCon fig.java:3 6 8) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleS u pport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine. java:347) at org.apache.catalina.core.StandardService.start(StandardServic e.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer. java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
RE: java.lang.NoClassDefFoundError -- solved
Filip is correct, follow that advice. Also, once you deploy the EJB's into OpenEJB, just leave them in the OpenEJB beans directory. Don't copy the contents of you EJB jar into the webapps dir, ejbs are not simple libraries, they must stay in the EJB container. Putting them in the webapps classes dir or lib dir will just cause classloader issues. OpenEJB will make sure all your EJBs are visible all your Servlets and JSPs at run time. You can easily tell OpenEJB where to look for ejbs on your file system, but again, this shouldn't be the classes or lib directories of your webapp. You could create a directory under your WEB-INF dir called ejbs, then add that dir to your openejb.conf as such: Deployments dir=/usr/local/share/development/openejb/WEB-INF/ejbs / When you deploy, just leave of the -m or -c options as those will move or copy the ejb jar into the OpenEJB/beans directory. You want them to stay where they are, which is your new WEB-INF/ejbs directory. -David -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 2:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work
EJB from Tomcat
All, I wrote some time ago about the Tomcat/OpenEJB integration, which allows Tomcat users to start using EJBs from Tomcat without having to ditch your Tomcat installation and configuration. Just like Tomcat is typically plugged into other app servers, OpenEJB is a plug-in for Tomcat. Plugging it in isn't any harder than setting up a JDBC driver. Here is the article: http://www.onjava.com/pub/a/onjava/2003/02/12/ejb_tomcat.html Regards, David Blevins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EJB from Tomcat
Having never used the jboss tomcat bundle, I wouldn't be able to say. It is very different though. One thing different about this integration is that it isn't a bundle, it's the ability to add EJB functionality into any Tomcat version you want via a plug-in. Which means you don't have to convince anyone to switch platforms, etc. You can just plug in OpenEJB and try it out for a while, if you don't like it, just unplug it. No harm done. -David -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 9:05 AM To: Tomcat Users List Subject: Re: EJB from Tomcat Is this easier than using the jboss tomcat bundle? i will read the article when i get a chance andy On Thu, 2003-02-13 at 14:54, David Blevins wrote: All, I wrote some time ago about the Tomcat/OpenEJB integration, which allows Tomcat users to start using EJBs from Tomcat without having to ditch your Tomcat installation and configuration. Just like Tomcat is typically plugged into other app servers, OpenEJB is a plug-in for Tomcat. Plugging it in isn't any harder than setting up a JDBC driver. Here is the article: http://www.onjava.com/pub/a/onjava/2003/02/12/ejb_tomcat.html Regards, David Blevins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EJB from Tomcat
Right, this is an EJB container that is usable in Tomcat. The particularly neat thing is that the EJB container can run embedded *inside* the same VM as Tomcat. You can even configure OpenEJB to not marshal calls to EJBs, basically treating your remote interfaces as EJB 2.0 Local interfaces. In the end you get a single server that can run both servlets/jsp/ejb together in the same VM with local optimizations. -David -Original Message- From: Will Hartung [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 11:33 AM To: Tomcat Users List Subject: Re: EJB from Tomcat From: David Blevins [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 6:54 AM Subject: EJB from Tomcat All, I wrote some time ago about the Tomcat/OpenEJB integration, which allows Tomcat users to start using EJBs from Tomcat without having to ditch your Tomcat installation and configuration. Just like Tomcat is typically plugged into other app servers, OpenEJB is a plug-in for Tomcat. Plugging it in isn't any harder than setting up a JDBC driver. This was confusing, but I see now. I was confused because we use Tomcat everyday to talk to our EJB server. THIS is simply Yet Another EJB server, not some magic interface to connect Tomcat to an arbitrary EJB server. The connectivity from Tomcat to the EJB side is pretty straightforward, portable and should work if/when we try to connect to another app server. (Plus we've refactored everything so we should only have to change one file to handle any of the glue details). But, thanx for the article anyways! Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MacOS
You make me want to go out and pickup a titanium iBook, course, I've been drooling over those for a while A note on OSX Server and Open Source, there are few projects that ship with it by default. OpenEJB and OpenORB are used in WebObjects for EJB and CORBA support, so that explains them. I'm pretty sure Tomcat is there for the same reason, though I've never heard that first-hand from the WebObjects team -- never thought of asking. One thing of note is that in Linux it's fairly easy to upgrade the packages that ship with the platform by default. I'm not so sure it's as trivial in OSX Server. I'm interested to see where that goes -David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 11:23 AM To: Tomcat Users List Subject: Re: MacOS I dropped my PC for development work once I got on MacOSX (Nope I'm not aspiring to be in an Apple add) but it's worth exploring for those of you who are thinking about it. MacOSX is an excellent option for serving JSP and great Java platform in general. It gives Java a red carpet treatment for example it provides a decent class browser, tools to turn your Java apps into double-clickable apps, some Swing enhancements provide for the Aqua look and feel etc. The shipping JDK is 1.3.1 but 1.4.x is at it's final beta stages. I have used Tomcat 3.x and currently on 4.1.12, I personally prefer it to any version of Windows since it adds a gazillion cool things on top of its Unix implementation. However, If your are the proud vi type of developer then you may not care about UI tricks etc. But the core Unix is is there as expected. Some differences exist but nothing too dramatic. If interested, there's an excellent book out there by O'Reilly, MacOSX for Unix Geeks which describes these: http://www.oreilly.com/catalog/mosxgeeks/ As far as J2EE is concerned, all the Opensource J2EE apps that I come across so far perform as well as they would in any other Unix i.e. JBoss, OpenEJB, Tomcat, Jetty, Apache -but this is just a gut feel assessment, I have no formal metrics. On Thursday, November 21, 2002, at 09:37 AM, Martin Redington wrote: On Thursday, November 21, 2002, at 01:31 PM, Martin Jacobson wrote: Felipe Schnack wrote: Anyone have experience with Tomcat on MacOS X servers? Or with java in general? I would like to know if these machines are good options for serving jsp or I should stick with PCs... I'm running Apache + mod_jk + Tomcat 4.1.12 + OpenSSL + MySQL on Mac OS 10.2 and it all runs just fine! Check the archives - someone posted recently regarding probs with Mac OS X *Server* - IIRC, WebObjects is pre-installed, and generates some conflicts with Tomcat. That was me. If you're running on OS X Server, there's a catalina.jar in /Library/Java/Extensions, or maybe in /Library/Java/Home/lib/ext/, or at least somewhere in the system classpath (see the archives). I'm not sure what this is used by ... not the default tomcat install, but *maybe* by WebObjects (although quite possibly not). Anyway, you will need to disable this file somehow (I gzipp'ed it) to get a custom install of tomcat ( 4.0.6, but probably some lower versions as well) to run. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Feedback on Tomcat+OpenEJB integration
Hi All, Just want to let Tomcat users know of the new Tomcat+OpenEJB integration we're shipping in OpenEJB 0.9.0 and to get some feedback on what Tomcat users would like to see most in the coming 0.9.x releases. We've taken a different integration approach than other EJB servers have taken. Typically ejb servers have embedded Tomcat into their platforms, requiring you to switch platforms and use the Tomcat version they ship. We've taken the opposite approach and have created an integration that embeds OpenEJB into your existing Tomcat setup. So you can keep your working Tomcat installation, use whatever version you want, and upgrade to different Tomcat versions whenever you feel like it. On the technical side, the integration consists of a servlet that loads on startup, locates the OpenEJB installation, then walks up the classloader tree, loads OpenEJB and your EJBs into the Tomcat common classloader, then starts up the EJB container system in Tomcat's VM. So all your servlets and JSPs have network-free access to all the EJBs in OpenEJB. There is a war file called openejb_loader.war, you copy that into your Tomcat webapp directory, set the openejb.home init-param in the openejb_loader's web.xml, and restart Tomcat. That's it. To pull OpenEJB out again, just delete the openejb_loader.war and restart. We did a limited release of this integration, worked out the issues, and now have it up for download in OpenEJB 0.9.0. What we'd like from everyone here is some feedback on: 1) what additional features/support you would like to see in the coming weeks, and 2) which are the most important. The feedback we get will determine what features we add to the integration and what order we add them. Already on the list is: - Support for web.xml's ejb-link. For now, ejbs are accessed from OpenEJB's JNDI namespace and not from Tomcat's. You can find the 0.9.0 release here: http://openejb.sourceforge.net/download.html Thanks, we hope you enjoy the functionality! David Blevins OpenEJB project -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Feedback on Tomcat+OpenEJB integration
Actually yes, we're working on a web-based admin console. It almost made it into the 0.9.0 release, but is still rough around the edges, so it's being held over till it's really ready. We did ship a basic telnet admin console in 0.9.0 believe it or not. Right now there are only a few commands in it (system, exit, lookup, version, stop, help). Those will do things like list the containers and the beans, stop the server, or allow you to browse the JNDI namespace. The telnet deamon doesn't start when you are embeding OpenEJB though, only when running it as a standalone server in it's very own VM. Security being the main reason. We'll probably make that configurable in the future so people can turn it on even when using OpenEJB as an embedded library. -David -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 6:00 PM To: Tomcat Users List Subject: Re: Feedback on Tomcat+OpenEJB integration sounds pretty good cool, although I don't have need for ejbs yet. Will there be some sort of interface(web or whatever) to administer the ejb container ? David Blevins wrote: Hi All, Just want to let Tomcat users know of the new Tomcat+OpenEJB integration we're shipping in OpenEJB 0.9.0 and to get some feedback on what Tomcat users would like to see most in the coming 0.9.x releases. We've taken a different integration approach than other EJB servers have taken. Typically ejb servers have embedded Tomcat into their platforms, requiring you to switch platforms and use the Tomcat version they ship. We've taken the opposite approach and have created an integration that embeds OpenEJB into your existing Tomcat setup. So you can keep your working Tomcat installation, use whatever version you want, and upgrade to different Tomcat versions whenever you feel like it. On the technical side, the integration consists of a servlet that loads on startup, locates the OpenEJB installation, then walks up the classloader tree, loads OpenEJB and your EJBs into the Tomcat common classloader, then starts up the EJB container system in Tomcat's VM. So all your servlets and JSPs have network-free access to all the EJBs in OpenEJB. There is a war file called openejb_loader.war, you copy that into your Tomcat webapp directory, set the openejb.home init-param in the openejb_loader's web.xml, and restart Tomcat. That's it. To pull OpenEJB out again, just delete the openejb_loader.war and restart. We did a limited release of this integration, worked out the issues, and now have it up for download in OpenEJB 0.9.0. What we'd like from everyone here is some feedback on: 1) what additional features/support you would like to see in the coming weeks, and 2) which are the most important. The feedback we get will determine what features we add to the integration and what order we add them. Already on the list is: - Support for web.xml's ejb-link. For now, ejbs are accessed from OpenEJB's JNDI namespace and not from Tomcat's. You can find the 0.9.0 release here: http://openejb.sourceforge.net/download.html Thanks, we hope you enjoy the functionality! David Blevins OpenEJB project -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]