Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2197

Conversations with OSGi services expire immediately

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SCA-1.2
    • None
    • None
    • Windows XP, Eclipse 3.3.2
    • Patch Available

    Description

      This occurred with current revision from sca-java-1.2 branch.
      I use the Tuscany OSGi bundles created by itests/osgi-tuscany in Eclipse Equinox, the SCA domain is started in a BundleActivator of my test projects. When I use implementation.osgi for a conversational service, the first method call after the init method throws a org.osoa.sca.ConversationEndedException: Conversation 44c36d6c-68af-4ba9-a9ba-354ccc5dd9d0 has expired. I debugged this and it seems that is caused by org.apache.tuscany.sca.implementation.osgi.context.OSGiAnnotations, which uses Long.MAX_VALUE as the default values for maxAge and maxIdleTime which in turn causes an overflow in the initializeConversationAttributes() of org.apache.tuscany.sca.core.conversation.ExtendedConversationImpl. This results in a negative expirationTime which is of course always smaller than the current time. When I change the default values to -1 (as in org.apache.tuscany.sca.implementation.java.impl.JavaImplementationImpl), it works. See attached patch for modules/implementation-osgi. I'm not sure if this is the best or correct solution, but it may be a hint to someone with more knowledge about this code.

      Attachments

        1. tuscany-implosgi-osgiannotation.patch
          0.8 kB
          Jürgen Schumacher

        Activity

          People

            Unassigned Unassigned
            waeller Jürgen Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: