Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 94866 invoked from network); 20 Mar 2007 19:38:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2007 19:38:56 -0000 Received: (qmail 29243 invoked by uid 500); 20 Mar 2007 19:39:03 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 29212 invoked by uid 500); 20 Mar 2007 19:39:03 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 29197 invoked by uid 99); 20 Mar 2007 19:39:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 12:39:03 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 12:38:54 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 58FFE1A9838; Tue, 20 Mar 2007 12:38:34 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r520535 - in /geronimo/server/trunk: configs/cxf/src/plan/plan.xml modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFGBean.java Date: Tue, 20 Mar 2007 19:38:34 -0000 To: scm@geronimo.apache.org From: gawor@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070320193834.58FFE1A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gawor Date: Tue Mar 20 12:38:32 2007 New Revision: 520535 URL: http://svn.apache.org/viewvc?view=rev&rev=520535 Log: enforce WebServicePermission when publishing an endpoint (this will work once cxf publishes latest snapshot) Added: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFGBean.java Modified: geronimo/server/trunk/configs/cxf/src/plan/plan.xml Modified: geronimo/server/trunk/configs/cxf/src/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/cxf/src/plan/plan.xml?view=diff&rev=520535&r1=520534&r2=520535 ============================================================================== --- geronimo/server/trunk/configs/cxf/src/plan/plan.xml (original) +++ geronimo/server/trunk/configs/cxf/src/plan/plan.xml Tue Mar 20 12:38:32 2007 @@ -20,4 +20,6 @@ + + Added: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFGBean.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFGBean.java?view=auto&rev=520535 ============================================================================== --- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFGBean.java (added) +++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFGBean.java Tue Mar 20 12:38:32 2007 @@ -0,0 +1,61 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.geronimo.cxf; + +import org.apache.geronimo.gbean.GBeanInfo; +import org.apache.geronimo.gbean.GBeanInfoBuilder; +import org.apache.geronimo.gbean.GBeanLifecycle; +import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; + +public class CXFGBean implements GBeanLifecycle { + + public CXFGBean() { + } + + public void doStart() throws Exception { + // disable Endpoint.publish() + setProperty("org.apache.cxf.jaxws.checkPublishEndpointPermission", + "true"); + } + + private void setProperty(String propertyName, String value) { + String propValue = System.getProperty(propertyName); + // set only if the property is not set + if (propValue == null) { + System.setProperty(propertyName, value); + } + } + + public void doStop() throws Exception { + } + + public void doFail() { + } + + public static final GBeanInfo GBEAN_INFO; + + static { + GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(CXFGBean.class, CXFGBean.class, NameFactory.GERONIMO_SERVICE); + + GBEAN_INFO = infoFactory.getBeanInfo(); + } + + public static GBeanInfo getGBeanInfo() { + return GBEAN_INFO; + } + +}