Hello all, I have been manging a group of bootcamp people here, where I work, in a effort to produce a open sourse project showing how EJBs can be intergrated with an XML publishing framework. We decided to use Jboss to deploy our EJB (it also invloves intergrating Tomcat and Cocoon and will be deployed on a Linux machine (mandrake 7.1). It involves one stateless session (ReservationBean) ejb and two entity beans CustomerBean and ReservationBean EJBs (both of them CMPs) We tested each bean from a a dos client using 1.1 complient calling mechanism and each bean passed the test. However when we deployed the beans together in a container with a session bean calling a entity beans we ran in difficulty. Below find a detailed description of the problem. We will to release this code to both jBoss and Apache in a open source project. I will be working on this project persoanlly for the next three week and would appricate anyones invlovement. It will eventually be published as a paper and presented at the XML One conference here in London on the 19th of this Month The sourse code can be downloaded from freedrive http://www.freedrive.com/FDhome.htm?username=eoinlane&LoginText=Your%20FreeD rive%20Account%20has%20already%20been%20activated!%20%20PPlease%20Login. using the usename: eoinlane and password: bishop The file is call bootcamp.zip. We will soon setup a CVS directory here on our developmant machine. Also find attached the error we where getting. The dos test can be found in the classes directory it is called run.bat. The entire project can be built with ant using the build file in the src directory. Run "ant jar" if you want it to build the jar files as well, these jars will be put in the the corrosponding directory under dep-jboss Eoin. Project Description ------------------- This project required that we create two Container Managed Entity Beans that were deployed into JBoss and a Stateless Session Bean to deal with the Use Cases. The two Entity Beans were deployed in a single JAR file and the Session Bean deployed in a different JAR file. The two beans were deployed into the same JBoss container. The idea behind the different JAR files was that they may be moved to containers on different machines in the future. Test classes were developed to act as the client. The Problem ----------- The first test case was to to talk directly to the Entity Beans in a JBoss container running on the local machine. All of these tests were completed successfully. The second test case was to talk to the Session Bean in a JBoss container running on the local machine. This test failed, the functionality of the Session bean is derived from the Entity beans as it calls the methods on them. It fails with the 'No protocol' and 'MalformedURL' exception. The third test was to deploy the Entity Beans and the Session Bean into the same JBoss container in different JAR files. Then talk to the Session Bean and have it deal with the communication with the Entity Beans. This is where the problems started ... The method that we used for lookups was originally 1.1 compliant (PortableRemoteObject etc.), this was fine for calls from the client to the container, however we were not able to connect from the Session Bean to the Entity Bean in this manner. The errors reported were 'MalformedURL' and 'NullPointer' exceptions. Example of Lookup: CustomerHome custHome = (CustomerHome)PortableRemoteObject.narrow(initial.lookup( "CustomerBean"), CustomerHome.class); We then used 1.0 lookups (JRMP stlye) for all calls originating from inside the container. We did not feel we needed to change the calls from the client as these had been unit tested and worked. This made no difference and we continued to get the 'MalformedURL' and 'NullPointer' exceptions. Example of new Lookup: CustomerHome custHome = (CustomerHome)initial.lookup("CustomerBean"); Our final option was to bundle the Entity Beans and the Session Bean into the same JAR file. Again we tried this with 1.0 and 1.1 lookups, the problem continued .... Error Msg: [Container factory] Loading ejb-jar.xml : jar:file:/C:/apache/jBoss-2.0_BETA_PRO D_01/tmp/deploy/tmpejbjar36988.jar!/META-INF/ejb-jar.xml [Container factory] Loading standardjboss.xml : jar:file:/C:/apache/jBoss-2.0_BE TA_PROD_01/lib/ext/jboss.jar!/org/jboss/metadata/standardjboss.xml [Verifier] Verifying file:/C:/apache/jBoss-2.0_BETA_PROD_01/tmp/deploy/tmpejbjar 36988.jar [Verifier] CustomerBean: Verified. [Verifier] ReservationBean: Verified. [Container factory] Deploying CustomerBean [Container factory] Container Invoker Optimize='false' [Container factory] Deploying ReservationBean [Container factory] Container Invoker Optimize='false' [JAWS] Initializing JAWS plugin for CustomerBean [JAWS] Loading standardjaws.xml : jar:file:/C:/apache/jBoss-2.0_BETA_PROD_01/lib /ext/jboss.jar!/org/jboss/ejb/plugins/jaws/metadata/standardjaws.xml [JAWS] jar:file:/C:/apache/jBoss-2.0_BETA_PROD_01/tmp/deploy/tmpejbjar36988.jar! /META-INF/jaws.xml found. Overriding defaults [JAWS] Table CustomerBean created [JAWS] Initializing JAWS plugin for ReservationBean [JAWS] Table ReservationBean created [Container factory] Bound CustomerBean to CustomerBean [Container factory] Bound ReservationBean to ReservationBean [Container factory] Deployed application: file:/C:/apache/jBoss-2.0_BETA_PROD_01 /deploy/business.jar [Default] JRMPCI:invokeHome create [Default] Tx is null [ReservationAgentBean] TX_REQUIRED for create [ReservationAgentBean] begin tx [ReservationAgentBean] commit tx 0 [ReservationAgentBean] TX_REQUIRED for setReservation [ReservationAgentBean] begin tx [ReservationAgentBean] rollback tx 1 [ReservationAgentBean] Exception occurred:com.valtech.bootcamp.carRental.busines s.reservation.ReservationHome DISCLAIMER: This e-mail contains proprietary information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not disclose, distribute, copy, print, or rely on this e-mail. All information contained within this e-mail is subject to the Terms & Conditions of Valtech Ltd. which are available upon request. -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Problems?: [EMAIL PROTECTED]
