Raymond, I understand what you’re saying. Yes that makes sense, I think our team can make validate, correct and test this. Thanks!
-a- On 2/18/10 12:02 PM, "Raymond Feng" <[email protected]> wrote: Hi, I think the key problem here is that TravelCatalog component is composite-scoped. It has a conversational reference to the Search providers (i.e, the conversation is between the TravelCatalog and one of the Search providers). The web browser is the client making JSONRPC calls into the TravelCatalog component. As long as the server is running, there is only one instance of TravelCatalogImpl with the service proxies of Search injected. The side effect is that if TravelCatalogImpl instance becomes staled due to the expired conversation, it cannot serve further requests from the web browser. I think the usage of conversation is probably wrong here. To simplify this, let's use a few symbols for the participants: 1) W: The web client (multiple instances) 2) T: The travel catalog (A singleton) 3) S: The search provider (stateless, multiple instances) The conversation is between T and S. What is it used for? Ideally, the conversation should be correlated to W's interaction with T. Thanks, Raymond From: Albert Tsang <mailto:[email protected]> Sent: Thursday, February 18, 2010 8:45 AM To: [email protected] Subject: Re: Travelsample Raymond, Regarding #1, I believe the model is correct. However, if a new search is initiated with the old search params, I assume that the conversation is uniquely ID’ed through the use of the conversation for the request and callback response? If the conversation expires I think and exception should be logged and bubbled back to the client. The problem I’m experiencing is that all subsequent searches are receiving that error making the travelsample app unsusable after that point. Is that internal to how it’s been developed or is it in infrastructure level piece of code? The expected behavior I would imagine would be. A search request goes out, if the callback doesn’t conclude the conversation, the conversation expires, an exception is thrown, it may bubble back to the client depending on how the exception is caught, but that a new search request with a new conversation ID is ensued. Also – why is the conversation expiring? Every search through this travelsample app is coming back just fine (I can see the search results) it’s just that after a while, I’m seeing this error. -a- On 2/17/10 4:10 PM, "Raymond Feng" <[email protected]> wrote: Hi, I can reproduce the problem now. It leads to two questions: 1) Do we model the conversation correctly here for the search? Do we use the conversation to correlate the request and response for the asynchronous search? 2) What's the correct behavior if the conversation expires? Should the container start a new conversation instead of complaining about the expiration? Thanks, Raymond From: Albert Tsang <mailto:[email protected]> Sent: Wednesday, February 17, 2010 10:10 AM To: [email protected] Subject: Re: Travelsample Thanks Raymond, fyi – you must execute a search, let some time pass, reload or refresh the page and then re-run the exact search. Any subsequent search against the application should generate the exception. Thanks! -a- On 2/17/10 10:00 AM, "Raymond Feng" <[email protected]> wrote: Hi, Thanks for the update. I'll try to reproduce the problem and see what goes wrong here. Raymond From: Albert Tsang <mailto:[email protected]> Sent: Wednesday, February 17, 2010 9:28 AM To: [email protected] Subject: Re: Travelsample I added in @ConversationalAttributes and set maxAge to 5 minutes. I added this to all interfaces in the travelsample that were annotated as @Conversational and still get this error. - a- On 2/15/10 11:45 PM, "Albert Tsang" <[email protected]> wrote: OK, will try thanks! -a- On 2/15/10 11:41 PM, "Raymond Feng" <[email protected]> wrote: Hi, In OSOA specs of SCA, it says: " 1662 The @ConversationAttributes annotation type is used to define a set of attributes which apply to 1663 conversational interfaces of services or references of a Java class. The annotation has the following 1664 attributes: 1665 • maxIdleTime (optional) - The maximum time that can pass between operations within a single 1666 conversation. If more time than this passes, then the container may end the conversation. 1667 • maxAge (optional) - The maximum time that the entire conversation can remain active. If more 1668 time than this passes, then the container may end the conversation. 1669 • singlePrincipal (optional) – If true, only the principal (the user) that started the conversation has 1670 authority to continue the conversation. The default value is false. " Can you try to adjust the maxAge using @ConversationAttriutes against the Java component implementation class? From: Albert Tsang <mailto:[email protected]> Sent: Monday, February 15, 2010 4:11 PM To: [email protected] Subject: Travelsample I managed to get the travelsample working with the ui, booking, travelcatalog and payment working on one host and the search function with callback working on another. After a while, coming back to the ui client I get the following error after reloading the page and trying to execute a search... org.osoa.sca.ConversationEndedException: Conversation null has expired. at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.conversationPreinvoke(JDKInvocationHandler.java:464) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:340) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:193) at $Proxy56.searchAsynch(Unknown Source) at com.tuscanyscatours.travelcatalog.impl.TravelCatalogImpl.search(TravelCatalogImpl.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:156) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:60) at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:60) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:346) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:193) at $Proxy59.search(Unknown Source) at com.tuscanyscatours.impl.SCAToursImpl.search(SCAToursImpl.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:156) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:67) at org.apache.tuscany.sca.binding.jsonrpc.provider.JSONRPCServiceServlet.handleJSONRPCMethodInvocation(JSONRPCServiceServlet.java:257) at org.apache.tuscany.sca.binding.jsonrpc.provider.JSONRPCServiceServlet.handleServiceRequest(JSONRPCServiceServlet.java:160) at org.apache.tuscany.sca.binding.jsonrpc.provider.JSONRPCServiceServlet.service(JSONRPCServiceServlet.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.tuscany.sca.host.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:107) at org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:94) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)
