Conversations with OSGi services expire immediately ---------------------------------------------------
Key: TUSCANY-2197 URL: https://issues.apache.org/jira/browse/TUSCANY-2197 Project: Tuscany Issue Type: Bug Components: Java SCA OSGi Integration Affects Versions: Java-SCA-1.2 Environment: Windows XP, Eclipse 3.3.2 Reporter: Jürgen Schumacher Attachments: tuscany-implosgi-osgiannotation.patch 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]