Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 94728 invoked from network); 28 Jun 2007 08:30:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jun 2007 08:30:47 -0000 Received: (qmail 91292 invoked by uid 500); 28 Jun 2007 08:30:50 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 91280 invoked by uid 500); 28 Jun 2007 08:30:50 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 91271 invoked by uid 99); 28 Jun 2007 08:30:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2007 01:30:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2007 01:30:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 524D971404B for ; Thu, 28 Jun 2007 01:30:26 -0700 (PDT) Message-ID: <21870098.1183019426295.JavaMail.jira@brutus> Date: Thu, 28 Jun 2007 01:30:26 -0700 (PDT) From: "willem Jiang (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Assigned: (CXF-750) Support using Session in standalone In-Reply-To: <15525653.1182998966080.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] willem Jiang reassigned CXF-750: -------------------------------- Assignee: willem Jiang > Support using Session in standalone > ----------------------------------- > > Key: CXF-750 > URL: https://issues.apache.org/jira/browse/CXF-750 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Reporter: Jervis Liu > Assignee: willem Jiang > > Following code snippet should work when cxf is deployed in standalone mode (Jetty): > @Resource > private WebServiceContext context; > public final List ping() { > MessageContext mc = context.getMessageContext(); > HttpSession session = ((javax.servlet.http.HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST)) > .getSession(); > // Get a session property "counter" from context > if (session == null) { > throw new WebServiceException("No session in WebServiceContext"); > } > Integer counter = (Integer)session.getAttribute("counter"); > if (counter == null) { > counter = new Integer(0); > System.out.println("Starting the Session"); > } > counter = new Integer(counter.intValue() + 1); > session.setAttribute("counter", counter); > System.out.println("------------" + counter); > return counter; > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.