geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juergen Weber" <webe...@gmail.com>
Subject Re: Accessing corba from geronimo
Date Tue, 21 Oct 2008 19:24:49 GMT
No solution, but hints:

- try to use an IOR first (object_to_string() and friends)

- try to use JacORB from within Geronimo (but then JacORB threads are
not under control of Geronimo), this should work with Geronimo, too:
http://developers.sun.com/appserver/reference/techart/orb.html

On Tue, Oct 21, 2008 at 7:23 PM, Fredrik Jonson <fredrik@myrealbox.com> wrote:
> Hi,
>
> I'm trying to port a non-jee app to a EAR and get it running in
> Geronimo (2.1.3). It has been a lot of fun, although I'm very much
> a JEE-newbie, so it's a lot to grasp all at once... ;)
>
> Now, I have one component that needs to make a remote corba
> request to a non-jee corba service. In my legacy code, I did
> it like this:
>
>  Properties properties = new Properties();
>  properties.put("org.omg.CORBA.ORBInitRef.NameService",
>          "corbaloc::10.11.12.13:4003/NameService");
>  orb = ORB.init(new String[0], properties);
>  org.omg.CORBA.Object ns =
>  orb.resolve_initial_references("NameService");
>  NamingContextExt namingContext =
>    NamingContextExtHelper.narrow(ns);
>  org.omg.CORBA.Object obj = namingContext.resolve_str(
>         "org/example/FooService");
>  communicator = CommunicationHelper.narrow(obj);
>  // use the communicator here...
>
> When I try to use the same code in a MDB in Geronimo I get a
> exception with the following stacktrace:
>
>  Caused by: org.omg.CORBA.ORBPackage.InvalidName:
>  IDL:omg.org/CORBA/ORB/InvalidName:1.0
>    at org.apache.yoko.orb.OB.InitialServiceManager
>     .resolveInitialReferences(InitialServiceManager.java:191)
>    at org.apache.yoko.orb.OBCORBA.ORB_impl
>     .resolve_initial_references(ORB_impl.java:1090)
>    at org.example.MyClient.initiate(MyClient.java:249)
>
> I've tried to find examples of how to call legacy (non-ejb) corba
> services from a jee environment, but sofar I've come up short. I'd
> be greatful for some hints on how to approach this.
>
> --
> Fredrik Jonson
>
>

Mime
View raw message