Clustering rmi objects

Hi all,
I am looking for some information about clustering RMI objects. I have read as much
as I can find about it, not much seems to be in the wl docs.
I have read that if the server that bound the rmi object into jndi goes down, the
rmi server will no longer work. When I tested this out, the server seemed to continue
working and using the node in the cluster that was still running.
I am wondering what the difference between declaring the RMI object to be clusterable
and setting the WLContext.REPLICATE_BINDINGS flag to false when creating the context
to bind the RMI objects, and binding a seperate RMI object into the tree, one for
each node in the cluster.
is there some docs I can read about this? Thanks for any information you can give
me about this.
-chris

bwit <[email protected]> wrote:
In article <[email protected]>, [email protected]
says...
Hi all,Hi Chris.
I am looking for some information about clustering RMI objects. I haveread as much
as I can find about it, not much seems to be in the wl docs.
I have read that if the server that bound the rmi object into jndi goesdown, the
rmi server will no longer work. When I tested this out, the server seemedto continue
working and using the node in the cluster that was still running.If a server offering an RMI object via JNDI goes down the binding to
that object is removed from JNDI in all the other servers in the
cluster. Other replicas of that object may be available and will
continue to be used as you discovered.
I am wondering what the difference between declaring the RMI object tobe clusterable
and setting the WLContext.REPLICATE_BINDINGS flag to false when creatingthe context
to bind the RMI objects, and binding a seperate RMI object into the tree,one for
each node in the cluster.Marking the RMI object as clusterable causes WLS to generate a replica
aware stub for it. This stub is aware of all the replicas of the object
within the cluster and provides load balancing and failover. When you
bind a RMI object on multiple servers with REPLICATE_BINDINGS set to
false you have a bunch of individual, unrelated objects. Your clients
must contact the particular server running the objects and there will be
no load balancing or failover, all client calls will be serviced by the
object on the server which supplied the stub.
is there some docs I can read about this? Thanks for any informationyou can give
me about this.I thought the WLS RMI Programmer's Guide was pretty clear about how this
worked.
Well, you are right, the docs are clear on what they talk about, but as I mentioned,
when I marked the objects with REPLICATE_BINDINGS set to false, the client still
sent a comma delimited list of servers to create the InitialContext, and we still
observed load balancing, and what looked like failover. This is why we were confused,
we expected to see only one server do all the work (the first in the comma delimited
list), and for failures when that server was brought down. I will take a look at
our configuration and make sure we didnt make a mistake someplace in here.
Regards,
Bob
-chris

Similar Messages

  • Binding RMI object at startup in cluster

    Hi
    While I have seen similar postings perhaps someone could provide clarity. I have
    two nodes in a WL 6.1 cluster. I have a class that implements the ServletContextListener
    interface and is invoked on deployment of my app. This class binds checks for
    the existence of a bound object and if not found binds one. The first node binds
    correctly. When I start the managed server it does not find the bound object.
    Is this because the replication was not quick enough? The bound object is n clusterable
    RMI object. The idea here is that should the first node fail the second node,
    which keeps checking in the interim, will find no bound object and bind one.

    Does xyzImpl extend UnicastRemoteObject by any chance? If so, delete the exportObject() call, it is already exported by its constructor (i.e. when its constructor calls super()).

  • RMI object bindings bot being replicated

              I have a two node cluster setup for testing. I am creating an RMI
              object on one server and binding it into the JNDI tree. I can see the
              binding on the server where the object was bound but I never see
              anything in the JNDI tree of the other server in the cluster.
              I have tried adding WLContext.REPLICATE_BINDINGS=true to my
              InitialContext. I've also tried compiling the RMI object with
              weblogic.rmic as clusterable. Neither seems to have made any
              difference.
              Any assistance will be appreciated.
              Thanks and regards,
              Bob
              

              Thanks for the reply. Please see my responses inline:
              In article <[email protected]>, [email protected]
              says...
              > Bob,
              >
              > A couple of questions
              > 1> Whether your multicast address is working properly? Perform the
              > multicast test and verify this.
              What is the multicast test? The console cluster monitor screen shows
              both servers sending and receiving message fragments. Both servers show
              zero for Lost Multicast Messages.
              > 2> How are you deploying the RMI object (to the cluster or individual
              > servers)?
              I'm not sure what you mean by "deploying the RMI object". The RMI
              object is created by a startup class and bound to the JNDI tree on one
              server in the cluster. It appears in the tree it where it was bound but
              not the tree on the other server.
              > 3> What version of WLS and Service pack are you using?
              WLS 6.1 SP1 Load3
              > 4> Could you try our sample example in the \cluster\rmi folder?
              This exhibits the same behavior I'm seeing in my app.
              Thanks for your help.
              Regards,
              Bob
              >
              >
              > Bob Withers wrote:
              >
              > > I have a two node cluster setup for testing. I am creating an RMI
              > > object on one server and binding it into the JNDI tree. I can see the
              > > binding on the server where the object was bound but I never see
              > > anything in the JNDI tree of the other server in the cluster.
              > >
              > > I have tried adding WLContext.REPLICATE_BINDINGS=true to my
              > > InitialContext. I've also tried compiling the RMI object with
              > > weblogic.rmic as clusterable. Neither seems to have made any
              > > difference.
              > >
              > > Any assistance will be appreciated.
              > >
              > > Thanks and regards,
              > > Bob
              >
              >
              

  • Clustered Remote Object Bound To JNDI

    Hello,
              I'd like to know if Weblogic 5.1 (service pack 10) supports
              clusterable remote objects.
              What I am trying to do is to implement a remote object that extends
              UnicastRemoteObject interface and bind it to JNDI. When the client
              needs the services, it will lookup that object in JNDI and call its
              methods remotely.
              What happens to my test implementation is that it all works well when
              I run Weblogic locally, but if it is run on the remote server, it
              gives me the exception to the extend that the stub for my remote
              object is not found (although it is in the classpath). I understand
              that this is because I should be using weblogic.rmic instead of
              regular rmic, is that right?
              Thanks,
              Eugene Kononov.
              

    Hello,
              I'd like to know if Weblogic 5.1 (service pack 10) supports
              clusterable remote objects.
              What I am trying to do is to implement a remote object that extends
              UnicastRemoteObject interface and bind it to JNDI. When the client
              needs the services, it will lookup that object in JNDI and call its
              methods remotely.
              What happens to my test implementation is that it all works well when
              I run Weblogic locally, but if it is run on the remote server, it
              gives me the exception to the extend that the stub for my remote
              object is not found (although it is in the classpath). I understand
              that this is because I should be using weblogic.rmic instead of
              regular rmic, is that right?
              Thanks,
              Eugene Kononov.
              

  • EJB 3.0 accessing legacy RMI object

    Hello All
    I need to access a legacy RMI object from a stateless session bean. This is not technically a problem as it can be done from the EJB's constructor like so
    public MyEJB ()
    throws NotBoundException, MalformedURLException, RemoteException
      this.rmiObject = (TheRMIInterface) Naming.lookup ("//host/ThatRMIObject");
    }The above solution doesn't feel right. Mainly, host changes depending on whether the EJB is deployed on our testing or production environment. At the least, I'd like to be able to query the container to get the relevant value of the string, but I've a feeling that perhaps the container should be injecting the RMI object into the EJB.
    If anyone can shed any light on either of the possible approaches suggested above (or any other approach), I'd be most grateful.
    Thanks in advance
    J

    Okay, the first approach goes like this
    @Stateless
    public class MyEJBean
    implements MyEJRemote
      @Resource (name = "my-rmi-object-url")
      private String rmiObjectURL;
      private RMIObject rmiObject;
      public MyEJBean ()
      throws NotBoundException, MalformedURLException, RemoteException
        this.rmiObject = (RMIInterface) Naming.lookup (this.rmiObjectURL);
    }and the accompanying deployment descriptor (ejb-jar.xml -- without the surrounding ejb-jar tags) is
      <enterprise-beans>
        <session>
          <ejb-name>MyEJBean</ejb-name>
          <env-entry>
            <env-entry-name>my-rmi-object-url</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>//host/RMIObject</env-entry-value>
          </env-entry>
        </session>
      </enterprise-beans>which'd still have to altered for the differing deployment environments, but feels slightly better. It'll do for now. Maybe I'll try injecting the object later.

  • How to use RMI objects in a servlet

    Hi,
    I have just run the example RMI program in the java tutorial in my linux pc. Also I have another method to just echo a string back. It works fine when calling from command line.
    Now I want to write a servlet that get a string when POSTed and call the RMI objects echo method and display the returned string.
    I use Tomcat-5.0 which is installed in /usr/local. I moved the remote object interface jar to the common/lib folder and import the interface in my Servlet. I use the following statements inside the servlet to get the RMI object reference.
                Registry registry = LocateRegistry.getRegistry("localhost");
                Rser comp = (Rser) registry.lookup("rmiser");When i use this in my servlet the tomcat stops working.
    Also I don't know how to specify the code base and security policy which I use in command prompt when calling RMI object.
    Pls suggest me what to do and also specify any resources that explain this task step by step.
    Thanks.

    restarted the system and caught the following exception while calling the servlet.
    Apr 30, 2009 12:24:15 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3861 ms
    java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
         at java.net.Socket.connect(Socket.java:513)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:180)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
         at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at RequestParamExample1.doGet(RequestParamExample1.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:101)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:619)
    Apr 30, 2009 12:25:19 PM org.apache.coyote.tomcat5.CoyoteAdapter service
    SEVERE: An exception or error occurred in the container during the request processing
    java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.Thread.setContextClassLoader(Thread.java:1351)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:619)
    Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.Thread.setContextClassLoader(Thread.java:1351)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1623)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1608)
         at java.lang.Thread.run(Thread.java:619)
    Hope u can find it now.
    the line
    at RequestParamExample1.doGet(RequestParamExample1.java:94)
    is the file I am editing and using to call RMI.
    Edited by: itsraja on Apr 30, 2009 12:06 AM

  • Trouble in storing and retrieving RMI object in Weblogic 7 JNDI tree.

    I have created a simple server (BankImpl), implementing a RMI interface
    called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
    class using
    "rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
    in Weblogic
    server 7 under the name of "PeopleBank".
    After the binding, I can see the stub class in the JNDI tree, but with a
    different name: BankImpl_WLStub.class). when a
    client program is trying to lookup the stub associated with "PeopleBank", it
    failed with a puzzling message:
    java.io.NotSerializableException: BankImpl_WLStub
    Why a stub of a RMI object is not serializable? Does Weblogic needs a
    different rmic to generate RMI stubs?
    Thanks,
    Lian

    I have created a simple server (BankImpl), implementing a RMI interface
    called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
    class using
    "rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
    in Weblogic
    server 7 under the name of "PeopleBank".
    After the binding, I can see the stub class in the JNDI tree, but with a
    different name: BankImpl_WLStub.class). when a
    client program is trying to lookup the stub associated with "PeopleBank", it
    failed with a puzzling message:
    java.io.NotSerializableException: BankImpl_WLStub
    Why a stub of a RMI object is not serializable? Does Weblogic needs a
    different rmic to generate RMI stubs?
    Thanks,
    Lian

  • How can we determine exactly what server an RMI object is bound to?

    We have RMI objects that bind to a server in a cluster. How can we determine for
    monitoring purposes what server a RMI object is currently bound to /executing
    on?
    We have tried the most of the Mbeans but can't find one that returns runtime info
    for startup classes or RMI objects.
    We have a new monitoring requirement we are trying to satisfy.

    try get the value of PKEY_OfflineAvailability using shell property system APIs (SHGetPropertyStoreFromParsingName or ShellFolderItem.ExtendedProperty)
    Visual C++ MVP

  • Last use of RMI object instance

    I have an RMI object with instance variables. As clients of this
    remote object method make calls on it, these instance variables
    are used and modified. My question is; Is there a way where I can
    check when the last call from the client where made using a certain
    instance?
    Do I have to have separate timer methods for each instance to track
    the time elapsed since last use?
    Any answers are appreciated.
    /Mats

    Perhaps you could post something describing what you are trying to do. (Sounds like you want to keep track of last-used-time on a bunch of data elements?)

  • How to register a regular rmi object in the class which is not setted as startup classes?

    hi:
    it seems the rmi object can only be registed in a startup class,
    is there any way to do this in an nostartup class?
    Thanks for any clue.
    Reno hu
    TCSI

    Yes.
    It is possible to export an RMI object from a servlet's init() method. You
    will have to specify a <load-on-startup> tag in the web.xml deployment
    descriptor, but otherwise, it's pretty straightforward to bind/unbind an RMI
    object when an application is deployed/undeployed.
    -Don
    Andy Piper wrote:
    "Reno hu" <[email protected]> writes:
    No
    hi:
    it seems the rmi object can only be registed in a startup class,
    is there any way to do this in an nostartup class?
    Thanks for any clue.
    Reno hu
    TCSI
    " .sigs are like your face - rarely seen by you and uglier than you think"
    mail: [email protected]

  • I need to run multiple external programs concurrently using RMI objects.

    have a web based solutiion which uses a backend machine for some processing. I have a RMI based Java proram running on the backend machine and the web server talks with this backend machine through RMI. Now, on this backend machine, I need to call some external program using Process s = Runtime.getRuntime().exec(....). Since this is a web application, multiple clients will connect at the same time and I need to run this external program for multiple clients at the same time.
    Here is what I do. I have a separate RMI object bound to registry for each client that connects to the web server. This RMI object implements runnable interface, since I can't extend this class from Thread (it already extends from UnicastRemoteObject). So each time I call upon a method from this object, only one process gets started and other objects need to wait till this process finishes.
    I need to start multiple processes at the sametime so that other clients don't have to wait for this thread to finish.
    Please let me know if anybody has any other solution than installing an application server on this backend machine.
    Here is my code.
    public class iLinkOnlineSession extends UnicastRemoteObject implements Session, Serializable, Runnable
      public iLinkOnlineSession(String sessName, String sessId, String rootLogs, String rootWrks) throws RemoteException
        setSessionId(sessId);
        setName(sessName);
        ROOT_LOGS = rootLogs;
        ROOT_WORKSPACE = rootWrks;
        searchKeys_ = new Vector();
        searchObjects_ = new Hashtable();
        Thread s = new Thread(this);
        s.start();
      public void run()
        System.out.println("running");
      public String checkLogin(String user, String passwd)
        String msg = "";
        String cmd = "iLinkOnlineLogin";
        cmd += " param "+ user + " param " + passwd;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);           // Call to the external program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          String line = rd.readLine();
          while(line != null)
            System.out.println(line);
            msg += line;
            line = rd.readLine();       
          int res = proc.waitFor();
        }catch(Exception e)
             e.printStackTrace();
        System.out.println("Msg: " + msg);
        return msg;
      public String searchObject(String user, String passwd, String param1, String paramVal1, String param2, String paramVal2, String param3, String paramVal3, String relLev, String mfgLoc)
        String cmd = "iLinkOnlineSearch";
        cmd += " param " + user + " param " + passwd + " param " + getSessionId() + " param " + logFile_ + " param " + param1 + " param " + paramVal1 +
              " param " + param2 + " param " + paramVal2 + " param " + param3 + " param " + paramVal3 + " param "
              + relLev + " param " + mfgLoc;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);                // External program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          FileWriter out = new FileWriter(resultFile_);
          System.out.println("Filename: "+resultFile_);
          BufferedWriter wout = new BufferedWriter(out);
          String line = rd.readLine();
           while(line != null)
            System.out.println(line);
            wout.write(line);
            wout.newLine();
            wout.flush();
            line = rd.readLine();
          int res = proc.waitFor();
          wout.close();
          if(res == 0)
            boolean ret = createResultTable();
            if(ret == true)
              return GlobalConstants.SUCCESS_MSG;
            else
              return GlobalConstants.ERROR_MSG;
        }catch(Exception e)
                e.printStackTrace();
        System.out.println("getting results");
        return GlobalConstants.ERROR_MSG;
      }

    I guess I don't get it.
    RMI servers are inherently multi-threaded, so why are you running separate servers for every client?

  • How to register RMI object with runnign Weblogic Server instance?

    I need to write some RMI objects(non EJB) and register it with the already running weblogic server so that I can access them from a RMI client.
    Can some help me with this?

    So more precisely the way I am doing it is
    I have a remote interface
    package com.myserv.rmi;
    public interface NSPQueryExecutionService extends java.rmi.Remote
    public void getQueryExecutionDelegate();
    I have the Implementation as
    package com.myserv.rmi;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class NSPQueryExecutionServiceImpl
    implements NSPQueryExecutionService
    public static final void main (String[] arg) {
    try {
    Properties properties = null;
    properties = new Properties();
    properties.put (Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context context = new InitialContext(properties);
    context.bind("QueryExecutionService", new NSPQueryExecutionServiceImpl());
    System.out.println("================================> QueryExecutionService Bound");
    } catch (Exception ex){
    ex.printStackTrace();
    System.out.println("Unable to start QueryExecutionService");
    public NSPQueryExecutionServiceImpl()
    public void getQueryExecutionDelegate()
    System.out.println("inside remote");
    I compile these classes and I do a weblogic.rmic as
    java weblogic.rmic com.myserv.rmi.NSPQueryExecutionServiceImpl
    I run the NSPQueryExecutionServiceImpl class to bind the RMIObject with the weblogic server.
    Finally when I try to access this from my client it is able to access the object but when I invoke an operation on it gives the exception that RJVM is already shutdown.
    Edited by kuldeep.sharma at 02/15/2007 9:37 AM

  • Unable to retreive RMI object bound to JNDI

    Hi
    I am trying to retrieve an rmi object that appears to have been sucessfully
    deployed to the weblogic server. Upon startup the nt command console shows
    the message below and the class name appears in the Distributed objects/rmi
    area in the Weblogic console.
    Invoking main-style startup Guid xxxxxx.GuidImpl
    However if I try to write a test client using either one of the following
    calls I get a NameNotFoundException.
    I have tried both the name Guid (which is what is in the startup entry) and
    the fully qualified name. They all have the same results.
    Sample calls:
    Naming.lookup("Guid");
    or
    getInitialContext();
    jndiContext.lookup("Guid");
    In my weblogic properties files I have the following entry:
    weblogic.system.startupClass.Guid=xxx.GuidImpl
    in the main of GuidImpl class I have the following entry:
    Naming.bind("xxx.Guid");
    any ideas as to what might be wrong?
    Thanks

    Hi, all:
    Currently I evaluate BEA Weblogic 6.1 server. I've read the "Programming
    WebLogic JNDI" section of the documentation for Weblogic server 6.1.
    However, I couldn't find the answer for my question. What problem I have
    now is that
    (1): How I can create a object in the Java VM when the Weblogic server
    startup? Note:
    This class need to read a property files and
    store all of properties information into its instance for the
    client program to lookup it later.
    (2): How can the previous created object to be bound in the Weblogic
    JDNI server and the bounded
    object can be shown up in the JDNI tree in the Weblogic server's
    console?
    (3): How do I code my servlet to lookup that object I
    just created in the step1? What configuration settings need to be
    done before Weblogic server is started?
    Because I am stopped by this problem, if anyone can give me the example
    code or some explanation of the solution ASAP,
    it would be very appreciated....Thanks in advance.......
    Merry Christmas
    Long

  • RMI Objects running on single cluster memb. only avail on that

              Hi,
              My setup:
              An RMI object shall be bound to a single cluster member.
              Only one cluster member has therefore the startup entry. The
              RMI Object is thus instantiated only in this one cluster member.
              I now expected to have the weblogic.rmi.myclass JNDI entry
              replicated into all cluster member's jndi context (thus having
              a simple way for implementing a singleton? does this work??).
              All clients, which are loadbalanced to a cluster-member
              that does not the startup entry will fail to lookup the rmi object's
              entry
              with the following.
              Why is the entry not replicated into the other machines naming context?
              javax.naming.NameNotFoundException: 'mybindname'; remaining name
              'mybindname'
              at
              weblogic.rmi.extensions.BasicRequest.sendReceive(BasicRequest.java:44)
              at
              weblogic.jndi.WLContext_WLStub.lookup(WLContext_WLStub.java:192)
              at
              weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
              at mypackage.MyClass.lookup(...);
              Thank you for any help on this & happy new year
              Toby
              

    We too are looking to achieve the same thing. Anyone know the answer to
              Tobias's question?
              david
              Tobias Christen wrote:
              > Hi,
              >
              > My setup:
              > An RMI object shall be bound to a single cluster member.
              > Only one cluster member has therefore the startup entry. The
              > RMI Object is thus instantiated only in this one cluster member.
              > I now expected to have the weblogic.rmi.myclass JNDI entry
              > replicated into all cluster member's jndi context (thus having
              > a simple way for implementing a singleton? does this work??).
              >
              > All clients, which are loadbalanced to a cluster-member
              > that does not the startup entry will fail to lookup the rmi object's
              > entry
              > with the following.
              >
              > Why is the entry not replicated into the other machines naming context?
              >
              > javax.naming.NameNotFoundException: 'mybindname'; remaining name
              > 'mybindname'
              > at
              > weblogic.rmi.extensions.BasicRequest.sendReceive(BasicRequest.java:44)
              > at
              > weblogic.jndi.WLContext_WLStub.lookup(WLContext_WLStub.java:192)
              > at
              > weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
              > at mypackage.MyClass.lookup(...);
              >
              > Thank you for any help on this & happy new year
              > Toby
              David Michaels <[email protected]>
              Director of Technology
              ShockMarket Corporation (650) 330-4665
              [david.vcf]
              

  • Clustered timers object is not an instance of declaring class

    WLS 12.1.3 installation, one cluster of two managed servers.
    An enterprise application contains 3 EJB timers. Timers are clustered and persisted to DB (table WEBLOGIC_TIMERS).
    The application is written for JEE version 5 and timers are coded according rto EJB3.0 spec.
    Each time ejbTimeout() triggers for one of the timers, the following exception is logged
    <Error> <EJB> <SRVAW00> <clusterServer_1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-002F16F44C0F7F98CBA5> <> <1426609941352> <BEA-011088> <The following error occurred while invoking the ejbTimeout(javax.ejb.Timer) method of EJB MyBean(Application: MyClusteredApp, EJBComponent: LucyStarEJB.jar).
    javax.ejb.EJBTransactionRolledbackException: EJB Exception:
         at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:452)
         at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:251)
         at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:431)
         at weblogic.ejb.container.internal.TimerDrivenLocalObject.postInvoke(TimerDrivenLocalObject.java:44)
         at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:131)
         at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
         at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
         at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Caused By: java.lang.IllegalArgumentException: object is not an instance of declaring class
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:118)
         at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
         at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
         at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Alternatively, the stack trace is slightly different:
    <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-012838E30163E6919A1F> <> <1426809856301> <BEA-011088> <The following error occurred while invoking the ejbTimeout(javax.ejb.Timer) method of EJB MyServicesBean(Application: MyAppClustered, EJBComponent: MyEJB.jar).
    javax.ejb.EJBTransactionRolledbackException: EJB Exception:
        at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:452)
        at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:251)
        at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:431)
        at weblogic.ejb.container.internal.TimerDrivenLocalObject.postInvoke(TimerDrivenLocalObject.java:44)
        at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:131)
        at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
        at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
        at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Caused By: java.lang.IllegalArgumentException: java.lang.ClassCastException@402f37c8
        at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:118)
        at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
        at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
        at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    It seems that this exception is not enough to stop timer schedulation, because it goes on and on. In some way, therefore, WLS keeps track of the timer recurring expirations. On the other hand, my code in ejbTimeout() is never executed.
    What is causing these exceptions ? The stack trace is fully in WLS internal code.
    Thanks

    Indeed, the AbstractPageBean is a JSF managed bean. What does it mean to me?
    I want to add some Information:
    If I build a 'helper' class, with the following body, the same error is thrown:
    public class EJBTestHelper {
        private EJBTestRemote lookupEJBTestBean() {
                try {
                    Context c = new InitialContext();
                    return (EJBTestRemote) c.lookup("java:comp/env/ejb/EJBTestBean");
                } catch (NamingException ne) {
                    throw new RuntimeException(ne);
    }What can I do?

Maybe you are looking for