7 Replies Latest reply on May 22, 2003 12:17 PM by rixc

    Jboss 3.07. SFSB immediately passivated upon creation

    rixc

      Hi all,

      I am trying out my EJBs with version 3.07 and I noticed that all my statefull session beans are immediately passivated after they are accessed. The EJBs worked fine under 3.02. Has anyone else experienced this behavior?

      I checked <container-name>Standard Stateful SessionBean</container-name> entry in the standardjboss.xml and here are the entries:

      ....
      <cache-policy-conf>
      <min-capacity>50</min-capacity>
      <max-capacity>1000000</max-capacity>
      <remover-period>1800</remover-period>
      <max-bean-life>1800</max-bean-life>
      <overager-period>300</overager-period>
      <max-bean-age>600</max-bean-age>
      <resizer-period>400</resizer-period>
      <max-cache-miss-period>60</max-cache-miss-period>
      <min-cache-miss-period>1</min-cache-miss-period>
      <cache-load-factor>0.75</cache-load-factor>
      </cache-policy-conf>
      ....



      The values are still in seconds, arent they?

      Ricardo

        • 1. Re: Jboss 3.07. SFSB immediately passivated upon creation

          Yes.

          Turn on TRACE logging for org.jboss.ejb.plugins
          Maybe you will get a clue? If not, post the result
          - not the whole log :-)

          Regards,
          Adrian

          • 2. Re: Jboss 3.07. SFSB immediately passivated upon creation
            rixc

            Hi.

            I am being a bit slow here.... I did not see any difference with the tracing enabled apart from alot more info on the startup of JBoss and some extra transactional tracing on each method call.

            Another thing I am noticing with versions 3.07 and upwards is that the bean are activated/passivated on each method call (look at the attached file). Is this normal. Another problem I am having is that one of the beans (MailDocumentBean) fails to find an object mapped to the JNDI tree on one of its invocations. The wierd thing is that it found it on a previous call. (Again the attached log shows what I mean)

            Ricardo

            • 3. Re: Jboss 3.07. SFSB immediately passivated upon creation
              rixc

              Hi.

              I am being a bit slow here.... I did not see any difference with the tracing enabled apart from alot more info on the startup of JBoss and some extra transactional tracing on each method call.

              Another thing I am noticing with versions 3.07 and upwards is that the bean are activated/passivated on each method call (look at the attached file). Is this normal. Another problem I am having is that one of the beans (MailDocumentBean) fails to find an object mapped to the JNDI tree on one of its invocations. The wierd thing is that it found it on a previous call. (Again the attached log shows what I mean)

              Ricardo

              • 4. Re: Jboss 3.07. SFSB immediately passivated upon creation

                This is clustering.

                It tells your bean to passivate so that it
                can serialize the state and send it across
                the network.

                Regards,
                Adrian

                • 5. Re: Jboss 3.07. SFSB immediately passivated upon creation
                  rixc

                  Ahh. All of a sudden it is so obvious.

                  Thanks for your answer, albeit an obvious one :)

                  I am however still stuck with another problem with my clustering solution; my client refuses to fail over to my other server when I take one of the servers down.

                  The jboss servers seem to understand that they are in a cluster because I see many messages like
                  2003-05-21 15:03:34,666 INFO [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] New cluster view: 3 ([w0711:1043, rco-l:1357])
                  2003-05-21 15:03:34,666 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] is node w0711:1043dead?
                  2003-05-21 15:03:34,666 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] node w0711:1043is NOT dead
                  2003-05-21 15:03:34,666 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] membership changed from 2 to 2
                  2003-05-21 15:03:34,666 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] Begin notifyListeners, viewID: 3
                  2003-05-21 15:03:34,666 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] End notifyListeners, viewID: 3
                  2003-05-21 15:03:34,666 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] Begin notifyListeners, viewID: 3
                  2003-05-21 15:03:34,666 INFO [DefaultPartition:ReplicantManager] Dead members: 0


                  ...and...

                  2003-05-21 15:04:12,260 DEBUG [DefaultPartition:ReplicantManager] _add(jboss.j2ee:jndiName=PartyContactPoint,service=EJB, rco-l:1357
                  2003-05-21 15:04:12,260 DEBUG [DefaultPartition:ReplicantManager] _adding new HashMap
                  2003-05-21 15:04:12,260 DEBUG [DefaultPartition:ReplicantManager] notifyKeyListeners
                  2003-05-21 15:04:12,260 DEBUG [DefaultPartition:ReplicantManager] notifying 2 listeners for key change: jboss.j2ee:jndiName=PartyContactPoint,service=EJB
                  2003-05-21 15:04:12,260 DEBUG [org.jboss.ha.framework.server.HATarget] replicantsChanged 'jboss.j2ee:jndiName=PartyContactPoint,service=EJB' to 2 (intra-view id: 1428822619)
                  2003-05-21 15:04:12,260 DEBUG [org.jboss.proxy.ejb.ProxyFactory] Rebinding in JNDI... jboss.j2ee:jndiName=PartyContactPoint,service=EJB
                  2003-05-21 15:04:12,400 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] Partition DefaultPartition received msg
                  2003-05-21 15:04:12,400 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] pre methodName: DistributedReplicantManager._add
                  2003-05-21 15:04:12,416 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] handlerName: DistributedReplicantManager methodName: _add
                  2003-05-21 15:04:12,416 DEBUG [org.jboss.ha.framework.server.HAPartitionImpl.DefaultPartition] Handle: DistributedReplicantManager._add


                  ...when I start up a new server in the cluster.

                  In my client connection I added both servers to the connection URL eg. xxx:1100,yyy:1100. And as the clustering document states the smart proxy should handle the switching between the servers in the cluster. But it does not; all I get is an exception telling java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.xxx; Server connection is down. Am I missing something?

                  Any help is greatly appreciated.

                  Ricardo

                  • 6. Re: Jboss 3.07. SFSB immediately passivated upon creation

                    Post the full stacktrace.

                    You have specified true
                    in jboss.xml?

                    You have deployed the application on all servers?

                    Regards,
                    Adrian

                    • 7. Re: Jboss 3.07. SFSB immediately passivated upon creation
                      rixc

                      Adrian,

                      Actually, the failing over works now. I had missed a true in one of my beans!! :( Doh!

                      Thanks for your pointers. It helped a lot.

                      My last hurdle is to now get a single Jboss datasource to work for many users... but that is a post in another forum :)

                      Ricardo