Sessions , RMI & Synchronization

Hi ,
Is it possible to maintain sessions in RMI ?
If I make a method synchronized on the RMI implementation and make simultaneous calls on the same method from different clients will I get a synchronized result ?
Any help would be greatly appreciated.
Thanks ,
Jin

You need to say a bit more about what you mean by sessions, but in general yes, you can define something called a session and maintain it your self. For example, you might have each RMI client identify itself, establish some kind of session object (in a list), then return a token that the client must use with eqach subsequent call.
Alternatively, you could implement just the login in the object known to the registry, then return a reference to another object that implements all of the "real" methods.
And yes, you can synchronize methods and allow only one method at a time to execute. However you may have to play around with this a little bit, as I believe interfaces do not allow a "synchronized" modifier. (By "play around" I mean you might have to make each remote method call an innner, synchronized, method.

Similar Messages

  • How i can start session to synchronize my ipod touch 5g in Itunes?

    I can't synchronize my ipod touch 5g because when it start synchronizing Itunes tell me that I have to start session of synchronization.

    you can't.  that' the last OS for that version of iPod.  buy a new one

  • 10.1.3 cache synchronization using custom RMI code

    I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3.
    It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows:
    2006.05.15 11:28:38.117--ServerSession(1102039280)--Thread(Thread[RMI TCP Connection(926)-19.39.48.136,5,RMI Runtime])--Received updates from Remote Server
    This message then results in a trip to the DB to get the object updates.
    Per 10g documentatation, the changed notification should contain the changed attributes (change set) and this should not result in a DB trip for the remote cache. I am not seeing this behavior.
    This is probably because I was using the old (9.0.4) sessions file with our custom cache synchronization manager, which overrides toplink cache sync settings, as shown below:
    <cache-synchronization-manager>
    <clustering-service>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringService
    </clustering-service>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    <event-listener-class>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringServiceSessionEventAdaptor</event-listener-class>
    With 10.1.3 RMIClusteringService is deprecated and replaced by RMITransportManager. A whole bunch of other classes has been added. Has anyone migrated or written RMI custom cache sync code to use RMITransportManager? If so, can they share their experiences and/or send their code samples? Any other thoughts will be appreciated too.
    thanks,
    Prabodh.

    I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3.
    It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows:
    2006.05.15 11:28:38.117--ServerSession(1102039280)--Thread(Thread[RMI TCP Connection(926)-19.39.48.136,5,RMI Runtime])--Received updates from Remote Server
    This message then results in a trip to the DB to get the object updates.
    Per 10g documentatation, the changed notification should contain the changed attributes (change set) and this should not result in a DB trip for the remote cache. I am not seeing this behavior.
    This is probably because I was using the old (9.0.4) sessions file with our custom cache synchronization manager, which overrides toplink cache sync settings, as shown below:
    <cache-synchronization-manager>
    <clustering-service>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringService
    </clustering-service>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    <event-listener-class>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringServiceSessionEventAdaptor</event-listener-class>
    With 10.1.3 RMIClusteringService is deprecated and replaced by RMITransportManager. A whole bunch of other classes has been added. Has anyone migrated or written RMI custom cache sync code to use RMITransportManager? If so, can they share their experiences and/or send their code samples? Any other thoughts will be appreciated too.
    thanks,
    Prabodh.

  • Is a Servlet-Filter which serializes requests in the same user session ok?

    The Servelt specification states that the Web-Application is itself responsible for synchronizing access to HttpSessions. It is from the serversite not possible to prevent multiple threads to access the same HttpSession (i.e. the user could always open a second window, retransmit a form etc). My assumption is that while this does not happen often it can happen and therefore I think each access to the HttpSession must be synchronized. For a further discussion see http://forum.java.sun.com/thread.jsp?forum=4&thread=169872 .
    Concurrent programming is generally complicated and errorprone. At least in developing JSPs it is inconvenient and easy to forget. My Web-App uses often HttpSession and it can be used in different not predefined places, so I had the idea to implement a ServletFilter which serializes threads which happen in the same session. This involves certainly some overhead. However for the advantages of easier code maintains and higher consistency I am ready to pay this overhead.
    My question is generally what you think of this approach and second whether the way I implemented the Filter works.
    The Filter actually generates for each Request an HttpServletRequestWrapper which intercepts calls to getSession and on call aquires a Lock so that other threads have to wait for the same Session. The lock is released when the doFilter method of the Filter returns. So threads run concurrently until the first access to the Session and from there they are serialized until the end of the Request.
    For the details I will give the code for the Filter and the Wrapper (that?s all the code needed except the ReentrantLock which is Doug Lea?s implementation http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html )
    the Filter
    public class SessionThreadFilter implements Filter
      public static final String MUTEXT_IN_SESSION_KEY = "org.jaul.filter.SessionThreadFilter.MUTEX";
      //constructor, init, destroy methods do nothing
      public void doFilter(ServletRequest reqIn,ServletResponse res,FilterChain filterChain)
        throws IOException, ServletException
        //if req not instanceof of HttpRequest don't do anything
        if (!(reqIn instanceof HttpServletRequest))
          filterChain.doFilter(reqIn, res);
        } else
          HttpServletRequest req = (HttpServletRequest) reqIn;
          //We use a HttpRequestWrapper each time a user accesses
          //through this
          //Wrapper a Session is Lock is aquired. The filter method returns
          //the lock if it exists is released
          //each thread needs it's own wrapper so the wrapper itself
          //doesn't have to be synchronized
          SessionThreadRequestWrapper wrapper = new SessionThreadRequestWrapper(req);
          try{
            filterChain.doFilter(wrapper, res);
          }finally{
            ReentrantLock lock = wrapper.getLock();
            if (lock != null && lock.holds() != 0)
                       lock.release(lock.holds());
    the Wrapper
    final public class SessionThreadRequestWrapper extends HttpServletRequestWrapper {
      private ReentrantLock lock = null;
       * Constructor for SessionThreadRequestWrapper.
       * @param arg0
      public SessionThreadRequestWrapper(HttpServletRequest req){
        super(req);
       * @see javax.servlet.http.HttpServletRequest#getSession()
      public HttpSession getSession(){
        return getSession(true);
       * @see javax.servlet.http.HttpServletRequest#getSession(boolean)
      public HttpSession getSession(boolean construct){
        //this will get the session an the lock
        HttpSession session = getLockFromSession(construct);
        if (session == null) return null;
        //get a lock on the mutex
        try{
          lock.acquire();
        } catch (InterruptedException e){
          throw new IllegalStateException("Interrupted while thread waiting for session");
        //now we check again if the session is still valid
        try{
          session.getAttribute(SessionThreadFilter.MUTEXT_IN_SESSION_KEY);
        } catch (IllegalStateException e){
          //again we go recusively but first release the lock
          lock.release();
          lock = null;
          return getSession(construct);
        //after you got the lock you can return the session
        return session;
       * gets the lock from the session
       * @param construct
       * @return HttpSession
      private HttpSession getLockFromSession(boolean construct){
        //test if it is a new Session
        HttpSession session = super.getSession(construct);
        //if is null no session was realy requested
        if (session == null) return null;
        //otherwise try to get the lock if necessery construct it
        //syncrhonized over session
        synchronized (session){
          //this migth throw an Exception if the session has been
          //invalidated in the mean time
          try{
            lock = (ReentrantLock) session.getAttribute(SessionThreadFilter.MUTEXT_IN_SESSION_KEY);
            if (lock == null){
              lock = new ReentrantLock();
              session.setAttribute (SessionThreadFilter.MUTEXT_IN_SESSION_KEY, lock);
            return session;
          } catch (IllegalStateException e){
            //the session has been invalidated before we tried to get the
            //lock we recursively call getLockFromSession
            //( assumption checked with Jetty: if the session is invalidated
            //and getSession is called on the thread a new valid session
            // should is returend)
            //I hope sometime you should get a valid session but I am not
            //sure. This is crucial for breaking of the recursion
            lock = null;
            return this.getLockFromSession(construct);
      /** used by the Filter to get the lock so that it can release it
      ReentrantLock getLock(){
         return this.lock;
    }As stated I would be very thankful if you could check the code and give some commends.

    synchronized (session){Are you sure that the session instance returned by two
    concurrent calls to getSession(...) are the same? I
    think that tomcat for instance may return different
    instances for the same "logical " session, which would
    break your scheme I think... Thank you (I did not know that on Tomcat). The same thing could also occur if another filter wrapped the Session.
    That's indeed a problem,which I have already adressed in another thread, but did not get an answer. ( http://forum.java.sun.com/thread.jsp?forum=33&thread=412380). The already cited thread http://forum.java.sun.com/thread.jsp?forum=4&thread=169872 adresses the same problem, but the discussion there ends with the recomandation that you should synchronize on HttpSession as I did it. Also in other forums I've read so.
    However like you I've at least strong doubts in this approach, so now my question is on what should I than generally for any access in any web-app syncrhonize the access to Http-Session as demanded by the Servlet specs.
    A few not realy satisfying answers:
    Synchronize on the HttpSession itself: I think still the best approach, but as you say is it guaranteed that the same instance of an HttpSession is given to each Request (in one Session)?
    Synchronized on the HttpServlet: This only works if no other servlet (or jsp) accesses in the session the value with the same key ( of course only if the session itself is threadsave). In case of ThingleThread it is not possible at all there can be multiple instances (you could use a static variable)
    Holding the object to synchronize on in applicaton scope or session scope: This obiously doesn't help, because somehow you have to obtain the lock and at least there you need another synchronize.Holding in application socpe is slow a static variable lock would be better there.
    Synchronize on some static variable: This will work, but is very slow (each request not only in the same session would synchronize on this).
    Hold a map in application scope, which holds for each Session-key a lock: Is probably faster than the static variable thing. However the access and the management of the Map (removing of unused locks etc.- Mabe you could use a WeakHashMap to collect the locks for not used keys anymore) is time consuming too and again the map must be accessed syncrhonasly by all requests.
    Syncrhonize on the Filter (only in my case): This is as slow as the static variable approach because each request will use the same lock the one instance of the Filter.
    So synchronizing on the session is propably the best approach if the same attribute name is accesed by different servlets. However if you say that some Web-Containers return different HttpSession instances for the same Session (which is legal according to the specification) this of course does not work.
    So I have realy no clue on what to syncrhonize than. Now help is not only neede on my Thread serialization filter but on my generally Servlet prgromming.
    May be you could help me for another synchronization aproach.

  • Architecture Sanity Check

    I'm just getting started with TopLink and need some architectural advice. My TopLink project will be used by two different web applications that may or may not be hosted on the same server. The first application uses Jakarta Struts to create a web interface. The second uses Apache SOAP to provide a web service interface. Both applications use the same database.
    Given this, what is the best practice for using TopLink while taking into account concurrency issues? Do I need to use the Remote Sessions (RMI) approach?
    Thanks!

    Thomas,
    Remote Session is not the answer. It is used to get TopLink access from another tier. For multiple applications using the same project os multiple instances of the same project there are a couple of issues to address in your configuration of TopLink.
    1. Concurrency
    2. Stale Cache
    To address concurrency I would recommend using optimistic locking on all tables. This is typically done using a version field (numeric or timestamp) but can also be accomplished using some or all of the fields of the table. Refer to the docs for how to setup this feature. You will also need to ensure that each transaction also check for OptimisticLockingException.
    Dealing with the potential for stale cache is caused by multiple applications (including non-Java/legacy) modifying the same database. TopLink's cache can be configured on a per class basis. For reference/static data I would use a FullCacheWeakIdentityMap. For classes of data that may change more frequently you could use a SoftCacheWekaIdentityMap or to hold objects for the minimal amount of time a WeakIdentityMap.
    Additionally there are some settings that may be of interest.
    - query.refreshIdentyMapResult() - will force the refresh on a given query/finder.
    - descriptor.onlyRefreshIfNewerVersion() - makes use of optimistic locking field(s) to determine if refresh is required
    - Cache-Synchronization will allow changes made in one TopLink session (application instance) to be notified and updated in other sessions using the same project. This will minimize stale cache situations.
    Every application has a different profile for how to handle stale cache and TopLink offers a number of features that are easily and externally configurable. Ensuring that concurrency is addressed through locking is crucial then the configuration can be adjusted to minimize stale objects and optimize the performance benefits of the cache.
    Doug

  • Jvm question

    Hi. Let's say I have two computers, "apple" and "orange". They are both running the same java program called "synchronize", which is installed on both computers, and they communicate with eachother via RMI.
    synchronize has two classes called "ClassA", and "NetPackage"... NetPackage is the object which is passed around on the net via RMI. NetPackage has a method called "getVersion", which has as method body "return ClassA.getVersion()", essentially a link.
    If "apple" is calling NetPackage.getVersion(), then I know that I will get the version as defined in apple's jvm. However, what happens if orange gets a NetPackage from apples jvm, and from within orange's jvm we ask that remote NetPackage to getVersion(). Can I assume that this call gets sent back through the remote object to apple's jvm, which returns the version as defined in apples jvm, or does the remote object, because it is now executing in oranges jvm, return the version as defined in oranges jvm?
    I hope I made my question clear enough, but I don't know any other way of describing my problem.
    Thanks in advance for your help.

    "...NetPackage is the object which is passed around on the net via RMI." is somewhat vague - because a cleint can retrieve either a copy of an object, or a reference to a remote object.
    This depends on how the object is defined: If it is derived from UnicastRemoteObject, then it is a remote reference; otherwise a copy must have been serialized .
    With respect to the "link":
    o For a Unicast remote object, the method invocation will cause a call on the remote objects method, which will in turn access the other remote object.
    o For a serialized object, the other object better be serializable too, in which case both objects should exist on the client computer.

  • Needs pop up message to occur on screen when data ia manipulated...

    Hi
    In my application(forms 6i/oracle9i), I want pop up message to occur on the screen of application user A when another application user B manipulates the data. Message would be like '2 rows are updated in Branch Master'. Then there should be availabilty( currently from his screen itself) to user A to see those manipulations being done by user B.
    Pop up message should occur in following cases
    case 1: Just after User A log in to the Application i.e. all master data changes being done after he has logged out the application.
    Case 2: During his session i.e. when he is using application, and in case there are changes to the Master Tables being done by other user.(this time pop up should come on the screen on which user is working.)
    I am keeping the log of data changes in Audit_Trail_Log table through trigger.
    Secondly, application keeps the login time of users in app_login_status. And logout time in app_login_logout_log table.
    I hope you get my requirements. Thanks in advance.

    can you try the following things:
    Case 1
    -- Count the number of inserts after the logout time of user
    select count(*) from audit_trail_log where
    statement_column like '%INSERT%'
    and user<>user
    and time_column>=(select max(logouttime) from app_login_logout_log where user=user);
    -- Count the number of deletions after the logout time of user
    select count(*) from audit_trail_log where
    statement_column like '%DELETE%'
    and user<>user
    and time_column>=(select max(logouttime) from app_login_logout_log where user=user);
    -- Count the number of updates after the logout time of user
    select count(*) from audit_trail_log where
    statement_column like '%UPDATE%'
    and user<>user
    and time_column>=(select max(logouttime) from app_login_logout_log where user=user);
    ADD ALL THREE OF THEM. Put it in a variable. Say sum_updates
    On when new form instance, write
    message('Number of updates since last login : '||sum_updates);
    synchronize;
    Case 2
    create a timer and in when timer expired trigger write the same code as in when new form instance. Put the sum in sum_updates2
    find the difference diff_updates := sum_updates2-sum_updates
    and in WHEN-TIMER-EXPIRED write:
    if diff_updates<>0 then
    message('Number of updates in the database in this session : '||diff_updates);
    synchronize;
    end if;
    I guess, you understand the logic.
    P.S : Not tested !!

  • Integration: EJB or WS

    Hi !
    I'm an architect in a bank project and I am in doubt what technologies should I use for integration ... CORBA with EJB Session (RMI/IIOP) or Web Services ... what should i consider in my choice ?
    I begin it CORBA integrates and works in a lot of languages ...
    tranks in advance.

    Both CORBA and WS allow you to implement your services in any language with a binding, so that's good.
    Both have a UDDI feature so you can discover available services.
    CORBA uses IIOP as its protocol on the wire; WS use SOAP messages over HTTP.
    Gotta have ORBs on both ends of the CORBA transaction; need SOAP/WS containers on both ends of the WS transaction.
    Geez, WS sound an awful lot like CORBA, don't they? Same idea of distributed "services".
    I feel like I suddenly got ten years younger. 8)
    %

  • What I have to do because when I want to automatically synchronize a tone, even 5 seconds pass and tells me that the session was unable to synchronize?

    I do because when I want to automatically synchronize a tone, even 5 seconds pass and tells me that the session was unable to synchronize

    Hi Jen.  My daughter just compleated her nursing program and is now working as a full time nurse.  Focus and study hard and soon you will be there too.  Now to the problem at hand.  I have the same problem.  I gave up on it and satisfied myself with my iPod without the upgrade.  Reason being I've read so many posts of people having problems after the upgrade.  But I'm sure other factors are involved.  Nevertheless here is the fix most say works to solve the problem:  What ever virus protection you have installed on your computer, disable it.  Then try to install the update. After that enable the protection. I had Kaspersky, and it does it's job well. The thinking is, the virus protection is blocking the upgrade.  Hope this works.   Charlie

  • 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)

  • Why do we obtain a java.rmi.MarshalException during a stateless session bean method invocation from a client java program?

    Hello,
    we're using iAS SP3.
    We deployed a stateless session bean that has a business methods with a Vector as argument (put (vector, String)).
    If we call it from a servlet, it works fine. But when we try to call it from a thread, started in a standalone java client program, we obtain a java.rmi.MarshalException.
    We tried to use Vector and HashSet objects as arguments, but we always obtain this kind of exception. It seems strange because a similar
    method that returns a Collection of objects (getAll) works fine. This is the our bean Remote Interface:
    public interface Receive extends EJBObject {
    public void putMessage(Message message, java.lang.String la) throws RemoteException; // it works fine!!!
    public void putMessages(java.util.Vector messages, java.lang.String la) throws RemoteException; // it doesn't work!!!
    Collection getAll (java.lang.String la) throws RemoteException, EJBException; // it works fine!!!!
    This is the java client stack trace:
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
    org.omg.CORBA.MARSHAL: minor code: 0 completed: No
    org.omg.CORBA.MARSHAL: minor code: 0 completed: No
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:241)
    at com.sun.corba.ee.internal.iiop.ReplyMessage.getSystemException(ReplyMessage.java:93)
    at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:82)
    at com.sun.corba.ee.internal.corba.ClientDelegate.invoke(ClientDelegate.java:199)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:248)
    at ejb._Receive_Stub.putMessages(_Receive_Stub.java:731)
    at commlayer.Receiver.run(Receiver.java:67)
    Does anyone know how to solve this problem?
    Thank you in advance,
    Maurizio

    This is big bug!
    This seems to occur when you try to return complex objects (e.g. a vector of classes or even the Date class).
    As a workaround you can add this Ejb or module to the iPlanet Classpath (NT via kregedit, Sun via iasenv skript.).
    This helps but i really don't know why.
    It should be fixed in 6.5, maybe. We'll see.
    Regards

  • Hanging synchronization sessions

    We just have another problem - 2 users are facing "server busy" message when trying to synchronize using MSync. I just found out that there are some hanging sync sessions which are probably blocking the synchronization (their duration is few thousand seconds and I'm not able to kill them from mobile server). I restarted the OL server so the freezing sync sessions were killed, but when users try to synchronize after the restart, the result is the same - they get "server busy" message and their sessions remain in the active sessions list forever.
    The server is 10gR2 and the clients are both PPC2003 XScale. The In queue and error queue are empty.
    Anybody has an idea what should I try to solve this kind of problem?

    Oracle response on the SR was
    This might be due to Bug 5553375 SYNCHRONIZATION HANGS BETWEEN SENDING AND RECEIVING PHASE.
    According to the bug 5553375, this might be because of the file_size during sending and receiving phase. The default value of
    RESUME_FILE_SIZE is 16MB sync session failure might occur when it reaches this l
    imit. So suggest to increase the value to higher value. can increase slowly also
    as first use 256, if the issue occurs, can increase to 512, which is the file s
    ize
    In webtogo.ora under [CONSOLIDATOR] section set the value as RESUME_FILE_SIZE=256 (or 512).
    After changing restart the mobileserver.
    Enable tracing in both server and client as below
    At the Server :
    1. Stop the server.
    2. Set trace level ALL and trace type RESUME for the Global and the Sync
    components in webtogo.ora. Other component logs can disabled.
    e.g.
    GLOBALLogger=TRACE_LEVEL=ALL|TRACE_TYPE=RESUME|TRACE_DESTINATION=TEXTFILE|TRAC
    E_FILE_SIZE=15
    SYNCLogger=TRACE_LEVEL=ALL|TRACE_TYPE=RESUME|TRACE_DESTINATION=TEXTFILE|TRACE_
    FILE_SIZE=15
    3. Start the Mobile server
    4. When the problem is reproduced, collect the following :-
    - err.log
    - log files under GLOBAL
    - log files under SYNC
    - details for the sync session as shown by the Mobile Manager. the
    Compressed Byte count. (this session shows a success on the server side)
    At the Client:
    1. set debug=1 in polite.ini under the [SYNC] section
    2. When the error occurs, upload the following files
    - timeout_err.txt
    - debug*.txt
    Please note that the timeout_err.txt file will be created only if there were any errors during the receive phase.
    Apart from this, for your information, one of the customer had similar issue and was resolved when they upgraded RDBM
    S from 102020 to 102030.
    Hence, let me know the possibility of upgrading the database.
    this suggests that there may be a limiting factor on the file transfer (did not help in terms of our problem, burt since we fixed the PDA hanging by a re-build, i do not have a case to trace at the moment)
    We have found that sessions hanging on upload are always hanging on C$SEQ_CLIENTS_PI, so pretty sure it is client side corruption/bug
    on download the problem tends to be a disconnect, in which case the server session finishes, but the client hangs (as it has not recieved an end message) - we deal with that via comms timeout. In most cases the large the download, the more likely failure, but this seems more related to server side query time to select the data for streaming to the client, rather than the actual volume of the data

  • Java.rmi.NoSuchObjectException: Session has timed out or was invalidated

    I am getting error in subject when my application is not using Statefull Session Bean for sometime(20 Minutes or so). What i understand is that after session bean is passivated and next time some method is invoked, it is throwing this exeception. My appserver is Oracle 10gAS release2. Please guide if somebody has any clue...This is very critical.Thanks.
    Below is stack trace for reference:
    java.rmi.NoSuchObjectException: Session has timed out or was invalidated
         at com.evermind.server.ejb.StatefulSessionEJBObject.throwPassivisationException(StatefulSessionEJBObject.java:299)
         at BONInstance_StatefulSessionBeanWrapper8.getOutputParameterDetail(BONInstance_StatefulSessionBeanWrapper8.java:728)
         at com.nuc.bon.controller.UIController.processRequest(UIController.java:170)
         at com.nuc.bon.controller.UIController.doPost(UIController.java:457)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)

    I'm having the same problem. I posted to VSM sample and Pooled ApplicationModule Maximum Inactive Age
    which seems to be a similar situation.
    Does anyone have any information on where this time out parameter is set on either the app module or OAS and how to handle this error correctly?
    Thanks,
    Brian

  • Do I need to Synchronize session connection??

    I am working on a project in which requires sending out emails.
    Multiple users may send out emails at the same time by using same email account and session. Question is do I need to synchronize this or just let mail server handle this concurrency. Or session's getDefaultsession method have already considered this? Looking forward to your answer!! Best regards,

    Multiple users may send out emails at the same time by using
    same email account and session.Don't do that. Each thread should have its own session. Otherwise you'll have chaos. Sure, you could synchronize so the threads take turns using a single session, but if you do that there isn't much point in having separate threads, since 99% of the time they will be lining up to use the session.
    However if those "users" are running in separate JVMs, perhaps even on separate computers, then the question doesn't arise. They would automatically have their own sessions.

  • Stateless session EJB invoke RMI

    Is it possible to invoke RMI calls from stateless session EJBs. It is my understanding
    restrictions exists like opening socket, file io, .. are not permitted from EJBs.
    Is there a way around.

    Vishal,
    I wouldn't think you would have a problem doing RMI communication from a Entity
    Bean - - for instance, when a WLS instance 'hosts' an EJB that communicates to
    a different WLS instance that 'hosts' an EJB that communication occurs via RMI.
    Chuck Nelson
    Developer Relations Engineer
    BEA Technical Support

Maybe you are looking for