[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: ISSUE 10: State sharing between ServiceReference and type-safe reference
http://www.osoa.org/jira/browse/JAVA-10 -----Ursprüngliche Nachricht----- Von: Simon Nash [mailto:NASH@uk.ibm.com] Gesendet: Mittwoch, 26. September 2007 15:02 An: sca-j@lists.oasis-open.org Betreff: [sca-j] NEW ISSUE: State sharing between ServiceReference and type-safe reference TARGET: Java Common Annotations and APIs specification, section "Java API" / {"ComponentContext", "CallableReference"} DESCRIPTION: When a ServiceReference has been created from a type-safe reference (proxy) using ComponentContext.cast(), or when a type-safe reference (proxy) has been created from a ServiceReference using CalllableReference.getService(), it is not clear whether actions that change the state of the ServiceReference also affect calls through the type-safe reference (proxy). For example, in the following code snippet, where OrderService and DeliveryService are both conversational, class MyClient { @Context ComponentContext context; @Reference OrderService orders; void createOrder(String orderID, String customerID) { ServiceReference<OrderService> serviceRef = context.cast(orders); serviceRef.setConversationID(orderID); orders.create(customerID); } void scheduleDelivery(String orderID, String customerID) { ServiceReference<DeliveryService> serviceRef = context.getServiceReference(DeliveryService.class, "Deliveries"); DeliveryService deliveries = serviceRef.getService(); serviceRef.setConversationID(orderID); deliveries.schedule(customerID); } } it is not clear whether either or both of the conversationID values passed on the setConversationID() calls will be used for the conversations that are started by the orders,create() and deliveries.schedule() calls. PROPOSAL: For the createOrder case, the cast() method should result in state that is shared between the ServiceReference and the type-safe reference (proxy). This shared state comprises the conversationID for the next conversation, the callback ID for the next call, and the callback object for the next call. For the scheduleDelivery case, the getService() method should result in state that is shared between the ServiceReference and the type-safe reference (proxy). This shared state comprises the conversationID for the next conversation, the callback ID for the next call, and the callback object for the next call. Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]