geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
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 GMT
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 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
 
+  <gbean name="CXFGBean" class="org.apache.geronimo.cxf.CXFGBean"/>
+
 </module>

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;
+    }
+
+}



Mime
View raw message