CORBA client-server

I have managed to run success the very simple example in the demo
list. This was on the same server (AIX).
$ORACLE_HOME/javavm/demo/examples/corba/basic/jdbcimpl
I transferred the client classes on an NT machine (Visual
Cafe)and tried to run the same example. This was the error :
Build Successful
loading Client.class for debugging...
Client.class successfully loaded
javax.naming.CommunicationException: Unknown service:
10.142.10.157:2481:statsdb
at
oracle.aurora.jndi.sess_iiop.SessionCtx.initialContext(SessionCtx
.java:507)
at
oracle.aurora.jndi.sess_iiop.SessionCtx.<init>(SessionCtx.java:35
at
oracle.aurora.jndi.sess_iiop.ServiceCtx.createSession(ServiceCtx.
java:130)
at
oracle.aurora.jndi.sess_iiop.ServiceCtx.login(ServiceCtx.java:295
at
oracle.aurora.jndi.sess_iiop.ServiceCtx.defaultSession(ServiceCtx
.java:185)
at
oracle.aurora.jndi.sess_iiop.ServiceCtx.lookup(ServiceCtx.java:32
0)
at
oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiop
URLContext.java:215)
at
oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiop
URLContext.java:201)
at
javax.naming.InitialContext.lookup(InitialContext.java:288)
at Client.main(Client.java:29)
at symantec.tools.debug.MainThread.run(Agent.java:48)
Am I missing something (e.g. allow the client machine to connect
to IIOP). I've got the same error when I ran it from another UNIX
machine.
Thank you.
null

Gabriel Maties (guest) wrote:
: I have managed to run success the very simple example in the
demo
: list. This was on the same server (AIX).
: $ORACLE_HOME/javavm/demo/examples/corba/basic/jdbcimpl
: I transferred the client classes on an NT machine (Visual
: Cafe)and tried to run the same example. This was the error :
: Build Successful
: loading Client.class for debugging...
: Client.class successfully loaded
: javax.naming.CommunicationException: Unknown service:
: 10.142.10.157:2481:statsdb
: at
oracle.aurora.jndi.sess_iiop.SessionCtx.initialContext(SessionCtx
: .java:507)
: at
oracle.aurora.jndi.sess_iiop.SessionCtx.<init>(SessionCtx.java:35
: at
oracle.aurora.jndi.sess_iiop.ServiceCtx.createSession(ServiceCtx.
: java:130)
: at
oracle.aurora.jndi.sess_iiop.ServiceCtx.login(ServiceCtx.java:295
: at
oracle.aurora.jndi.sess_iiop.ServiceCtx.defaultSession(ServiceCtx
: .java:185)
: at
oracle.aurora.jndi.sess_iiop.ServiceCtx.lookup(ServiceCtx.java:32
: 0)
: at
oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiop
: URLContext.java:215)
: at
oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiop
: URLContext.java:201)
: at
: javax.naming.InitialContext.lookup(InitialContext.java:288)
: at Client.main(Client.java:29)
: at symantec.tools.debug.MainThread.run(Agent.java:48)
: Am I missing something (e.g. allow the client machine to
connect
: to IIOP). I've got the same error when I ran it from another
UNIX
: machine.
: Thank you.
Hi Gabriel:
I have got the same problem you described. I "resolved" it
(partially as you'll see)
connecting directly to the dispatcher. Of course you have first
to configure INIT.ORA
so that the dispatcher resides in a well-known port(you can see
the port of the dispatcher
with the command lsnrctl --> services).
Here is the code of my client:
try {
ServiceCtx service = (ServiceCtx)
contexto.lookup("sess_iiop://155.210.155.145:1035");
SessionCtx new_session = (SessionCtx)
service.createSubcontext(":session1");
new_session.login("oodisbus", "oodisbus", null);
est = (Estacion) new_session.activate("/test/myEstacion");
catch (Exception ex) {
ex.printStackTrace();
The dispatcher resides in the port 1035 (so I don3t use the
listener, port 2481).
This, of course, isn3t a complete solution to the problem but
it works.
I am very interested in connecting directly to the listener(it
enables you load balancing)
so I will be very grateful if you let me know another possible
solution.
Thank you.
null

Similar Messages

  • CORBA client server issue

    Hi,
    I am making a client server architecture implementing CORBA.
    On the server side there are two classes ChargingManager and Charging.The client first calls a method createChargingSession() on ChargingManager class which in turn returns a reference of the Charging class back to the client.But when the client call a method debitAmount() on Charging reference it throws an exception showing that the call instead to be initiated to Charging class actually goes to ChargingManager class where it throws methodNotFound exception.
    But in a separate scenario if instead of sending back the Charging reference to client I create an IOR file of Charging class as similar to that of ChargingManager and once the client resolves the object reference of Charging class from this IOR file and calls the method debitAmount() it performs well....I am not able to figure it out..Please help me out...Attached are the exception...
    org.omg.CORBA.BAD_OPERATION: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: Maybe at org.csapi.cs.IpChargingManagerPOA._invoke(IpChargingManagerPOA.java:35)
    at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:637)
         at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:189)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1680)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922)
         at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
         at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
         at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
         at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
    ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: Maybe
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:902)
         at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
         at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
         at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
         at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
         at org.csapi.cs._IpChargingSessionStub.directDebitAmountReq(_IpChargingSessionStub.java:222)
         at com.handler.OsaCharging.charge(OsaCharging.java:331)
         at com.handler.OsaCharging.main(OsaCharging.java:513)
    Does sending back the reference in CORBA changes the reference definition..

    I've got exactly the same problem... I use a SessionFactory to create a Session, and when I try to call session.open(); I actually call sessionFactory.open();
    Don't have an idea why is that... If you solved it, please do tell how.
    Thanks

  • CORBA Client- Server and Server- Client?

    Is it possible to do Server-> client invocation through CORBA?
    Would I have to create some type of callbakc object to the client?
    Need direction, i was thrown into corba and have no idea about the limitations.

    if anyone is interested in corba callbacks this has something about it
    http://sys-con.com/story/?storyid=36132&DE=1

  • Corba Client-side Servant inheritance

    hi there,
    I'm a student computer science and while running a project we encountered the following problem we couldn't solve(neither could our teachers an neither could the internet come up with anything usefull)
    we tried to make a distributed program using Corba and Idl. in our design the servant class on the client side inherits functions of another servant on the client side. this way we couldn't use the "extends _implbase" way. the idea behind it was to use polymorhism with the client-side servant objects. the search for the holy grail had begun.
    All over the net there were sollutions for making a Tie construction and thus being able to do create a similar design. it needed adjustement in the Server-class and the Server's servant.
    And that was the problem. how to do it on the Client-side.
    does anyone have an idea or example what changes I should make in the Client-class to be able to let the servant implement the operations class of the used interface?

    I'm not sure I really understand your question, but let me try to restate it:
    The client side is also a CORBA remote object (servant), perhaps for callbacks. How do you provide different implementations without subclassing an implBase?
    You kind of answered it yourself. Use the tie approach.
    idlj -fallTIE your.idlWon't that do it? Your client servant is really just a proxy which passes the calls to the local object which implements the operations interface, and can therefore inherit from whatever class.
    Am I missing something?

  • How corba client and server find Naming service

    hello
    i want to ask how corba client and server find the Naming service ?
    10x

    By using a well-known port (I think the default for JavaIDL's NS is 1049) on a well-known address (localhost).
    As these values are not really standard, you can specify them when starting the server and client (+-ORBInitialPort 1050 -ORBInitialHost localhost+). See the documentation .

  • Client server application using CORBA

    Hi
    I have a basic client server application running using CORBA/idl where the client starts up and the server says hello back to the client. I have figured out the basics but would like some help with these small problems.
    When I start the client, the server says hello. Thats OK. Now I want the client to start a simple java app (called c:\test.java - it works) that I created before. How?
    The next bit is when I close down the app "test" that I start, I want the server to realise that its closing and simply say goodbye on the client. How?
    If anybody can help me, I'd appreciate it.
    Thanks for your time,
    Shaun

    hi,
    to my knowledge, you will have to define a method in idl file and in your client, which server invocates(saying good bye etc) before shutting down..
    ls.

  • Does the weblogic server supports c++ corba client /IIOP?

    hi:)
    I have a c++ corba client interacts with WLS using IIOP. I am just wondering
    what ORB i need to use 2) trsaction propagation 3 ) security
    thankx,
    suresh reddy

    I suggest trying the RMI IIOP newsgroup. I do not quite understand your
    question.
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    "Sunesh Kumra" <[email protected]> wrote in message
    news:[email protected]...
    Hi Michael,
    Is it allowed to use your own multi-threaded library from within WLS ?Note that
    the WLS Beans do not contain the threads, the threading part is in somelibrary
    which the WLS Beans communicates with. Can the Helper classes which arepackaged
    with the WLS Beans span threads of their own ?
    Most importantly, is it allowed to use some vendor's ORB (for exampleOrbixweb)
    within WLS because the thread created by the ORB might interfere with WLS
    threads ??
    Michael Girdley wrote:
    2.1) CORBA client initiated transactions will not be supported,
    everything else will workYes, that is my understanding.
    2.2) None of the EJB security services will be available in EJB
    method
    called by a CORBA client (i.e. getCallerPrincipal() andisCallerInRole()
    will fail)Yes, that is my understanding. I would suggest that you place this onthe
    RMI IIOP newsgroup. The developers who write the code for this feature
    actually hang out over there.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    "<=one way=>" <[email protected]> wrote in message
    news:[email protected]...
    1) We must support both C++ and Java clients that will be requesting
    services from our EJBs running in WLS. The clients are internal appsrunning
    in different companies and we would prefer to avoid requiring our
    clients
    to
    use an ORB by a specific vendor. At the same time we do not want to
    deal
    with potential problems related to the implementation differences by
    different ORB vendors. What would be the best way to handle thissituation?
    2) WLS documentation has the following paragraph:
    "WebLogic RMI over IIOP is the framework for EJB-to-CORBA mapping
    support.
    Currently, however, a standard for passing user identity -- requiredto
    implement EJB-to-CORBA mapping -- does not exist and the requirementfor
    transaction propagation from the client is in question. While RMI overIIOP
    does allow CORBA clients to access EJBeans, the following services
    will
    not
    be available:
    EJB transaction services
    EJB security services"
    Does this mean that:
    2.1) CORBA client initiated transactions will not be supported,
    everything else will work
    2.2) None of the EJB security services will be available in EJB
    method
    called by a CORBA client (i.e. getCallerPrincipal() andisCallerInRole()
    will fail)
    Thanks in advance
    "Michael Girdley" <[email protected]> wrote in message
    news:[email protected]...
    Yes, check out the documentation on the RMI over IIOP on our web
    site.
    >>>>
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    "indham inc" <[email protected]> wrote in message
    news:[email protected]...
    hi:)
    I have a c++ corba client interacts with WLS using IIOP. I am justwondering
    what ORB i need to use 2) trsaction propagation 3 ) security
    thankx,
    suresh reddy

  • Client-Server - SOA.... Is it really a transition or a big development  ?

    Hi,
    In all sources related to SOA/ESA by SAP, it is said that, transitioning from Client-Server Arch(CSA) to SOA is the same as transitioning from Mainframe systems to Client-Server Arch.
    If we think about Mainframe and CSA, it is obvious that there had been big differences in that transition. Such as, the INTELLIGENT CLIENT concept had appeared to replace the DUMMY CLIENTS, so this had changed the way of IT Business. There would be a main application providing several functionalities(server) and other applications which want to use those functionalities (clients) would connect to the server using some functionalities on its own (that means a client appliction should also have some functionalities in order to at least connect to the server, so that made them different from the DUMMY clients of the mainframe era)
    Now, when I look at the differences between SOA and CSA, I cannot see that incompareble differences.Why ? Let me explain :
    - One of the most important differences between SOA and CSA is, SOA is vendor and platform independent, so that any application can call any applications functionality as long as they are using Web Services. That is true. But the question arises here : It is still the case that someone is calling some others' functionalities (services), so there is still a client/server mentality, isn't there and We will still be using several client/server programming languages in order to realize the main functionality of the web services but this will be transparent to the user and the integration. The main difference is, SOA is vendor and platform independent. But I don't think this can be commented as a missing feature of CSA. Because the aim of CSA was to make the clients more intelligent and not to make them vendor/platform independent. And also architectures like CORBA and DCOM have also tried to achieve that independency (even though they have restrictions compared to Web Services, one of the main reasons for this is using Web as a transport/communication protocol) but they are still treated as some extensions on top of CSA because they are using CSA beneath. But if we compare Mainframes and CSA, even though I haven't seen manframe ages, I think it is clear that CSA does not use any architectural functionality of Mainframes. They are completely different.. But is SOA and CSA completely different ?
    I agree with all reasons why today business needs sth more agile, more flexible and it is becoming clearer day by day that SOA and Web Services provides this environment, BUT, I still cannot make it clear, WHY it is accepted as a transition from CSA and why it is not treated as a big development over CSA while using the main features of it.
    Any comments will be appreciated.
    Regards
    Ahmet Engin Tekin

    Good point..Actually those are the things clearly known but it becomes a bit confusing to build clear sentences when it comes to declare the differences. Anyway, here are my additions :
    - Mainframes were centralized systems which had their own hardware architecture as well. All processes/applications were running on 1 central DB/system and everyone in the company had to use the same functionality and interface.
    - In time, as a result of business demand, people needed different functionalities/applications regarding different business needs. This could either be done by extending the higly-costed big mainframe systems/softwares OR a new approach had to be developed in order to solve those problems. At this point, (thanks to IBM,Macintosh and Xerox) PC and ethernet concepts had emerged. That was a completely different hardware architecture which allowed less costly systems and also distributing the process load and/or applications to different systems in one landscape (app servers, intelligent clients - 2 tier, 3- tier arch.). Thus, while those were happening on harware side, new communication and programming models/languages emerged on software side. As a result, people started using different applications on different systems according to their needs and thus an efficient solution had been provided to the business need (described above).
    To criticise, this was really a big transition. Not only software concepts but also hardware concepts are also changed drastically. Actually, it is not wrong if we say, developments on the hardware side, allowed changes on the software side
    - What happened next ? Companies started using so many different applications by different vendors with different business logic and programming models (thanks to CSA). But in times, this has emerged the biggest problem of the CSA era : Integration.
    We all know the rest. "Web Services" concept emerged with SOA as well. So that, the boundaries between the systems began to disappear.
    So, is this a transition ? Well, yes it is.. The point that made it confusing (at least for me) is that this time there is no hardware transition (yet) but only a transition in software side. But I still insist that the IT transition during Mainframe->CSA was like a revolution (forget what you've left behind) but from CSA to SOA; it is more likely to be an evolution (the next best thing)
    Anyone have more comments ?
    Regards,
    Ahmet

  • Running a Corba Client as a Java Stored Procedure

    Hi,
    I�m trying to use a Java Stored Procedure running as a Corba Client. I want to use the built in Visibroker ORB on Oracle side and JacORB (or others) on the server side.
    How can I init the ORB and get a naming service running not in Oracle but on the server side? Also which jar�s do I need to load into the db with (loadjava) to run the visibroker orb inside the Java Stored Procedure Client?
    I�m using Oracle 8.1.7.
    Thanks for help ;)

    By the way I�m using ORACLE 8.1.7.

  • How can i implement RMI Activatable for CORBA clients

    Hi, i need some help to implement RMI Activatable for CORBA clients, i was reading the CORBA specifications, that is used PortableRemoteObject.exportObject(this) in the server contructor. but in hte moment to execute rmic -iiop returns the next error:
    error: java.rmi.server.RemoteServer is not a valid remote implementation: has no
    remote interfaces.
    1 error
    so. my question is. how can i implent this funtionality on my RMI server that extends Activatable class ?
    i would like that you could give me some help, about it
    greetings !!

    You can't.

  • Importing classes to CORBA-client fails

    Hi!
    I'm trying to compile a simple CORBA-client but importing the classes fails.
    Test.java:1: package org.omg does not exist
    I'm running j2se 1.4 and j2ee 1.3.1
    My classpath:
    C:\Program Files\jdkee\lib\j2ee.jar;C:\j2sdk\jre\lib\rt.jar;C:\j2sdk\lib\dt.jar;C:\j2sdk\lib\tools.jar;C:\j2sdk\jre\lib\ext\dnsns.jar;C:\j2sdk\jre\lib\ext\ldapsec.jar;C:\j2sdk\jre\lib\ext\localedata.jar;C:\j2sdk\jre\lib\ext\sunjce_provider.jar;C:\j2sdk\lib\resin-ejb.jar;C:\j2sdk\lib\resin.jar;C:\java\JC\Inl2\Inl2Bean.jar;C:\Program Files\jdkee\lib\jhall.jar;C:\Program Files\jdkee\lib\ejb10deployment.jar;C:\Program Files\jdkee\lib\j2ee-ri-svc.jar;C:\Program Files\jdkee\lib\j2eetools.jar
    Any help would be appreciated.
    Henrik

    The problem is your class path.
    Most likely either you do not have it set at all or you are pointing at a child directory rather than the root directory.
    The package resides in the same file as the Servant,Same file? You can't have two packages in the same file. And if you meant 'directory' then you might as well move it, because trying to keep two packages in the same directory, although possible, is more trouble than it is worth.

  • CORBA client reconnection: InvalidDomain

    I'm developing a CORBA-client for WLE 5.1. In short, the problem is:
    I can't restore a connection after a COMM_FAILURE. When trying to create a Tobj_Bootstrap object again I get
    com.beasys.Tobj.InvalidDomain: Can't connect to the domain (//my.domain:2600)
    Here are some details. The client must work without restart during a long time. It is normal that sometimes network problems occur or server is restarted or any other thing happens that can make a remote object reference invalid. So, when getting a COMM_FAILURE, I try to "reconnect" - that is to obtain remote reference again. I do it in the same way as on the first start of the client:
    1. Create Tobj_Bootstrap.
    2. Obtain Factory Finder.
    3. Obtain Factory.
    4. Obtain remote interface reference.
    On the first step I get this InvalidDomain exception. Even if the connection is OK, the server is up and running and the URL passed to Tobj_Bootstrap(orb, url) is correct. The other strange thing is - there is no network activity during this call (observed by network monitoring tool). Seems ORB doesn't really try to do its job.
    BTW, I use m3envobj.jar and wleclient.jar for CORBA-functionality.
    The same client using SUN's ORB (with simple CORBA-server from JDK 1.4) reconnects well.
    What is the reason?
    Thanks in advance.
    Yury.

    Generally, no. If you carefully massage the IDL that results from the EJB, it's possible to manufacture a subset of the EJB's interface that a 2.2 or 2.1 ORB can call, but there is currently no automagical support for this in WLS. Beyond the use of value types, the trouble that most ORBs run into is
    the IIOP type codes that start with RMI: instead of IDL:
    Loaner wrote:
    Hi,
    I have a CORBA client developed on pre CORBA 2.3 ORB, i.e. the ORB
    doesn't supports Object by Value. Can this client access the services
    being provided by the EJB somehow??
    Any help will be appreicated.
    Vikas

  • Problem using CORBA clients with RMI/EJB servers..!!!???

    Hi,
    I have a question on using EJB / or RMI servers with CORBA clients using
    RMI-IIOP transport, which in theory should work, but in practice has few
    glitches.
    Basically, I have implemented a very simple server, StockTreader, which
    looks up for a symbol and returns a 'Stock' object. In the first example, I
    simplified the 'Stock' object to be a mere java.lang.String, so that lookup
    would simply return the 'synbol'.
    Then I have implemented the above, as an RMI-IIOP server (case 1) and a
    CORBA server (case 2) with respective clients, and the pair of
    client-servers work fine as long as they are CORBA-to-CORBA and RMI-to-RMI.
    But the problem arises when I tried using the RMI server (via IIOP) with the
    CORBA client, when the client tries to narrow the object ref obtained from
    the naming service into the CORBA idl defined type (StockTrader) it ends up
    with a class cast exception.
    This is what I did to achieve the above results:
    [1] Define an RMI interface StockTrader.java (extending java.rmi.Remote)
    with the method,
    public String lookup( String symbol) throws RMIException;
    [2] Implement the StorckTrader interface (on a PortableRemoteObject derived
    class, to make it IIOP compliant), and then the server to register the stock
    trader with COS Naming service as follows:
    String homeName =....
    StockTraderImpl trader =new StockTraderImpl();
    System.out.println("binding obj <" homeName ">...");
    java.util.Hashtable ht =new java.util.Hashtable();
    ht.put("java.naming.factory.initial", args[2]);
    ht.put("java.naming.provider.url", args[3]);
    Context ctx =new InitialContext(ht);
    ctx.rebind(homeName, trader);
    [3] Generate the RMI-IIOP skeletons for the Implementation class,
    rmic -iiop stock.StockTraderImpl
    [4] generate the IDL for the RMI interface,
    rmic -idl stock.StockTraderImpl
    [5] Generate IDL stubs for the CORBA client,
    idlj -v -fclient -emitAll StockTraderImpl.idl
    [6] Write the client to use the IDL-defined stock trader,
    String serverName =args[0];
    String symList =args[1];
    StockClient client =new StockClient();
    System.out.println("init orb...");
    ORB orb =ORB.init(args, null);
    System.out.println("resolve init name service...");
    org.omg.CORBA.Object objRef
    =orb.resolve_initial_references("NameService");
    NamingContext naming =NamingContextHelper.narrow(objRef);
    ... define a naming component etc...
    org.omg.CORBA.Object obj =naming.resolve(...);
    System.out.println("narrow objRef: " obj.getClass() ": " +obj);
    StockTrader trader =StockTraderHelper.narrow(obj);
    [7] Compile all the classes using Java 1.2.2
    [8] start tnameserv (naming service), then the server to register the RMI
    server obj
    [9] Run the CORBA client, passing it the COSNaming service ref name (with
    which the server obj is registered)
    The CORBA client successfully finds the server obj ref in the naming
    service, the operation StockTraderHelper.narrow() fails in the segment
    below, with a class cast exception:
    org.omg.CORBA.Object obj =naming.resolve(...);
    StockTrader trader =StockTraderHelper.narrow(obj);
    The <obj> returned by naming service turns out to be of the type;
    class com.sun.rmi.iiop.CDRInputStream$1
    This is of the same type when stock trader object is registered in a CORBA
    server (as opposed to an RMI server), but works correctly with no casting
    excpetions..
    Any ideas / hints very welcome.
    thanks in advance,
    -hari

    On the contrary... all that is being said is that we needed to provide clearer examples/documentation in the 5.1.0 release. There will be no difference between the product as found in the service pack and the product found in the 5.1.1. That is, the only substantive will be that 5.1.1 will also
    include the examples.
    "<=one way=>" wrote:
    With reference to your and other messages, it appears that one should not
    expect that WLS RMI-IIOP will work in a complex real-life system, at least
    not now. In other words, support for real-life CORBA clients is not an
    option in the current release of WLS.
    TIA
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]...
    We currently publish an IDL example, even though the IDL programmingmodel in Java is completely non-functional, in anticipation of the support
    needs for uses who need to use IDL to talk to the Weblogic server,
    generically. This example illustrates the simplest connectivity; it does not
    address how
    to integrate CORBA and EJB, a broad topic, fraught with peril, imo. I'llnote in passing that, to my knowledge, none of the other vendors attempt
    this topic either, a point which is telling if all the less happy to hear.
    For the record then, what is missing from our distribution wrt RMI-IIOPare a RMI-IIOP example, an EJB-IIOP example, an EJB-C++. In this you are
    correct; better examples are forth coming.
    Still, I would not call our RMI-IIOP implementation fragile. I would saythat customers have an understandably hard time accepting that the IDL
    programming model is busted; busted in the sense that there are no C++
    libraries to support the EJB model, and busted in the sense that there is
    simply no
    support in Java for an IDL interface to an EJB. Weblogic has nothing to doit being busted, although we are trying to help our customers deal with it
    in productive ways.
    For the moment, what there is is a RMI (over IIOP) programming model, aninherently Java to Java programming model, and true to that, we accept and
    dispatch IIOP request into RMI server objects. The way I look at it is this:
    it's just a protocol, like HTTP, or JRMP; it's not IDL and it has
    practically nothing to do with CORBA.
    ST wrote:
    Eduardo,
    Can you give us more details about the comment below:
    I fear that as soon as the call to narrow succeeds, the remainingapplication will fail to work correctly because it is too difficult ot
    use an idl client in java to work.It seems to me that Weblogic's RMI-IIOP is a very fragile
    implementation. We
    don't need a "HelloWorld" example, we need a concrete serious example(fully
    tested and seriously documented) that works so that we can get a betteridea
    on how to integrate CORBA and EJB.
    Thanks,
    Said
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]...
    Please post request to the news group...
    As I said, you must separate the idl related classes (class files and
    java
    files) from the rmi classes... in the rmic step, you must set a newtarget
    (as you did), emit the java files into that directory (it's not clearyou
    did this), then remove all the rmi class files from the class path... ifyou
    need to compile more classes at that point, copy the java files to theidl
    directly is you must, but you can not share the types in any way.
    I fear that as soon as the call to narrow succeeds, the remainingapplication will fail to work correctly because it is too difficult otuse
    an idl client in java to work.
    Harindra Rajapakshe wrote:
    Hi Eduardo,
    Thanks for the help. That is the way I compiled my CORBA client, by
    separating the IDL-generated stubs from the RMI ones, but still I
    get a
    CORBA.BAD_PARAM upon narrowing the client proxy to the interfacetype.
    Here's what I did;
    + Define the RMI interfaces, in this case a StockTrader interface.
    + Implement RMI interface by extendingjavax.rmi.PortableRemoteObject
    making
    it IIOP compliant
    + Implemnnt an RMI server, and compile using JDK1.2.2
    + use the RMI implementation to generate CORBA idl, using RMI-IIOPplugin
    utility rmic;
    rmic -idl -noValueMethods -always -d idl stock.StockTraderImpl
    + generate Java mappings to the IDL generated above, using RMI-IIOPplugin
    util,
    idlj -v -fclient -emitAll -tf src stocks\StockTrader.idl
    This creates source for the package stock and also
    org.omg.CORBA.*
    package, presumably IIOP type marshalling
    + compile all classes generated above using JDK1.2.2
    + Implement client (CORBA) using the classes generated above, NOTthe
    RMI
    proxies.
    + start RMI server, with stockTrader server obj
    + start tnameserv
    + start CORBA client
    Then the client errors when trying to narrow the obj ref from the
    naming
    service, into the CORBA IDL defined interface using,
    org.omg.CORBA.Object obj =naming.resolve(nn);
    StockTrader trader =StockTraderHelper.narrow(obj); // THIS
    ERRORS..!!!
    throwing a CORBA.BAD_PARAM exception.
    any ideas..?
    Thanks in advance,
    -hari
    ----- Original Message -----
    From: Eduardo Ceballos <[email protected]>
    Newsgroups: weblogic.developer.interest.rmi-iiop
    To: Hari Rajapakshe <[email protected]>
    Sent: Wednesday, July 26, 2000 4:38 AM
    Subject: Re: problem using CORBA clients with RMI/EJBservers..!!!???
    Please see the post on june 26, re Errors compiling... somewherein
    there,
    I suspect, you are referring to the rmi class file when you are
    obliged
    to
    completely segregate these from the idl class files.
    Hari Rajapakshe wrote:
    Hi,
    I have a question on using EJB / or RMI servers with CORBA
    clients
    using
    RMI-IIOP transport, which in theory should work, but in practice
    has
    few
    glitches.
    Basically, I have implemented a very simple server,
    StockTreader,
    which
    looks up for a symbol and returns a 'Stock' object. In the firstexample, I
    simplified the 'Stock' object to be a mere java.lang.String, so
    that
    lookup
    would simply return the 'synbol'.
    Then I have implemented the above, as an RMI-IIOP server (case
    1)
    and a
    CORBA server (case 2) with respective clients, and the pair of
    client-servers work fine as long as they are CORBA-to-CORBA andRMI-to-RMI.
    But the problem arises when I tried using the RMI server (via
    IIOP)
    with
    the
    CORBA client, when the client tries to narrow the object ref
    obtained
    from
    the naming service into the CORBA idl defined type (StockTrader)
    it
    ends
    up
    with a class cast exception.
    This is what I did to achieve the above results:
    [1] Define an RMI interface StockTrader.java (extending
    java.rmi.Remote)
    with the method,
    public String lookup( String symbol) throws RMIException;
    [2] Implement the StorckTrader interface (on a
    PortableRemoteObject
    derived
    class, to make it IIOP compliant), and then the server to
    register
    the
    stock
    trader with COS Naming service as follows:
    String homeName =....
    StockTraderImpl trader =new StockTraderImpl();
    System.out.println("binding obj <" homeName ">...");
    java.util.Hashtable ht =new java.util.Hashtable();
    ht.put("java.naming.factory.initial", args[2]);
    ht.put("java.naming.provider.url", args[3]);
    Context ctx =new InitialContext(ht);
    ctx.rebind(homeName, trader);
    [3] Generate the RMI-IIOP skeletons for the Implementation
    class,
    rmic -iiop stock.StockTraderImpl
    [4] generate the IDL for the RMI interface,
    rmic -idl stock.StockTraderImpl
    [5] Generate IDL stubs for the CORBA client,
    idlj -v -fclient -emitAll StockTraderImpl.idl
    [6] Write the client to use the IDL-defined stock trader,
    String serverName =args[0];
    String symList =args[1];
    StockClient client =new StockClient();
    System.out.println("init orb...");
    ORB orb =ORB.init(args, null);
    System.out.println("resolve init name service...");
    org.omg.CORBA.Object objRef
    =orb.resolve_initial_references("NameService");
    NamingContext naming=NamingContextHelper.narrow(objRef);
    ... define a naming component etc...
    org.omg.CORBA.Object obj =naming.resolve(...);
    System.out.println("narrow objRef: " obj.getClass() ":"
    +obj);
    StockTrader trader =StockTraderHelper.narrow(obj);
    [7] Compile all the classes using Java 1.2.2
    [8] start tnameserv (naming service), then the server to
    register
    the
    RMI
    server obj
    [9] Run the CORBA client, passing it the COSNaming service ref
    name
    (with
    which the server obj is registered)
    The CORBA client successfully finds the server obj ref in the
    naming
    service, the operation StockTraderHelper.narrow() fails in thesegment
    below, with a class cast exception:
    org.omg.CORBA.Object obj =naming.resolve(...);
    StockTrader trader =StockTraderHelper.narrow(obj);
    The <obj> returned by naming service turns out to be of the
    type;
    class com.sun.rmi.iiop.CDRInputStream$1
    This is of the same type when stock trader object is registeredin a
    CORBA
    server (as opposed to an RMI server), but works correctly with
    no
    casting
    excpetions..
    Any ideas / hints very welcome.
    thanks in advance,
    -hari

  • Corba Client to a Session Bean deployed in OC4J

    Hello!
    I'm looking for an example showing how to make a call to some EJBs deployed in OC4J (Orion) through a plain CORBA call in java?... Is this possible? I know that regular EJB uses RMI over IIOP based on CORBA... is it possible to use only the CORBA/iiop layer to communicate with an EJB deployed in OC4J?
    If you have any corba client code as an example, it would be very appreciated,
    Thanks!
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Pierre ([email protected]):
    Hello!
    I'm looking for an example showing how to make a call to some EJBs deployed in OC4J (Orion) through a plain CORBA call in java?... Is this possible? I know that regular EJB uses RMI over IIOP based on CORBA... is it possible to use only the CORBA/iiop layer to communicate with an EJB deployed in OC4J?
    If you have any corba client code as an example, it would be very appreciated,
    Thanks!
    <HR></BLOCKQUOTE>
    I am reasonably certain that OCJ4 doesn't support RMI over IIOP, only ORMI, which is the native wire protocol from Orion, and won't support this until they release the final version of EJB 2.0 support in OCJ4.
    Translating the CORBA/RMI calls to EJB/ORMI calls would be a tad bit on the tricky side. I believe you can do what you want with something like Borland's App server...
    null

  • CORBA clients - EJBs in WLS

    This is the situation we have:
    1) We must support both C++ and Java clients that will be requesting
    services from our EJBs running in WLS. The clients are internal apps running
    in different companies and we would prefer to avoid requiring our clients to
    use an ORB by a specific vendor. At the same time we do not want to deal
    with potential problems related to the implementation differences by
    different ORB vendors. What would be the best way to handle this situation?
    2) WLS documentation has the following paragraph:
    "WebLogic RMI over IIOP is the framework for EJB-to-CORBA mapping support.
    Currently, however, a standard for passing user identity -- required to
    implement EJB-to-CORBA mapping -- does not exist and the requirement for
    transaction propagation from the client is in question. While RMI over IIOP
    does allow CORBA clients to access EJBeans, the following services will not
    be available:
    EJB transaction services
    EJB security services"
    Does this mean that:
    2.1) CORBA client initiated transactions will not be supported,
    everything will work
    2.2) None of the EJB security services will be available in EJB method
    called by a CORBA client (i.e. getCallerPrincipal() and isCallerInRole()
    will fail)
    Thanks in advance

    Generally speaking, applications are built around common resources, namely the databases and security realms. Here, it seems you can't make any assumptions about the client at all, so you render useless the ability to propagate the transaction and security context; the upshot being that you couldn't
    use it, even if we provided support for it, which we don't.
    You also want to be shielded from all the incompatibilities between the ORB vendors, that is, you want to provide a client interface to call into an ejb, that will work irrespective of the orb the client runs. From this, I gather that you can have a 1.0 or 2.1 Tao, Visibroker, IONA, etc, orb as a
    client, so you can not use objects in the interface.
    To accomplish this, you need to do the following:
    -- design the client interface so that it is stateless
    -- design the interface so that it does not include any objects or structs... actually, you can use structs, it's just more complicated.
    -- use server side transactions only (this follows from the statelessness of the interface)
    -- either assume that ssl will be in place by the time you need it or include a token in the interface for the authenticated user
    Please, read on...
    "<=one way=>" wrote:
    This is the situation we have:
    1) We must support both C++ and Java clients that will be requesting
    services from our EJBs running in WLS. The clients are internal apps running
    in different companies and we would prefer to avoid requiring our clients to
    use an ORB by a specific vendor. At the same time we do not want to deal
    with potential problems related to the implementation differences by
    different ORB vendors. What would be the best way to handle this situation?
    We support IIOP as the transport. To call into any remote interface, you must provide a java.rmi.Remote interface, and code generate the IDL from that interface using weblogic.rmic. If you follow the above strictures, and use the -noValueTypes discussed earlier, you should be able to make progress
    without the promised examples.... or you can wait for the examples.
    >
    2) WLS documentation has the following paragraph:
    "WebLogic RMI over IIOP is the framework for EJB-to-CORBA mapping support.
    Currently, however, a standard for passing user identity -- required to
    implement EJB-to-CORBA mapping -- does not exist and the requirement for
    transaction propagation from the client is in question. While RMI over IIOP
    does allow CORBA clients to access EJBeans, the following services will not
    be available:
    EJB transaction services
    EJB security services"
    Does this mean that:
    2.1) CORBA client initiated transactions will not be supported,
    everything else (sic) will workYes.
    >
    2.2) None of the EJB security services will be available in EJB method
    called by a CORBA client (i.e. getCallerPrincipal() and isCallerInRole()
    will fail)No. The call will not fail, they will either provide values that correspond to the default or the user configured by the weblogic.iiop.user property.
    >
    >
    Thanks in advance

Maybe you are looking for

  • Compare two structures in BPM

    I have a BPM where I get two structures one from SAP and one from WebService. I have to compare these two strutures if no entry is found in web service structure for the correponding entry in  SAP Structure, then call other webservice else skip Is th

  • My New HP Envy H8 restarts randomly without an error message

    My Envy desktop has now chosen for the last few months to restart itself whenever it wants... This can happen several times a day, or once in a few days... Its very frustrating...please help... Also tells me all the time that HP Ceement has stopped w

  • Can I back & restore up my pop3 emails???

    I have a iphone 4 using pop3 email (GMX) which is good, no problems there. However if I want to back up and restore these emails from my iphone 4 to my new iphone 4s this is apparently not possible. Accoring to Apple support today when you do a back

  • Why can't I hear the audio for my slide show outside of PSE 9?

    I have prepared a slide show with audio in Photoshop Elements 9.  It plays fine within the PSE 9 viewer, both slides and audio.  However, when I try to view it on Windows Media Player, the audio does not play, though the slide show does.  I am also i

  • Switch Profile view in MIB

    Hello Experts, On a Nexus 5000 in VPC domain, I look for the result of commited switch profile. Where can I find this kind of information (in bold), in which MIB ? Do you have the OID ? SW11B2D01# show switch-profile YOP status switch-profile  : YOP