RMI clustered object...

          Hi all!
          You can create a clusterable RMI object with a -clusterable version and WebLogic
          documentation says the calls will be load balanced (unless -stickToFirstServer
          option is used) and can fail over in case of a problem. But what if the object
          is statefull??? If the method call is load-balanced to another server in the cluster
          the state is lost???
          Thank you very much in advance.
          Dave.
          

6.1 supports clustering stateful session beans. Use those instead. (Or a
          coherent cache ;-)
          Peace,
          Cameron Purdy
          Tangosol Inc.
          Tangosol Coherence: Clustered Coherent Cache for J2EE
          Information at http://www.tangosol.com/
          "Dave" <[email protected]> wrote in message
          news:3c1702d2$[email protected]..
          >
          > Hi all!
          > You can create a clusterable RMI object with a -clusterable version and
          WebLogic
          > documentation says the calls will be load balanced
          (unless -stickToFirstServer
          > option is used) and can fail over in case of a problem. But what if the
          object
          > is statefull??? If the method call is load-balanced to another server in
          the cluster
          > the state is lost???
          >
          >
          > Thank you very much in advance.
          > Dave.
          

Similar Messages

  • RMI Clustering in Weblogic 7.0

    Hi !
    I am trying to use RMI Clustering in Weblogic 7.0. I followed the samples in the
    documentation and it doesnt work for me. I could successfully bing my RMi Server
    object to the JNDI tree and could view it via the weblogic JNDI tree. Even the
    lookup is fine, but when I invoke a method on the remote object via the client,
    I get the following error. Clearly there is something wrong with the Dynamic stub
    downloaded from the JNDI tree.
    Any Clues please...
    Thanks
    Sanjay
    class examples.rmi.hello.HelloImpl_WLStub
    java.rmi.ConnectException: Couldn't connect to weblogic.rjvm.RJVMImpl@3a0ab1 -
    id: '6003776402499002017C:15.10.45.93R:12
    46860412257523095S:15.10.45.93:[7001,7001,7002,7002,7001,7002,-1]:examples:examplesServer'
    connect time: 'Fri Sep 06 08:
    42:01 IST 2002'
    at weblogic.rjvm.ConnectionManager.getOutputStream(ConnectionManager.java:1559)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:363)
    at weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:88)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:116)
    at examples.rmi.hello.HelloImpl_WLStub.sayHello(Unknown Source)
    at examples.rmi.hello.HelloClient.main(HelloClient.java:42)

    Hi !
    I am trying to use RMI Clustering in Weblogic 7.0. I followed the samples in the
    documentation and it doesnt work for me. I could successfully bing my RMi Server
    object to the JNDI tree and could view it via the weblogic JNDI tree. Even the
    lookup is fine, but when I invoke a method on the remote object via the client,
    I get the following error. Clearly there is something wrong with the Dynamic stub
    downloaded from the JNDI tree.
    Any Clues please...
    Thanks
    Sanjay
    class examples.rmi.hello.HelloImpl_WLStub
    java.rmi.ConnectException: Couldn't connect to weblogic.rjvm.RJVMImpl@3a0ab1 -
    id: '6003776402499002017C:15.10.45.93R:12
    46860412257523095S:15.10.45.93:[7001,7001,7002,7002,7001,7002,-1]:examples:examplesServer'
    connect time: 'Fri Sep 06 08:
    42:01 IST 2002'
    at weblogic.rjvm.ConnectionManager.getOutputStream(ConnectionManager.java:1559)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:363)
    at weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:88)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:116)
    at examples.rmi.hello.HelloImpl_WLStub.sayHello(Unknown Source)
    at examples.rmi.hello.HelloClient.main(HelloClient.java:42)

  • Weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non clusterable object with jndiName ]

    Hi,
    I am trying to deploy an EJB module have 4-5 EJB's on weblogic 8.1 through JBuilder.
    I am getting following error during deployment.
    Exception:weblogic.management.ApplicationException: prepare failed for Sample.jar
         Module: Sample.jar     Error: Exception preparing module: EJBModule(Sample.jar,status=NEW)
    Unable to deploy EJB: SampleBean from Sample.jar:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non
    clusterable object with jndiName ]
         at weblogic.utils.Debug.assertion(Debug.java:57)
         at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:272)
         at weblogic.ejb20.internal.BaseEJBHome.setup(BaseEJBHome.java:95)
         at weblogic.ejb20.internal.StatelessEJBHome.setup(StatelessEJBHome.java:67)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:979)
         at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)
         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Any clue?, what its talking about?
    Thanks
    Naresh

    Hi,
    I am trying to deploy an EJB module have 4-5 EJB's on weblogic 8.1 through JBuilder.
    I am getting following error during deployment.
    Exception:weblogic.management.ApplicationException: prepare failed for Sample.jar
         Module: Sample.jar     Error: Exception preparing module: EJBModule(Sample.jar,status=NEW)
    Unable to deploy EJB: SampleBean from Sample.jar:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non
    clusterable object with jndiName ]
         at weblogic.utils.Debug.assertion(Debug.java:57)
         at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:272)
         at weblogic.ejb20.internal.BaseEJBHome.setup(BaseEJBHome.java:95)
         at weblogic.ejb20.internal.StatelessEJBHome.setup(StatelessEJBHome.java:67)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:979)
         at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)
         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Any clue?, what its talking about?
    Thanks
    Naresh

  • RMI Clustering

    Hi All,
    We have developed a Spring RMI application and we developed business logic in spring POJO's. Using this RMI technology I exposed my business components to client. Here I have developed userinterface with swings.
    It is a client server application. Here I didn't use any EJB kind of technology because spring provides
    some of the services like security and Transaction Management.
    But I have some questions regarding RMI based implementation.
    1) How can I put my application in clusturing environment?.
    2) Is there any application server providing clustering for SpringRMI/RMI application?.
    3) Is application server necessary for implementing clustering for Spring RMI based application?.
    4) Whether this approach is correct or not?
    Suggest me the currect approach and Spring RMI clustering.
    Thanks in Advance
    Mohan Reddy. M

    If you want reliable cluster-wide state replication, there's only one
              option: http://www.tangosol.com/products-clustering.jsp
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              Clustering Weblogic? You're either using Coherence, or you should be!
              Download a Tangosol Coherence eval today at http://www.tangosol.com/
              "Stone Cold Steve Austin" <[email protected]> wrote in
              message news:3cce62c9$[email protected]..
              >
              > What v understood from Failover for RMI Objects (RMI Clustering) is
              weblogic load
              > balances the method calls across servers in the cluster & doesn't
              implement fail-over
              > / replication.If our understanding is wrong can anyone guide us for
              replicating RMI
              > Objects like Http Session State Replication.
              

  • RMI server object lookup in a session bean

    Hi all,
    I am getting MarshalException when I call java.rmi.Naming.lookup() in a session
    bean. Following is the code and exception. Please note that I am using java.rmi
    package instead of weblogic.rmi and that both the session bean and RMI server
    object (a startup class) is deployed on the same machine.
    Thanks for your help in advance.
    // a simple, replica-aware session bean method
    // some code here
    try {
    MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);
    catch (Exception e) {
    // log the exception
    The exception:
    java.rmi.MarshalException: Error marshaling transport header; nested exception
    i
    s:
    java.io.EOFException
    java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:224)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:84)
    at test.mgmtop.CreateNetworkOpHandler.execute(CreateNetworkOpHandler.jav
    a:88)
    at test.mgmtop.CreateNetworkOpHandler.perform(CreateNetworkOpHandler.jav
    a:28)
    at test.ejb.MgmtServiceBean.create(MgmtServiceBean.java:57)
    at test.ejb.MgmtServiceSession_idi8yo_EOImpl.create(MgmtServiceSession_i
    di8yo_EOImpl.java:46)
    at test.ejb.MgmtServiceSession_idi8yo_EOImpl_WLSkel.invoke(Unknown Sourc
    e)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:346)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:300)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
    eManager.java:762)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:295)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

    Hi Pyung,
    How about trying this instead:
    InitialContext ctx = new InitialContext();
    MediatorInterface mediator = (MediatorInterface) ctx.lookup("TestMediator");
    This assumes your startup class binds the Mediator to the JNDI name "TestMediator".
    - Matt
    Pyung Yoon wrote:
    Hi all,
    I am getting MarshalException when I call java.rmi.Naming.lookup() in a session
    bean. Following is the code and exception. Please note that I am using java.rmi
    package instead of weblogic.rmi and that both the session bean and RMI server
    object (a startup class) is deployed on the same machine.
    Thanks for your help in advance.
    // a simple, replica-aware session bean method
    // some code here
    try {
    MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);
    catch (Exception e) {
    // log the exception
    The exception:
    java.rmi.MarshalException: Error marshaling transport header; nested exception
    i
    s:
    java.io.EOFException
    java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:224)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:84)
    at test.mgmtop.CreateNetworkOpHandler.execute(CreateNetworkOpHandler.jav
    a:88)
    at test.mgmtop.CreateNetworkOpHandler.perform(CreateNetworkOpHandler.jav
    a:28)
    at test.ejb.MgmtServiceBean.create(MgmtServiceBean.java:57)
    at test.ejb.MgmtServiceSession_idi8yo_EOImpl.create(MgmtServiceSession_i
    di8yo_EOImpl.java:46)
    at test.ejb.MgmtServiceSession_idi8yo_EOImpl_WLSkel.invoke(Unknown Sourc
    e)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:346)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:300)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
    eManager.java:762)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:295)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

  • RMI Server Object Pooling

    Hello All,
    Does WLServer6.1 take care of having a pool of RMI Server objects, similar
    to the way EJB container does it for EJBs. I guess what I am trying to
    achieve is an effect of Servlets that spawn light threads per invocation
    though now using RMI Server Object. I did look at the "executeThreadPool"
    options which would allow for increasing performance. I am not 100%
    satisfied with it though. Is there any way I can do this. Thanks,
    Chirag

    "Pyung Yoon" <[email protected]> writes:
    MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);This implies JRMP which the server does not support. You need to use t3 or iiop.
    andy

  • Help needed to move a java.rmi.Remote object.....

    Hi,
    I have an object extending java.rmi.Remote on a server. I want to get it onto a client (ie the actual object, not a reference to the object on the server).
    The catch (isn't there always one):
    The client must only get class definitions/interface definitions from the java.rmi.server.codebase
    (ie I don't want to use a network classloader).
    Anyone any ideas?
    Kev.

    If you have a class that implements java.rmi.Remote then the objects of that class by definition are available for Remote access (ie, they are passed by reference). Remote objects can't be passed by value. However, if you want objects of a particular class to be passed by value you could have the class implement java.io.Serializable instead of java.rmi.Remote.
    Hope this helps.

  • RMI - Serializing Object with the right constructor..?

    Hello, I am trying to usr RMI to send an object that I serialized but I have further porblems than that. The Object that I am using is called FileLineReader and it Extends Buffered Reader. SInce Buffered Reader is not Serializable, I implemented Serializable within FileLineReader, so that I can send it through the RMI.
    package musr.client.dbreader;
    import java.io.*;
    public class FileLineReader extends BufferedReader
              implements LineReader, java.io.Serializable {
    String pattern; // The string we are going to be matching.
    * Constructor
    * Passes the stream to our superclass
    public FileLineReader(Reader in) { super(in); }
    * This is the filter: call our superclass's readLine() to get the
    * actual lines, but only return lines that contain the pattern.
    * When the superclass readLine() returns null (EOF), we return null.
    public String matchLine(String pattern) throws IOException {
    String line;
    do { line = super.readLine(); }
    while ((line != null) && line.indexOf(pattern) == -1);
    return line;
    When I use this object to send it through RMI to the Server,
    (FileLineReader)inFile = (FileLineReader) obj.senddbFile(openFileTextField1.getText(),openFileTextField2.getText());
    I get an exception:
    GUI_RMI exception, error unmarshalling return; nested exception is: java.io.InvalidClassException: musr.client.dbreader.FileLineReader; no valid constructor.
    I am not sure what the problem is and I have been struggling with it for a while now. The constructor of BufferedReader takes one argument in so I have to pass FileLineReader an argument when I construct it. I think the RMI needs a constructor that takes no arguments and that causes problems. Is that true? In that case, I can't extend my class with BufferedReader.
    Or maybe the problem is somthing quite different. Anyone has any suggestions or comments, I'd appreciate help. Thanks Ivan

    You will have to create your own stream. (RMI is just a way to call reemote methods; it knows nothing about files or I/O.)
    1. You need a RemoteReader. This object should probably have 3 or so methods:
    Open(filename) Opens the file
    read reads a block from the file and returns it as a byte array.
    close()
    2. You need a RemoteInputStream object.
    o Instantiated on the client.
    o Makes calls to the RemoteReader.
    o Has some read methods and a close method.
    o Implements InputStream.
    With these two objects, you have enough underpinnings top - for example - wrap the RemoteINputStream in a BufferedReader or whatever you need.

  • Clustering objects in jndi

    Hi all,
    I am building a solution using weblogic version 6.1sp1.
    I am needing to share an object around a set of clusters to tell each cluster
    about the services in the other clusters.
    The first solution I thought of was to create a javax.naming.Reference to bind
    into each of the clusters' JNDI tree and have it replicated throughout the tree.
    After reading about the behavior of these types of objects, I am not sure how
    to proceed.
    It appears from the docs that if the server that bound the object into jndi goes
    down the object will be unbound from all of the other servers in the cluster.
    Please inform if my interpretation of the docs was incorrect.
    The solution I am working for now is to not replicate the objects, and to create
    a startup class for all of the servers, when they come up they will create and
    bind their own versions.
    Also, if anyone has another solution to this problem please reply ...

    Your solution sounds right. Don't forget to set REPLICATE_BINDINGS to 'false' :
    http://e-docs.bea.com/wls/docs61/javadocs/weblogic/jndi/WLContext.html
    Chris Humphrey <[email protected]> wrote:
    Hi all,
    I am building a solution using weblogic version 6.1sp1.
    I am needing to share an object around a set of clusters to tell each cluster
    about the services in the other clusters.
    The first solution I thought of was to create a javax.naming.Reference to bind
    into each of the clusters' JNDI tree and have it replicated throughout the tree.
    After reading about the behavior of these types of objects, I am not sure how
    to proceed.
    It appears from the docs that if the server that bound the object into jndi goes
    down the object will be unbound from all of the other servers in the cluster.
    Please inform if my interpretation of the docs was incorrect.
    The solution I am working for now is to not replicate the objects, and to create
    a startup class for all of the servers, when they come up they will create and
    bind their own versions.
    Also, if anyone has another solution to this problem please reply ...--
    Dimitri

  • RMI server object getting garbage collected

    Hi all,
    I have seen a number of posts regarding the ConnectException and found that this can occur in a number of situations.
    I am having a problem here.
    I am having an RMI server that is always up and running. And the server object gets requests from the client at regular intervals. But, when the server object is not receiving any requests for a long time (ex: 1 day), then I think the remote object itself is getting garbage collected. And so, tough I am able to get the remote reference using the lookup method, I am getting "Connection refused to host: 192.168.0.216; nested exception is:
         java.net.ConnectException: Connection refused" when I call a method using this reference.
    I believe that this is because the server object getting garbage collected as there are no requests for the server since long. Please correct me if my assumption is wrong.
    I want to know, after how much time the server object gets garbage collected if no requests are received. But, my requirement is that the server object should always be available and WHENEVER a client request comes then that should be processed. What should I do to accomplish this task.
    If any one have any suggestions, please reply as soon as possible.
    Thanks in advance,
    srik4u

    You might do some research into using an activatable remote object. You run rmid (the rmi activation deamon) and register a subclass of java.rmi.activation.Activatable (instead of the usual UnicastRemoteObject) with it. With an activatable object, the remote reference to the activatable object doesn't need to have a live object behind it. If an activatable object is not running (ie: it hasn't been constructed yet, or it has been garbage collected ...as in your case) a remote reference to the object can still be exported to a client. The first time the client calls a method on the remote object, the activation service on the server sees the object is not active, and activates the object for the client. If the object is running ...it is rmi as usual. But if it gets gc'd again, the next invocation on the remote object will trigger the activation service again.
    (The above explanation paraphrases author David Flanagan from Java Enterprise in a Nutshell, O'Reilly)
    I have only built one of these, which loosely followed an example from the above mentioned book. It's a whole other ballgame over and above a regular rmi object. But like anything else, if you dig in and get your head wrapped around it, it eventually makes sense. Ok, why lie ...it confused the hell out of me and left me a little queasy. But you know the drill, by the time you build a few of them it will probably seem as easy as mapping the human genome, right? At any rate, it seems like what you might be after ...so have a look at it. Good luck, and wear your lifejacket.

  • RMI Server Object Startup Error

    Greetings,
    I am trying to set up a computer lab at my college. I currently have one server running Slackware 9.1 and one client (my laptop) running Windows XP Home. I can telnet and ftp from my client. I can also access the Apache web server running on the Linux machine. I recently discovered RMI as a way to do distributed computing (we are trying to build a proof-of-concept distributed computing system). However, I cannot get RMI to work. When I take the code I wrote and use my laptop as both client and server, everything works. However, when I try to use both machines, it does not work. I want the Linux box to be the server and my laptop to be the client. After compiling my RMI server class (the class that registers the server object for use under RMI) and running it by typing java RemServer, I get a strange error (see bottom of this message). I cannot find this error anywhere else on the internet. I have the rmiregistry program running. I do everything the same as when I do RMI on just my laptop. Please help!
    RemServer Remote Exception: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.net.SocketException: Connection reset
    [Ljava.lang.StackTraceElement;@13d93f4
    Thanks,
    Jason

    One thing I did discover is that I have not been explicitly starting rmid. Some documentation says that rmi starts rmid automatically. If I need to start rmid, what parameters to I need to pass to it?
    Thanks,
    Jason

  • RMI live object Object ID at transport layer

    Hi...
    On the server side, when the server object is created, the constructor of UnicastRemoteObject performs an exportObject(). Inside exportObject(), an UnicastServerRef object is instantiated and exported. It creates a live reference object (the transport layer) which contains an IP address, a TCP port number and an Object ID.
    From some article i read this.
    Then a mapping from the Object ID to the stub and skeleton is registered in an object table residing in the transport layer.
    Could nyone plz tell me wat is this:
    1.Live reference object
    2.Object ID
    How it relates to stub and skeleton and wat is this mapping?
    I searched a lot in UnicastServerRef class's exportObj() method, it further defines some Target class object. In fact i searched all this in Util class then WeakClassHashMap, WeakHashMap, then SoftReference...But i did not understand Object ID , live reference object etc.
    Any suggestion will be appreciated.
    Tx in advance
    Bye
    Naseem Khan

    1.Live reference objectAn instance of java.rmi.server.ServerRef (which extends java.rmi.server.RemoteRef). The concrete instance happens to be called LiveRef and it is defined in a sun.* package. That's all you need to know.
    2.Object IDAn instance of java.rmi.server.ObjID, i.e. a unique identifier for the remote object.
    How it relates to stub and skeleton and wat is this
    mapping?The stub (and skeleton when you have one) contain the ObjID and it is passed to the server host along with each call. At the host there is a mapping table from ObjID which tells the RMI runtime which object to dispatch the call to.
    If you want to know more you need to look at the sun.rmi.* source code. Of course this only applies to Sun's implementation and you don't need to know any of it to write RMI programs.

  • Regular RMI server object with WebLogic JNDI

    Is that possible to register a regular RMI object with WebLogic JNDI
    tree? I was building a simple program (using javac and rmic only) based
    on the java.rmi.* (without changing the import statements to
    weblogic.rmi.*) and using the weblogic.jndi to register the server
    object. Below is some piece of code,
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL, "t3://172.20.20.20:7001");
    ctx = new InitialContext(ht);
    ctx.bind("HelloServer", obj);
    The code failed for the following reason,
    javax.naming.NamingException. Root exception is
    java.rmi.MarshalException: failed to marshal public abstract void
    weblogic.jndi.internal.NamingNode.bind(java.lang.String,java.lang.Object,java.util.Hashtable)
    throws javax.naming.NamingException,java.rmi.RemoteException; nested
    exception is:
    java.rmi.server.ExportException: A description for
    examples.rmi.hello.HelloImpl was found but it could not be read due to:
    [Failed to find examples.rmi.hello.HelloImpl_WLStub or
    examples.rmi.hello.Hello_WLStub for class examples.rmi.hello.HelloImpl]
    java.rmi.StubNotFoundException: Failed to find
    examples.rmi.hello.HelloImpl_WLStub or examples.rmi.hello.Hello_WLStub
    for class examples.rmi.hello.HelloImpl
    at
    weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:101)
    at
    weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:50)
    at
    weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManager.java:55)
    at
    weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:39)
    at
    weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:30)
    at
    weblogic.rmi.internal.OIDManager.getRequestDispatcher(OIDManager.java:281)
    at
    weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:270)
    at
    weblogic.rmi.internal.OIDManager.replaceObject(OIDManager.java:98)
    at
    weblogic.common.internal.ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:55)
    at
    weblogic.common.internal.ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:239)
    Any idea?
    - SteveC

    "Pyung Yoon" <[email protected]> writes:
    MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);This implies JRMP which the server does not support. You need to use t3 or iiop.
    andy

  • RMI / clustering / remote references

    We are currently in the process of designing the architecture for an application. We are considering using RMI as a mechanism of communication. The architecture is as such
              / App Server 1 \   / External Server 1
    Web     /                \ /
    Server                     X
              \ App Server 2 /   \ External Server 2
       DatabaseWhere App Server 1 and App Server 2 are stateless servers that provide exactly the same functionality. In fact the idea is that you can add more App Servers to increase performance as you wish. To keep the servers stateless, any state information is stored on the Database.
    App Server 1 and App Server 2 can talk to either External Server 1 or External Server 2 to access remote functions.
    So both External Server 1 and External Server 2 can provide the same Objects but calls relating to the same data may have to go back to the same External Server. (I.E. these external Servers are statefull)
    This has raised several problems.
    1/ If App Server 1 and App Server 2 both register it's remote Objects with the same Registry, how does the registry deal with this. Does it maintain two references or just the latest? Would using JNDI as the registry service help? Would the registry round-robin these references?
    2/ Is there are way of storing stubs in a database. I.e App Server 1 requests an External Server remote object, External Server 1 is used, App Server 1 Stores this remote object to allow any App Server to continue the process. App Server 2 picks up the Remote object from the Database and carries on talking to External Server 1 through it.
    Originally I was hoping to just bypass the whole Registry section and create my own lookup process. However I cannot see how this can be done. I tried looking to see how Sun actually do the Remote Binding in the Java Foundation Classes but it all seems to be done in the underlying sun.rmi classes...
    any ideas?
    Cheers
    Ben

    I've just found a solution to my last question. From this I should be able to create my own registry app that is contacted initially through this mechanism, and then any required exposed objects are passed to it using .exportObject() and serialisation. My registry app can then pick up objects of the same type and allow a round robin mechanism, etc...
    import java.rmi.*;
    import java.rmi.server.*;
    import sun.rmi.server.UnicastServerRef;
    import sun.rmi.transport.LiveRef;
    public class MyServerImpl extends RemoteServer implements SimpleRMIInterface
        public static int SERVER_PORT = 1234; // the client should know it
        public static int SERVER_ID = 666; // the client should also know it
        public SimpleRMIImpl(String name) throws RemoteException
            LiveRef liveref = new LiveRef(new ObjID(SERVER_ID), SERVER_PORT);
            UnicastServerRef unicastserverref = new UnicastServerRef(liveref);
            ref = unicastserverref;
            unicastserverref.exportObject(this, null);
            // No need to do Naming.rebind(name, this);
    ... Interface methods implementation skipped
    }Client implementation:
    import java.rmi.server.*;
    import sun.rmi.transport.tcp.TCPEndpoint;
    import sun.rmi.transport.LiveRef;
    import sun.rmi.server.UnicastRef;
    public class SimpleRMIClient
        public static void main(String[] argv)
            try
                TCPEndpoint tcpendpoint = new TCPEndpoint("servername",1234); // I use port=1234 here
                LiveRef liveref = new LiveRef(new ObjID(666),    tcpendpoint,false);
                MyServerInterface myServerObject = (MyServerInterface) new MyServerImpl_Stub((RemoteRef) (new UnicastRef(liveref)));
                // No need to do Naming.lookup(serverName + "/" +
    objectName);
            catch(Exception e)
                e.printStackTrace();
                System.exit(0);
                System.out.println("RMI connection successful");
    }nice...
    Ben

  • Stateful RMI server object

    How do I design and write stateful RMI client/server applications?
    I just find the examples on the Web that introduce RMI with some sample RMI client/server programs which are stateless, that means the RMI client and server do not maintain session information.
    I would like to design and write stateful client/server applications with RMI, i.e. a new instance of server object is invoked to handle a client Java applet connection session, and maintains state/session information such as security context in the server instance's local variables.
    Is that possible? Where can I find sample programs and design guidelines for this topic??

    I suggest that you approach this slightly differently.
    1. RMI generally gives access to a common server object, with each remote request being handled in a different thread. You can just as well have that common object do a lookup on a (synchronized) table of sessions. In other words, when a new client makes a request, look that client up, and if it is not in the table, then create a new session object and put it in the table. So now you have saved state.
    2. A variation on this: Make your common server object create a session object, and return a remote reference to the caller. All subsequent requests go to the individual session object. (The terminology hear is probably misleading; we have done such designs, and call the registered object an "entry", and the individual objects "servers".

Maybe you are looking for

  • I can't preview RAW files in Bridge CS5 or open them in Camera Raw

    I've been using Photoshop CS5, Bridge and Camera Raw 6.7 with no problems whatsoever.  I recently upgraded the OS on my MacBook Pro to 10.8.5 and can no longer preview RAW files in Bridge, or open them in Camera Raw.  I've downloaded the Adobe DNG co

  • Function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function

    Hi All, It should be highly appreciable if any one could please help. I need the name of the function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function. waiting for help. Thanks Shaw

  • Kernal How do I upgrade to a version below latest.

    HI. I just installed Oracle Linux 5.1 straight from CD, But I need to be running kernel-2.6.18-53.1.19.0.1.el5.x86_64, This is not the latest and u2date will just upgrade me to the latest version. I know I need the below files, I found this in a Tech

  • Procedure for material listing

    Hello all, When I use the following customizing : "Sales and Distribution > Basic Functions > Listing/Exclusion > Activate listing/exclusion by sales document type" There is a setting called "procedure for material listing" (3rd column) that determin

  • RAC re-install error

    I have deleted everything in app/crs and app/oracle after uninstalling it throgh installer. But when i try to install the clusteware it gives the following error: Checking local Cluster Synchronization Services (CSS) status Error In details it says o