6 Replies Latest reply on Apr 15, 2005 10:52 AM by Jimmy Wilson

    Creating CORBA wrapper servants for EJB objects

    anton lokotsch Newbie

      Hi All,

      I need to access session EJBs from standalone Java (and C#) applications via CORBA. Thus far I have been able to get a reasonable implementation going for C# using IIOP-NET. Unfortunately I cannot say the same for Java.

      One of the problems I keep on running into is that rmic generates "broken" idl for the standard java exception classes (Throwable being the main culprit). In trying to resolve this issue, I have come accross a IONA whitepaper that recommends rather wrapping the EJBs using CORBA objects and implementing these servants from hand coded IDL vs. trying to work with the IDL generated by rmic.

      I know JBoss's IIOP support does go to great lengths to make working with CORBA easier - but how would I go about creating servants that can be hosted on the JBoss server (vs. in another POA on another VM)?

      I hope my questions make sense :P

      Regards.

        • 1. Re: Creating CORBA wrapper servants for EJB objects
          Francisco Reverbel Novice

          Yes, what you are asking makes complete sense. CORBA front-ends for stateless session beans are very useful in the scenario you described. Putting an IDL interface in front of an SLSB is the way of circumventing the oddities of the reverse Java-to-IDL mapping and making the SLSB more conveniently accessible to CORBA clients written in other languages.

          You can write a service MBean whose start method instantiates a CORBA servant, registers the servant with a POA, and binds the corresponding CORBA reference into a CosNaming context to make it available to remote clients. You can register the servant with the root POA or you can create a new POA for your servant, with the POA policies of your choice.

          It should be possible to write a generic service MBean to do this. The name of the servant class and the CosNaming name of the CORBA object would be configurable attributes of the MBean.

          Regards,

          Francisco

          • 2. Re: Creating CORBA wrapper servants for EJB objects
            Francois Groenewald Newbie

            Thanks for the reply. I will look into the MBean documentation in the JBoss guide some more before attempting this - but now I know that it is possible :)

            Regards,
            Francois

            PS: I have no idea why the post came through in someone else's username but I suspect the link I in a "sticky note" instruction people not to post in the Corba developers forum had something to do with it.

            • 3. Re: Creating CORBA wrapper servants for EJB objects
              Jan Radl Newbie

              Using MBean is the good point but you can write your own CORB-to-EJB proxy servants and run this servants in separate CORBA server. It is very easy to write proxy generator which does all the work for you. This solution has one big advantage:

              You can use this scenerio for any J2EE App server. We use this solution for very lage system with a lot of SSB and SFB.

              Regards

              Jan

              • 4. Re: Creating CORBA wrapper servants for EJB objects
                Jimmy Wilson Apprentice

                 

                "radl01" wrote:
                Using MBean is the good point but you can write your own CORB-to-EJB proxy servants and run this servants in separate CORBA server. It is very easy to write proxy generator which does all the work for you. This solution has one big advantage:

                You can use this scenerio for any J2EE App server. We use this solution for very lage system with a lot of SSB and SFB.


                I have been interested in contributing an MBean that provided this type of behavior for a while now. It seems to me that while the external CORBA server idea would work, it could be much faster using the MBean method since everything would/could be in the same process and you could utilize EJB local interfaces.

                • 5. Re: Creating CORBA wrapper servants for EJB objects
                  Francisco Reverbel Novice

                   


                  I have been interested in contributing an MBean that provided this type of behavior for a while now.

                  Your contribution will be very welcome! (Good to see you in JBoss forums, Jimmy.)

                  Francisco


                  • 6. Re: Creating CORBA wrapper servants for EJB objects
                    Jimmy Wilson Apprentice

                     

                    "reverbel" wrote:

                    I have been interested in contributing an MBean that provided this type of behavior for a while now.

                    Your contribution will be very welcome! (Good to see you in JBoss forums, Jimmy.)

                    Post http://www.jboss.org/index.html?module=bb&op=viewtopic&t=62736 in the IIOP development forum spells out what I thinking (at the moment). Can you take a look and see if there is anything to add/focus on?