geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r925911 - in /geronimo/server/trunk/plugins/connector-1_6: geronimo-connector-1_6/ geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/ geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/ ...
Date Sun, 21 Mar 2010 22:03:35 GMT
Author: djencks
Date: Sun Mar 21 22:03:35 2010
New Revision: 925911

URL: http://svn.apache.org/viewvc?rev=925911&view=rev
Log:
GERONIMO-4360 server code changes corresponding to component changes rev 925908

Added:
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
  (with props)
Modified:
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/pom.xml
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/ResourceAdapterWrapperGBean.java
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/ConnectorCallbackHandler.java
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/SecurityContextHandler.java
    geronimo/server/trunk/plugins/connector-1_6/transaction-1_6/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/pom.xml?rev=925911&r1=925910&r2=925911&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/pom.xml (original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/pom.xml Sun Mar 21
22:03:35 2010
@@ -31,7 +31,7 @@
     <groupId>org.apache.geronimo.modules</groupId>
     <artifactId>geronimo-connector-1_6</artifactId>
     <packaging>bundle</packaging>
-    <name>Geronimo Plugins, Connector 1.6 :: Core</name>
+    <name>Geronimo Plugins, Connector 1.6 :: Connector wrappers</name>
 
     <dependencies>
         <dependency>

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/ResourceAdapterWrapperGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/ResourceAdapterWrapperGBean.java?rev=925911&r1=925910&r2=925911&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/ResourceAdapterWrapperGBean.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/ResourceAdapterWrapperGBean.java
Sun Mar 21 22:03:35 2010
@@ -21,7 +21,9 @@ import java.util.Map;
 
 import javax.resource.spi.XATerminator;
 import javax.resource.spi.work.WorkManager;
+import javax.transaction.TransactionSynchronizationRegistry;
 
+import org.apache.geronimo.connector.work.GeronimoWorkManager;
 import org.apache.geronimo.gbean.DynamicGBean;
 import org.apache.geronimo.gbean.DynamicGBeanDelegate;
 import org.apache.geronimo.gbean.GBeanLifecycle;
@@ -55,12 +57,13 @@ public class ResourceAdapterWrapperGBean
     public ResourceAdapterWrapperGBean(
             @ParamAttribute(name="resourceAdapterClass") String resourceAdapterClass,
             @ParamAttribute(name="messageListenerToActivationSpecMap") Map<String, String>
messageListenerToActivationSpecMap,
-            @ParamReference(name="WorkManager", namingType = NameFactory.JCA_WORK_MANAGER)WorkManager
workManager,
+            @ParamReference(name="WorkManager", namingType = NameFactory.JCA_WORK_MANAGER)
GeronimoWorkManager workManager,
             @ParamReference(name="XATerminator", namingType = NameFactory.JCA_WORK_MANAGER)XATerminator
xaTerminator,
             @ParamReference(name="TransactionManager", namingType = NameFactory.JTA_RESOURCE)RecoverableTransactionManager
transactionManager,
+            @ParamReference(name="TransactionSynchronizationRegistry", namingType = NameFactory.JTA_RESOURCE)
TransactionSynchronizationRegistry transactionSynchronizationRegistry,
             @ParamSpecial(type= SpecialAttributeType.classLoader )ClassLoader cl,
             @ParamSpecial(type= SpecialAttributeType.objectName )String objectName) throws
InstantiationException, IllegalAccessException, ClassNotFoundException {
-        super(objectName, resourceAdapterClass, messageListenerToActivationSpecMap, new GeronimoBootstrapContext(workManager,
xaTerminator), transactionManager, cl);
+        super(objectName, resourceAdapterClass, messageListenerToActivationSpecMap, new GeronimoBootstrapContext(workManager,
xaTerminator, transactionSynchronizationRegistry), transactionManager, cl);
         delegate = new DynamicGBeanDelegate();
         delegate.addAll(resourceAdapter);
         this.objectName = objectName;

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/ConnectorCallbackHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/ConnectorCallbackHandler.java?rev=925911&r1=925910&r2=925911&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/ConnectorCallbackHandler.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/ConnectorCallbackHandler.java
Sun Mar 21 22:03:35 2010
@@ -92,8 +92,9 @@ public class ConnectorCallbackHandler im
                             }
                         }
                     });
+                    passwordValidationCallback.setResult(true);
                 } catch (LoginException e) {
-                    throw (IOException)new IOException("Could not log in").initCause(e);
+                    passwordValidationCallback.setResult(false);
                 }
 
             }

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java?rev=925911&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
(added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
Sun Mar 21 22:03:35 2010
@@ -0,0 +1,31 @@
+/*
+ * 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.connector.wrapper.work;
+
+import org.apache.geronimo.connector.work.HintsContextHandler;
+import org.apache.geronimo.gbean.annotation.GBean;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@GBean
+public class HintsContextHandlerGBean extends HintsContextHandler {
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/HintsContextHandlerGBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/SecurityContextHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/SecurityContextHandler.java?rev=925911&r1=925910&r2=925911&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/SecurityContextHandler.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/work/SecurityContextHandler.java
Sun Mar 21 22:03:35 2010
@@ -24,6 +24,7 @@ import java.util.Stack;
 
 import javax.resource.spi.work.WorkCompletedException;
 import javax.resource.spi.work.SecurityContext;
+import javax.resource.spi.work.WorkContext;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginException;
 
@@ -34,12 +35,15 @@ import org.apache.geronimo.gbean.annotat
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.connector.work.WorkContextHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev$ $Date$
  */
 @GBean
 public class SecurityContextHandler implements WorkContextHandler<SecurityContext>
{
+    private static final Logger log = LoggerFactory.getLogger(SecurityContextHandler.class);
 
     private final String realm;
     private final Subject defaultSubject;
@@ -53,12 +57,14 @@ public class SecurityContextHandler impl
     };
 
     public SecurityContextHandler(@ParamAttribute(name="realm") String realm,
-                                        @ParamAttribute(name="defaultSubjectRealm")String
defaultSubjectRealm,
+                                        @ParamAttribute(name="defaultSubjectRealm")String
defaultSubjectRealm, 
                                         @ParamAttribute(name="defaultSubjectId")String defaultSubjectId,
                                         @ParamReference(name="DefaultCredentialStore") CredentialStore
defaultCredentialStore,
                                         @ParamAttribute(name="serviceSubjectRealm")String
serviceSubjectRealm,
                                         @ParamAttribute(name="serviceSubjectId")String serviceSubjectId,
                                         @ParamReference(name="ServiceCredentialStore")CredentialStore
serviceCredentialStore) throws LoginException {
+        log.info("SecurityContextHandler set up with\n realm: {}\n defaultSubjectRealm: {}\n
defaultSubjectId {}\n DefaultCredentialStore {}\n serviceSubjectRealm {}\n serviceSubjectId
{}\n ServiceCredentialStore {}",
+               new Object[] {realm, defaultSubjectRealm, defaultSubjectId, defaultCredentialStore,
serviceSubjectRealm, serviceSubjectId, serviceCredentialStore});
         if (defaultCredentialStore != null && defaultSubjectRealm != null &&
defaultSubjectId != null) {
             defaultSubject = defaultCredentialStore.getSubject(defaultSubjectRealm, defaultSubjectId);
         } else {
@@ -92,8 +98,8 @@ public class SecurityContextHandler impl
         ContextManager.unregisterSubject(clientSubject);
     }
 
-    public Class<SecurityContext> getHandledClass() {
-        return SecurityContext.class;
+    public boolean supports(Class<? extends WorkContext> clazz) {
+        return SecurityContext.class.isAssignableFrom(clazz);
     }
 
     public boolean required() {

Modified: geronimo/server/trunk/plugins/connector-1_6/transaction-1_6/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/transaction-1_6/src/main/plan/plan.xml?rev=925911&r1=925910&r2=925911&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/transaction-1_6/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/connector-1_6/transaction-1_6/src/main/plan/plan.xml Sun
Mar 21 22:03:35 2010
@@ -54,6 +54,9 @@
         </reference>
     </gbean>
 
+    <gbean name="HintsContextHandler" class="org.apache.geronimo.connector.wrapper.work.HintsContextHandlerGBean">
+    </gbean>
+
     <gbean name="SecurityContextHandler" class="org.apache.geronimo.connector.wrapper.work.SecurityContextHandler">
         <attribute name="realm">geronimo-admin</attribute>
         <!--<attribute name="defaultSubjectRealm">geronimo-admin</attribute>-->



Mime
View raw message