geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashishj...@apache.org
Subject svn commit: r1035998 - /geronimo/server/branches/2.1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
Date Wed, 17 Nov 2010 12:34:44 GMT
Author: ashishjain
Date: Wed Nov 17 12:34:44 2010
New Revision: 1035998

URL: http://svn.apache.org/viewvc?rev=1035998&view=rev
Log:
GERONIMO-5691 Fix for 2.1

Modified:
    geronimo/server/branches/2.1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java?rev=1035998&r1=1035997&r2=1035998&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
Wed Nov 17 12:34:44 2010
@@ -77,6 +77,17 @@ public class JavaBeanXmlAttributeEditor 
             JavabeanDocument document = JavabeanDocument.Factory.parse(text);
             JavabeanType javaBeanType = document.getJavabean();
             
+            /* Logic to utilize encrypted password value for farming gbean*/ 
+            PropertyType[] pt = javaBeanType.getPropertyArray();
+            for (int i = 0; i < pt.length; i++) {
+                if (javaBeanType.getPropertyArray()[i].getName().endsWith("Password")
+                        || javaBeanType.getPropertyArray()[i].getName().endsWith("password"))
{
+                    String decryptedValue = (String) EncryptionManager.decrypt(javaBeanType.getPropertyArray()[i]
+                            .getStringValue());
+                    javaBeanType.getPropertyArray()[i].setStringValue(decryptedValue);
+                }
+            }
+            
             Object javabean = xmlAttributeBuilder.getValue(javaBeanType,
                 javaBeanClazz.getName(),
                 getClass().getClassLoader());



Mime
View raw message