C++ IIOP client implications

I have some general questions regarding a C++ CORBA iiop client to WLS6.1
(using any orb, but in particular using the tux orb):
What are the implications of a CORBA C++ client to EJBs hosted on WLS. What
particular limitations exist (theoretical or practical) in terms of
parameter types for method invocations - in particular non-primitive
parameters?
To clarify:
Largely, OBV in a C++/EJB environment means that you have to provide a C++
implementation of any OBV classes that are passed to, or returned from, an
EJB interface (as well as the standard interfaces/exceptions, etc).
In a java-java environment, it is perfectly normal that you would want to
pass some Bulk Accessor (or Value Object - dont like that name). These could
be of the form of HashMaps or ArrayLists etc, or may be a simple struct-like
class. There may even be more complicated classes with embedded logic - but
we will ignore these for the time being.
My questions are:
1) How do we write simple struct-like classes - what rules do we need to
follow? Are there interfaces to implement that would take advantage of CORBA
marshalling instead of object serialisation (interesting, but not that
important)?
2) Do we need to provide our own C++ implementations of standard containers
as HashMap or ArrayList? Do BEA provide a library of such "standard" class
implementations?
3) If the interface returns an ArrayList (or any Collection class) of custom
Data Objects, ala:
public List getLoadsOfStuff() {
ArrayList stuff = new ArrayList();
stuff.add(new MyBulkAccessor("milk", "biscuits", 12));
return stuff;
how is the ejbc tool aware that there is a class "MyBulkAccessor" that
requires IDL generated? (this also has implications in a java-java world
when using ejbc's client-jar generation)
4) Are there C++ implementations of other javax classes such as the
javax.ejb.Handle etc? Do developers need to provide implementations of these
objects?
Thanks.
Nick

Cheers, Thanks.
"Andy Piper" <[email protected]> wrote in message
news:[email protected]...
"Nick Minutello" <[email protected]>
writes:
>
I have some general questions regarding a C++ CORBA iiop client toWLS6.1
(using any orb, but in particular using the tux orb):
What are the implications of a CORBA C++ client to EJBs hosted on WLS.What
particular limitations exist (theoretical or practical) in terms of
parameter types for method invocations - in particular non-primitive
parameters?
To clarify:
Largely, OBV in a C++/EJB environment means that you have to provide aC++
implementation of any OBV classes that are passed to, or returned from,an
EJB interface (as well as the standard interfaces/exceptions, etc).
In a java-java environment, it is perfectly normal that you would wantto
pass some Bulk Accessor (or Value Object - dont like that name). Thesecould
be of the form of HashMaps or ArrayLists etc, or may be a simplestruct-like
class. There may even be more complicated classes with embedded logic -but
we will ignore these for the time being.There are virtually no physical limitations to the passing of
valuetypes to and from WLS from a C++ client. The limitations are
more, as you have noticed, the complexity of the implementation. The
only real limitation is where objects have names that cannot be
disambiguated using the mangling rules of the Java to IDL spec. This
generally only happens if you design things to break these rules
(i.e. almost never).
In terms of the complexity issue, the real problem is custom
valuetypes. Objects that generate stanadard valuetypes (and that means
things that are simply serializable) are reasonably easy to manipulate
and moreover Tuxedo will generate default implementations for these
using the -i flag. This is another advantage in using the Tuxedo C++
client orb rather than Visibroker, say. The generated default
implementations are usually sufficient for most uses. Note also that
WLS does not generate functions for valuetypes, we only spit out the
data. There are good reasons for doing this, but a side effect is that
the implementation of valuetypes in C++ is made much easier. If you
look in the iiop examples in WLS 6.1 you will see that we have also
demonstrated how to extend a valuetype implementation with
functionality that makes it look like its java counterpart.
But back to custom valuetypes. Java objects that have custom
marshalling (i.e. define writeObject or are externalizable), require
custom valuetype implementations in C++. This makes the C++
implementation much more complex since you have to write the
marshalling code for the valuetype implementations yourself. In the
WLS examples the iiop entity example shows this for ArrayList. On the
plus side you only have to do this once, so you could build up a
library of custom marshaled valuetype implementations. On the minus
side, there is no guarantee that the Java marshaling will not change
(as it did for ArrayList between JDK 1.30 and JDK 1.3.1).
My questions are:
1) How do we write simple struct-like classes - what rules do we need to
follow? Are there interfaces to implement that would take advantage of
CORBA
marshalling instead of object serialisation (interesting, but not that
important)?My advice would be to make sure the java objects you use are simply
serializable, i.e. avoid the custom marshalling problem. Then add any
helper functions you require in the C++ implementation.
2) Do we need to provide our own C++ implementations of standard
containers
as HashMap or ArrayList? Do BEA provide a library of such "standard"class
implementations?You would if you wanted to use these data items. We do not provide
standard implementations of these - although there is an example for
ArrayList in the iiop examples.
3) If the interface returns an ArrayList (or any Collection class) of
custom
Data Objects, ala:
public List getLoadsOfStuff() {
ArrayList stuff = new ArrayList();
stuff.add(new MyBulkAccessor("milk", "biscuits", 12));
return stuff;
how is the ejbc tool aware that there is a class "MyBulkAccessor" that
requires IDL generated? (this also has implications in a java-java world
when using ejbc's client-jar generation)ejbc is not aware. We have modified rmic to allow generation of IDL
for all java classes. So in this case you would have to do:
rmic -idl java.util.ArrayList
to make sure you had the appropriate IDL.
4) Are there C++ implementations of other javax classes such as the
javax.ejb.Handle etc? Do developers need to provide implementations of
these
objects?We haven't provided any implementations of these. We have, however, in
6.1 tried to make sure that the common java types used by EJBs are
simply serializable (including handles and enumerations) so that they
are at least useable from C++.
andy

Similar Messages

  • RMI-IIOP client - CORBA Server

    I already have a CORBA server in C++ which has already been written. I am trying to develop an RMI-IIOP client which would talk to this CORBA Server.
    The CORBA server has several interfaces that I would like to use with my RMI-IIOP client. How do I proceed?? Can somebody give me an example of an RMI-IIOP client? Basically my question is: how do I take the IDL and build an RMI-IIOP client with it???

    Hello
    I already have a CORBA server in C++ which has already
    been written. I am trying to develop an RMI-IIOP
    client which would talk to this CORBA Server.
    The CORBA server has several interfaces that I would
    like to use with my RMI-IIOP client. How do I
    proceed?? Can somebody give me an example of an
    RMI-IIOP client? Basically my question is: how do I
    take the IDL and build an RMI-IIOP client with it???The steps to do are the following:
    * Creating the Remote interface
    * Using the rmic compiler to genarate the IDL and the client stub.
    * Generating stub and skeleton of the C++ server using that IDL (the one you already made is no longer compatible)
    * Bulding up the new C++ server
    * Using a nameservice (tnameserver for example) and binding your server to that.
    * Writing the RMI-IIOP client
    I proceeded like this (using Visibroker 4.5 on the server side) and I was able to do it... but as you can see from my last post, I wasn't able to pass Strings from the client to the server.
    Bye

  • Distributed transactions across RMI-IIOP client to RMI-IIOP server do not work

    Hi,
              Based on the links below:
              http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
              http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
              It appears that is possible to have distributed transactions across RMI-IIOP
              clients and RMI-IIOP applications (servers).
              I followed up the "Transactions Sample RMI Code" section but it appears that
              the transaction context is not propagated from client to server. I am also
              surprised by the note:
              Note: These code fragments do not derive from any of the sample applications
              that ship with WebLogic Server. They merely illustrate the use of the
              UserTransaction object within an RMI application.
              The above note suggests that there is no sample code available.
              Is there anyone who successfully had RMI-IIOP applications (servers)
              participating in distributed transactions?
              Is there any sample code that illustrates RMI-IIOP applications (servers)
              participating in distributed transactions?
              If anyone thinks that this should work I will post my code that does not
              work.
              Regards,
              Dan Cimpoesu
              

    But if you look to the diagram:
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1040200
    it suggests that transactional context is passed from clients to RMI-IIOP
    servers.
    Am I wrong?
    Dan
    "Andy Piper" <[email protected]> wrote in message
    news:[email protected]..
    "Dan Cimpoesu" <[email protected]> writes:
    Transactions over IIOP are not supported or implemented in WLS 6.1 or
    previous. This is a feature of WLS 7.0. In 7.0 we implement OTS.
    andy
    Hi,
    Based on the links below:
    http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
    It appears that is possible to have distributed transactions across
    RMI-IIOP
    clients and RMI-IIOP applications (servers).
    I followed up the "Transactions Sample RMI Code" section but it appearsthat
    the transaction context is not propagated from client to server. I amalso
    surprised by the note:
    Note: These code fragments do not derive from any of the sampleapplications
    that ship with WebLogic Server. They merely illustrate the use of the
    UserTransaction object within an RMI application.
    The above note suggests that there is no sample code available.
    Is there anyone who successfully had RMI-IIOP applications (servers)
    participating in distributed transactions?
    Is there any sample code that illustrates RMI-IIOP applications(servers)
    participating in distributed transactions?
    If anyone thinks that this should work I will post my code that does not
    work.
    Regards,
    Dan Cimpoesu

  • Distributed transactions across RMI-IIOP client to server do not work

    Hi,
    Based on the links below:
    http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
    It appears that is possible to have distributed transactions across RMI-IIOP
    clients and RMI-IIOP applications (servers).
    I followed up the "Transactions Sample RMI Code" section but it appears that
    the transaction context is not propagated from client to server. I am also
    surprised by the note:
    Note: These code fragments do not derive from any of the sample applications
    that ship with WebLogic Server. They merely illustrate the use of the
    UserTransaction object within an RMI application.
    The above note suggests that there is no sample code available.
    Is there anyone who successfully had RMI-IIOP applications (servers)
    participating in distributed transactions?
    Is there any sample code that illustrates RMI-IIOP applications (servers)
    participating in distributed transactions?
    If anyone thinks that this should work I will post my code that does not
    work.
    Regards,
    Dan Cimpoesu

    But if you look to the diagram:
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1040200
    it suggests that transactional context is passed from clients to RMI-IIOP
    servers.
    Am I wrong?
    Dan
    "Andy Piper" <[email protected]> wrote in message
    news:[email protected]..
    "Dan Cimpoesu" <[email protected]> writes:
    Transactions over IIOP are not supported or implemented in WLS 6.1 or
    previous. This is a feature of WLS 7.0. In 7.0 we implement OTS.
    andy
    Hi,
    Based on the links below:
    http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
    It appears that is possible to have distributed transactions across
    RMI-IIOP
    clients and RMI-IIOP applications (servers).
    I followed up the "Transactions Sample RMI Code" section but it appearsthat
    the transaction context is not propagated from client to server. I amalso
    surprised by the note:
    Note: These code fragments do not derive from any of the sampleapplications
    that ship with WebLogic Server. They merely illustrate the use of the
    UserTransaction object within an RMI application.
    The above note suggests that there is no sample code available.
    Is there anyone who successfully had RMI-IIOP applications (servers)
    participating in distributed transactions?
    Is there any sample code that illustrates RMI-IIOP applications(servers)
    participating in distributed transactions?
    If anyone thinks that this should work I will post my code that does not
    work.
    Regards,
    Dan Cimpoesu

  • ClassCastException for RMI-IIOP client hitting CORBA server

    I am writing a RMI-IIOP client to connect to an existing CORBA C++ server. I started out with writing a RMI Interface mimicking the IDL and then converting into a stub using rmic -iiop option. I then use COSNaming to connect to the server. When I narrow the reference using PortableRemoteObject.narrow(), I get a ClassCastException. Probably because the object that I get from naming service will be a CORBA object which cannot be casted to RMI Interface object.
    Exception in thread "main" java.lang.ClassCastException
    at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at com.att.cswd.poc.RMIIIOPClient.IMSConnect(RMIIIOPClient.java:46)
    at com.att.cswd.poc.RMIIIOPClient.main(RMIIIOPClient.java:27)
    Caused by: java.lang.ClassCastException: Object is not of remote type com.att.cswd.poc.CORBAInterface
    at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:221)
    ... 3 more
    Code
                                    CORBAInterface ims;
              String tranCode="CRTUN130";
              byte[][] input_segs = null;
               try {
                    Hashtable hm = new Hashtable();
                    hm.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
                    hm.put("java.naming.provider.url", "corbaloc:iiop:BSYS.MVS.SC.COM:14050/NameService");
                    Context initialNamingContext = new InitialContext(hm);
                   Object objref = initialNamingContext.lookup("O2K/AdapterInterface");
                   ims = (CORBAInterface) PortableRemoteObject.narrow(objref, CORBAInterface.class);
                   byte output_segs[][] = ims.run_transaction_binary(tranCode, input_segs);               
                   System.out.println ("Response is " + output_segs);
              } catch (NamingException e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              }

    I am writing a RMI-IIOP client to connect to an existing CORBA C++ serverAs it says in [the Javadoc|http://java.sun.com/j2se/1.5.0/docs/guide/rmi-iiop/rmiiiopUsing.html#when], you can't do that. For RMI/IIOP you have to start with a PortableRemoteObject and rmic -iiop. You can use a C++ client to that but you can't use an RMI/IIOP client to a C++ server.
    Use IDLJ.

  • Rmi-iiop client for EJBs

    [att1.html]

    I've been fighting the same issues over the past few days. The answer you gave still left me
    wondering which tool to use. Should it be rmi -iiop or ejbc -iiop? I get the idl files on
    WLS 5.1 generated but then I can't get the idlj to execute properly on the generated
    HelloHome.idl and Hello.idl.
    Wayne
    Andy Piper wrote:
    Abhishek <[email protected]> writes:
    But How do I write Rmi - iiop clients for EJBs.
    when I try to generate the IDL for my EJB by running the weblogic.rmic utility I get an
    error that none of my classes ( Remote, Home and Impl ) implement the remote
    interface. Which is true as EJBs do not directly implement the remote interface.You may be able to get this to work with WLS6.0SP1 and the
    -idlMethodSignatures flag. Take a look at the methods target in
    examples/rmi_iiop/ejb/generic_idl or at
    examples/rmi_iiop/ejb/simplified_idl. This all works fine in
    Silversword.
    andy

  • PI 7.0 default client Implications

    Hi all,
    We have installed my production server PI 7.0 earlier and it is currently operating for some projects. But the problem is the client on which the production system working now is 001 (i.e default client). This we have just noticed that it is operating in client 001, so do we need to change this default client to some other custom client or is it right if we leave it as such.
    What can be its implication?
    Regards,
    Nithiyanandam

    Hi Pratheek,
    S you are right. When we installed the client has been defaultly mapped with 001, But now we are just thinking whether it will have any implications on further activities.
    Because it has been provided in SAP HELP as
    Production preparation client (001)
    The production preparation client is identical to the SAP Reference client, i.e. you cannot use this client in production processing either. The Customizing settings are made in this client. You Customize it into your test environment.
    http://help.sap.com/saphelp_sm32/helpdata/EN/7e/c8189452c511d182c50000e829fbfe/content.htm
    Also I refered sap notes 1115280 & 940309 which shows the info as
    The integration server is by default installed and configured in client 001. In most cases there is no need to change this and it is not recommended to do so. However, in some rare cases you might have to run your Integration Server client in another client than 001.
    So how could it be valid, so do we need to change tht client from 001 to XXX as indicated or we can leave it as such as we are already runnung few transactions in it.
    Regards,
    Nithiyanandam

  • Can Forte' IIOP Client catch Java exceptions?

    Hi all,
    we are using Forte' IIOP features in IDL Mode, to integrate a Forte' client
    and a Java server.
    Our configuration is:
    - java jdk 1.1.5
    - Visigenic VIsibroker 3.1 for Java ORB
    - Forte' 3.0.G
    Is it possible for the Forte' client to catch a Java exception?
    We tried to define an IDL file based on our Java server:
    module querye
    interface QueryClass
    exception MiaSQLException{};
    string EseguiQuery(in string query_string) raises
    (MiaSQLException);
    Using forte' corbagen utility we generated the forte' .pex file:
    begin TOOL querye;
    forward QueryClass;
    class QueryClass inherits from Framework.Object
    class MiaSQLException inherits from FrameWork.GenericException
    end class;
    has public method EseguiQuery(
    input query_string : string
    ) : string;
    has property
    distributed=(allow=on, override=on, default=on);
    end class;
    method QueryClass.EseguiQuery(
    input query_string : string
    ) : string
    begin
    end method;
    end querye;
    We we tried to import the .pex file in the forte' repository, forte' raise
    a Syntax Error.
    Any idea?
    TIA
    Giuseppe Sorce
    CSI Piemonte - C.so Unione Sovietica 216 - 10134 Torino - ITALY
    tel. +39-011-3168736
    fax +39-011-3168212
    e-mail [email protected]
    url http://www.csi.it
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I am trying to get Forte to communicate with Orbix (not the web
    version) via IIOP. Right now I am trying to set up an Orbix C++
    server with Forte being the client. Eventually I will need to
    communicate the other way (Forte being the server -- I need to do
    both). Right now I cannot get Forte to connect to the server. Any
    suggestions would be appreciated.
    Thanks in advance,
    Dale Boan
    Details
    I am running Forte on an NT machine and the Orbix server under HP-UX.
    Under NT, I am using Forte 3.0.F.2 with IIOP enabled (I think - it
    shows up in the partition GUI).Which version of Orbix are you using? I believe 2.3c is required. At least I
    know that Forte has successfully called Orbix services using 2.3c.
    - Coty

  • RE:Can Forte' IIOP Client catch Java exceptions?

    you can't have nested classes !!!
    Fort&eacute; does not handle them yet...
    try something like this :
    module querye
    exception MiaSQLException
    string error;
    interface QueryClass
    string EseguiQuery(in string query_string) raises
    (MiaSQLException);
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I am trying to get Forte to communicate with Orbix (not the web
    version) via IIOP. Right now I am trying to set up an Orbix C++
    server with Forte being the client. Eventually I will need to
    communicate the other way (Forte being the server -- I need to do
    both). Right now I cannot get Forte to connect to the server. Any
    suggestions would be appreciated.
    Thanks in advance,
    Dale Boan
    Details
    I am running Forte on an NT machine and the Orbix server under HP-UX.
    Under NT, I am using Forte 3.0.F.2 with IIOP enabled (I think - it
    shows up in the partition GUI).Which version of Orbix are you using? I believe 2.3c is required. At least I
    know that Forte has successfully called Orbix services using 2.3c.
    - Coty

  • Cannot connect RMI-IIOP client to standalone OC4J (10.1.3)

    [PROBLEM]
    I am trying to access an EJB session bean from a simple remote java client.
    The EJB is deployed to a standalone OC4J server.
    Using the RMI-over-IIOP protocol for client-server communication.
    The client and server run in separate JVMs (but on the same machine).
    This is a simple java client program, not a J2EE application client.
    The InitialContext creation fails with the errors shown below.
    I searched around on the web, and found other people with the same issue, but no solution:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4995985
    Maybe I'm missing something in my configuration, deployment, client invocation?
    Any help will be greatly appreciated!
    [SETUP]
    I generated the iiop stubs during deployment (-DGenerateIIOP=true) to the server. Added the generated IIOPClient jar file to my client classpath.
    Also specified -enableIIOP and remote=true for the EJB deployment.
    As per the 10.1.3 documentation, I also specified the following command line arguments:
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject
    -Dcom.oracle.CORBA.OrbManager=com.oracle.corba.ee.impl.orb.ORBManagerImpl
    -Dorg.omg.CORBA.ORBInitialHost=testpc1
    -Dorg.omg.CORBA.ORBInitialPort=5555
    Verified in Oracle Enterprise Manager 10g (Application Server Control) that the application was deployed successfully, and a Stateful Session Bean is visible in the EJB pane.
    Also verified that the iiop port (5555) is functioning (netstat).
    internal-settings.xml file:
    <server-extension-provider name="IIOP" class="com.oracle.iiop.server.IIOPServerExtensionProvider">
         <sep-property name="port" value="5555"/>
         <sep-property name="host" value="localhost"/>
         <sep-property name="ssl" value="false"/>
         <sep-property name="ssl-port" value="5556"/>
         <sep-property name="ssl-client-server-auth-port" value="5557"/>
         <sep-property name="trusted-clients" value="*"/>
    </server-extension-provider>
    server.xml file contains this entry:
    <sep-config path="./internal-settings.xml"/>
    [Versions]
    Oracle Containers for J2EE 10g (10.1.3.0.0) (build 060119.1546.05277)
    java version "1.5.0_04"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
    [ERROR]
    com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoImpl <init>
    WARNING: ORBUTIL.invalidEndPointInfoType
    org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 281 completed: No
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.invalidEndPointInfoType(ORBUtilSystemException.java:5084)
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.invalidEndPointInfoType(ORBUtilSystemException.java:5106)
    at com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoImpl.<init>(SocketFactoryContactInfoImpl.java:62)
    at com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoListIteratorImpl.next(SocketFactoryContactInfoListIteratorImpl.java:59)
    at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:114)
    at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:214)
    at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
    at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:345)
    at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
    at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
    at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
    at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURL(iiopURLContextFactory.java:61)
    at com.sun.jndi.url.iiop.iiopURLContextFactory.getObjectInstance(iiopURLContextFactory.java:34)
    at oracle.j2ee.iiop.IIOPInitialContextFactory.getInitialContext(IIOPInitialContextFactory.java:76)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at ejbremoteclient.Main.getContext(Main.java:80)
    at ejbremoteclient.Main.main(Main.java:87)
    javax.naming.NamingException
    at oracle.j2ee.iiop.IIOPInitialContextFactory.getInitialContext(IIOPInitialContextFactory.java:86)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at ejbremoteclient.Main.getContext(Main.java:80)
    at ejbremoteclient.Main.main(Main.java:87)
    ClientIIOPSSLSocketFactory.getEndpointInfo: iopprofile is not an instance of IIOPProfileTemplate
    [CLIENT CODE]
    // get context
    Hashtable env = new Hashtable();
    env.put("java.naming.provider.url", "corbaname::testpc1:5555#DME3");
    env.put("java.naming.factory.initial", "oracle.j2ee.iiop.IIOPInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    Context ic = new InitialContext(env); <---FAILS HERE

    Hello Deepak
    I've been doing some other stuff and then back to RMI/IIOP tests wih my app...
    Finally I passed the previous errors, it all ended up being misconfigurations on the server and client side.
    Now I'm striving with this one ...
    java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
         org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
         at oracle.oc4j.corba.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:354)
         at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:509)
         at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:505)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:429)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:204)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
         at com.x.tools.login.ejb._LoginHome_Stub.create(Unknown Source)
         at com.x.tools.login.clientside.model.Facade.<init>(Facade.java:168)
         at com.x.tools.login.clientside.model.Facade.getInstance(Facade.java:122)
         at com.x.tools.login.clientside.LoginApp.doLogin(LoginApp.java:169)
         at com.x.tools.login.clientside.Login.getInstance(Login.java:83)
         at com.x.caracas.AdminApp.clientside.MainAdminApp.<init>(MainAdminApp.java:30)
         at com.x.caracas.AdminApp.clientside.MainAdminApp.main(MainAdminApp.java:81)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
         at oracle.oc4j.corba.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:354)
         at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:509)
         at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:505)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:429)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No
         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.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:791)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:97)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:546)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:132)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
         ... 18 more
    Hope it's easy to solve ... I'm not using JAAS .. my jndi.properties looks like this:
         java.naming.security.principal=oc4jadmin
    java.naming.security.credentials=welcome javax.rmi.CORBA.PortableRemoteObjectClass=com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject
    com.oracle.CORBA.OrbManager=com.oracle.corba.ee.impl.orb.ORBManagerImpl
    java.naming.factory.initial=oracle.j2ee.iiop.IIOPInitialContextFactory
    java.naming.provider.url=corbaname::serverhost:13321#/MyApp

  • Cannot connect to Oracle 8i with IIOP from JDev3.1

    Hi,
    I have the problem of connect to Oracle 8i with IIOP from JDeveloper 3.1 when I build application with BC4J. I can connect to my Oracle 8i database with ODBC easily but failed with IIOP. Does anyone here has the same experience?
    Any help will be appreciated. Thank you.
    null

    Hi Daniel:
    I've solved the problem mentioned above. It requires two settings:
    I) Enabling Multithreaded Server Support for IIOP Clients;
    II) Listener's listening to port 2481
    Of course you should have installed JServer into your Oracle 8i database.
    In your init.ora file, you should have the following two lines:
    mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"
    mts_dispatchers = "(protocol=TCP)"
    To confirm this you may use SQLPLUS to list the parameters of the database setting:
    mts_dispatchers string (PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer), (protocol=TCP)
    mts_servers integer 1
    And in TNSnames.ora file the setting should like this:
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = wangsvr)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = wangsvr)(PORT = 2481))
    All these two settings ( init.ora and tnsnames.ora ) can be done with "Database Configuration Assistant" and "Net8 Assistant"
    I solved my problem this way, your problem may not the same but anyway you may try it.
    null

  • Forte IIOP / Corba / Java more questions...

    Hi,
    I wonder if any Forte / IIOP / Java people can help...
    We are a Forte site developing an application using the Forte Web SDK (
    window converter / Javascript etc ) and using the Forte external connection
    class to enable direct communication between Fort Service objects and Java
    applets. We are considering using Corba / IIOP for Java <-> Forte comms but
    I could use some advice.
    Has anyone compared data transfer rates for Forte client <-> Forte remote
    service object vs Java IIOP client to Forte IIOP Service object ( all
    across the same LAN ) ? There are of course many factors that might
    influence data transfer speeds - but any info would be appreciated. I
    really just want to know IIOP communication rates differ from those handled
    end-to-end by Forte.
    Secondly, does anyone know about scalability of the Forte IIOP Gateway or
    Forte IIOP listeners - how many simultaneous IIOP connections can be
    supported ?
    Thirdly, does anyone know if there are memory limitations for applets
    running in browsers - can an applet request additional memory - or is it
    simply part of the browsers overall allocation ( important for the Mac
    platform ? )
    Finally, has anyone used OrbixWeb as the IIOP Java client - experiences,
    warnings etc. appreciated.
    Cheers - Dave.
    Dave Maclaurin, ITS, University of Otago, Dunedin, New Zealand
    mailto:[email protected]
    Ph (03) 4798530

    Hi,
    I wonder if any Forte / IIOP / Java people can help...
    We are a Forte site developing an application using the Forte Web SDK (
    window converter / Javascript etc ) and using the Forte external connection
    class to enable direct communication between Fort Service objects and Java
    applets. We are considering using Corba / IIOP for Java <-> Forte comms but
    I could use some advice.
    Has anyone compared data transfer rates for Forte client <-> Forte remote
    service object vs Java IIOP client to Forte IIOP Service object ( all
    across the same LAN ) ? There are of course many factors that might
    influence data transfer speeds - but any info would be appreciated. I
    really just want to know IIOP communication rates differ from those handled
    end-to-end by Forte.
    Secondly, does anyone know about scalability of the Forte IIOP Gateway or
    Forte IIOP listeners - how many simultaneous IIOP connections can be
    supported ?
    Thirdly, does anyone know if there are memory limitations for applets
    running in browsers - can an applet request additional memory - or is it
    simply part of the browsers overall allocation ( important for the Mac
    platform ? )
    Finally, has anyone used OrbixWeb as the IIOP Java client - experiences,
    warnings etc. appreciated.
    Cheers - Dave.
    Dave Maclaurin, ITS, University of Otago, Dunedin, New Zealand
    mailto:[email protected]
    Ph (03) 4798530

  • Smallest JMS Client footprint?

              Hi everyone,
              I would like to deploy a JMS client applet and avoid downloading the 38MB weblogic.jar
              file. The WebLogicThinClient whitepaper gives a few suggestions on how to reduce
              the size of the JAR file. After getting the first method to work (using utils.verboseTozip),
              I'm left with a JAR file containing 1058 class files and weighing in at a little
              over 5 Mb. Is this really the smallest set of files required to support JMS functionality?
              Thanks,
              Elias
              

    Hi Elias,
              I don't know the answer the to all your problems, hopefully someone else
              in the newsgroup can contribute here. More in-line.
              Tom
              [email protected] wrote:
              > Hi again,
              >
              > I've been experimenting with the URLClassLoader and you were right, the
              > JAR file produced using this method is much smaller (1Mb) than the one
              > produced with the verboseToZip utility (5Mb). Furthermore, I am now able
              > to run my JMS tests without seeing any exceptions.
              As a safety precaution: if you plan on disabling the URLClassLoader once
              you've got the classes, you may wish to consider including all "Exception"
              classes that occur in the same package as any other class you download.
              This is in case your tests don't cover all error conditions...
              > Unfortunately, there
              > are still a couple of vexing problems:
              >
              > Just after starting the URLClassLoader program the following message
              > appears.
              > "Unable to access Localizer, weblogic.i18n.L10nLogLocalizer"
              > Not one of the jar files in the server/lib directory contains this
              > class. There is a L10nLogLocalizer.properties file, which should be
              > located by the URLClassLoader but isn't...?
              I think you're correct. I'm not sure how to force the URLClassLoader
              to find such files. If you find out, please let me know.
              In this case, I think this file is only used for localizing client side log messages that
              get dumped to stdout, but there are very few such messages. If your app runs,
              I think you can safely ignore the "Unable to access..." message.
              >
              >
              > After setting up the JMS environment (connections, sessions, producers,
              > consumers, etc.), the test driver publishes some messages of different
              > types. The onMessage() method I implemented should print out "received X
              > message", where X is the message type. Unfortunately, I don't see this
              > message printed out at all and instead see "testSync TX = null" instead.
              > I have no idea what this means, but it appears that the onMessage()
              > method is not being invoked for some reason. Do you have any idea what
              > this indicates?
              No.
              > Am I somehow missing a class that I need?
              To narrow down the problem:
              Try with the full weblogic.jar in the applet.
              Try running as regular client with full weblogic.jar, then with your small.jar.
              > Has anyone
              > else ever seen this message print out when they were expecting something
              > else? Thanks again for any assistance, I feel quite close to a workable
              > solution! Please let the BEA developers working with JMS that the "thin
              > JMS client" JAR file will be well received.
              Just send cash directly to BEA's Liberty Corner, NJ site.
              >
              >
              > Elias
              >
              > Tom Barnes wrote:
              >
              > > The URLClassLoader method in the same white-paper will likely produce a smaller client than the
              > > verboseTozip method - perhaps at least half the size.
              > >
              > > The next release of WL (unofficially 7.1) will include the long-awaited pre-packaged thin JMS
              > > client. (Yes finally!) Really really. I think the beta is scheduled to be out before the
              > > end of the year (sorry I can't give out the planned dates - I don't know if they are public
              > > yet.)
              > >
              > > Currently, I think the smallest J2EE style applet client can be achieved by proxying JMS calls
              > > via an EJB, where calls to the EJB are made via the JVM's built-in IIOP client.
              

  • Application Client

    The J2EE specification requires support for a client container that runs standalone Java applications (known as J2EE application clients) and provides J2EE services to the applications. J2EE services include naming, security, and resource connections.
    The only information i could find about this topic was, how to deploy a J2EE Client module in JDeveloper.
    But how are J2EE application clients of OC4J/ORACLE IAS are launched.
    And how do they use the J2EE services(security...JAAS) mentioned above.

    The subject here is the CLIENT Container and NOT the J2EE Container.
    The tutorials you mentioned only contain Web clients.
    The testing client is a simple RMI/IIOP Client.
    The JDeveloper doc says:
    "Oracle9iAS provides full support for J2EE Client applications. For more information, refer to "Chapter 9, Application Clients in the J2EE Platform Specification".
    So have a look here, to know, what we are talking about:
    http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf Chapter 9
    The others do it this way:
    http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060007.html
    How is this done for our product?
    How can i launch my client in an (Oracle) application-client-container against my EJB's hosted by an OC4J ?

  • Moved to iAS SP3 and IIOP to secure app fails

    Hello,
    I have just moved to iAS SP3 from SP2 and our rich client nolonger asks
    me to log in?! In SP2 it did as required by the security roles in the
    deployment descriptors. In the CXS log I get the following:
    [21/Sep/2001 15:09:58:1] info: ENGINE-ready: ready: 10821
    eng =com.kivasoft.types.enumSubKeysIGDSKey@10cb03
    eng =com.kivasoft.types.enumSubKeysIGDSKey@6cb8
    eng =com.kivasoft.types.enumSubKeysIGDSKey@61a408
    eng =com.kivasoft.types.enumSubKeysIGDSKey@581784
    [21/Sep/2001 15:12:13:2] error: EB-001: Unable to locate interface
    IGXTxnAssocMgr
    [21/Sep/2001 15:12:13:4] info: PROT-006: new connection established
    I'm wondering about the second last line with the error. Anyone have any
    comments/thoughts?
    Anyone else using SP3 with an IIOP client to a secure app?
    Thanks, Jeff

    Hello,
    More info. I think it is my deployment descriptor that is the issue.
    Somehow SP2 determined what secure application an EJB belonged to and asked
    my IIOP client to ask for the user/password. Now I think I need to include
    the role information etc within the descriptors for the EJBs. I did this as
    described in the DTDs but still nothing. Does anyone have a working secure
    IIOP client running with SP3?
    Thanks , Jeff
    Jeff Williams <[email protected]> wrote in message
    news:9og3l8$[email protected]..
    Hello,
    I have just moved to iAS SP3 from SP2 and our rich client nolongerasks
    me to log in?! In SP2 it did as required by the security roles in the
    deployment descriptors. In the CXS log I get the following:
    [21/Sep/2001 15:09:58:1] info: ENGINE-ready: ready: 10821
    eng =com.kivasoft.types.enumSubKeysIGDSKey@10cb03
    eng =com.kivasoft.types.enumSubKeysIGDSKey@6cb8
    eng =com.kivasoft.types.enumSubKeysIGDSKey@61a408
    eng =com.kivasoft.types.enumSubKeysIGDSKey@581784
    [21/Sep/2001 15:12:13:2] error: EB-001: Unable to locate interface
    IGXTxnAssocMgr
    [21/Sep/2001 15:12:13:4] info: PROT-006: new connection established
    I'm wondering about the second last line with the error. Anyone have any
    comments/thoughts?
    Anyone else using SP3 with an IIOP client to a secure app?
    Thanks, Jeff

Maybe you are looking for