exo-jcr SVN: r2952 - core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 10:26:58 -0400 (Thu, 19 Aug 2010)
New Revision: 2952
Modified:
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-909: close LDAP context in LDAPServiceImpl.authenticate() method
Modified: core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 14:20:08 UTC (rev 2951)
+++ core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 14:26:58 UTC (rev 2952)
@@ -132,15 +132,7 @@
{
// Just close since we are not pooling anything by self.
// Override this method if need other behavior.
- try
- {
- if (ctx != null)
- ctx.close();
- }
- catch (NamingException e)
- {
- LOG.warn("Exception occur when try close LDAP context. ", e);
- }
+ closeContext(ctx);
}
/**
@@ -164,17 +156,22 @@
props.put(Context.SECURITY_PRINCIPAL, userDN);
props.put(Context.SECURITY_CREDENTIALS, password);
props.put("com.sun.jndi.ldap.connect.pool", "false");
+
+ LdapContext ctx = null;
try
{
- new InitialLdapContext(props, null);
+ ctx = new InitialLdapContext(props, null);
return true;
}
catch (NamingException e)
{
- if (LOG.isDebugEnabled())
- e.printStackTrace();
+ LOG.debug("Exception during initilization LDAP context", e);
return false;
}
+ finally
+ {
+ closeContext(ctx);
+ }
}
/**
@@ -341,4 +338,25 @@
return DEFAULT_SERVER;
}
+ /**
+ * Closes LDAP context and shows warning if exception occurred.
+ *
+ * @param ctx
+ * LDAP context
+ */
+ private void closeContext(Context ctx)
+ {
+ try
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
+ catch (NamingException e)
+ {
+ LOG.warn("Exception occurred when tried to close context", e);
+ }
+ }
+
}
15 years, 11 months
exo-jcr SVN: r2951 - core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 10:20:08 -0400 (Thu, 19 Aug 2010)
New Revision: 2951
Modified:
core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-909: add private method closeContext()
Modified: core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 13:29:14 UTC (rev 2950)
+++ core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 14:20:08 UTC (rev 2951)
@@ -132,15 +132,7 @@
{
// Just close since we are not pooling anything by self.
// Override this method if need other behavior.
- try
- {
- if (ctx != null)
- ctx.close();
- }
- catch (NamingException e)
- {
- LOG.warn("Exception occur when try close LDAP context. ", e);
- }
+ closeContext(ctx);
}
/**
@@ -178,17 +170,7 @@
}
finally
{
- try
- {
- if (ctx != null)
- {
- ctx.close();
- }
- }
- catch (NamingException ne)
- {
- LOG.debug("Can't close LDAP context", ne);
- }
+ closeContext(ctx);
}
}
@@ -356,4 +338,25 @@
return DEFAULT_SERVER;
}
+ /**
+ * Closes LDAP context and shows warning if exception occurred.
+ *
+ * @param ctx
+ * LDAP context
+ */
+ private void closeContext(Context ctx)
+ {
+ try
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
+ catch (NamingException e)
+ {
+ LOG.warn("Exception occurred when tried to close context", e);
+ }
+ }
+
}
15 years, 11 months
exo-jcr SVN: r2950 - jcr/branches/1.14-ISPN.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 09:29:14 -0400 (Thu, 19 Aug 2010)
New Revision: 2950
Modified:
jcr/branches/1.14-ISPN/pom.xml
Log:
EXOJCR-830: change dependencies
Modified: jcr/branches/1.14-ISPN/pom.xml
===================================================================
--- jcr/branches/1.14-ISPN/pom.xml 2010-08-19 12:52:34 UTC (rev 2949)
+++ jcr/branches/1.14-ISPN/pom.xml 2010-08-19 13:29:14 UTC (rev 2950)
@@ -42,9 +42,9 @@
<properties>
<exo.product.name>exo-jcr</exo.product.name>
<exo.product.specification>1.14</exo.product.specification>
- <org.exoplatform.kernel.version>2.3.0-Beta01-SNAPSHOT</org.exoplatform.kernel.version>
- <org.exoplatform.core.version>2.4.0-Beta01-SNAPSHOT</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.2.0-Beta01-SNAPSHOT</org.exoplatform.ws.version>
+ <org.exoplatform.kernel.version>2.3.0-CR1-SNAPSHOT</org.exoplatform.kernel.version>
+ <org.exoplatform.core.version>2.4.0-CR1-SNAPSHOT</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.2.0-CR1-SNAPSHOT</org.exoplatform.ws.version>
<org.exoplatform.doc-style.version>1</org.exoplatform.doc-style.version>
</properties>
15 years, 11 months
exo-jcr SVN: r2949 - core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 08:52:34 -0400 (Thu, 19 Aug 2010)
New Revision: 2949
Modified:
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-909: revert changes
Modified: core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 12:50:39 UTC (rev 2948)
+++ core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 12:52:34 UTC (rev 2949)
@@ -164,11 +164,9 @@
props.put(Context.SECURITY_PRINCIPAL, userDN);
props.put(Context.SECURITY_CREDENTIALS, password);
props.put("com.sun.jndi.ldap.connect.pool", "false");
-
- InitialContext ctx = null;
try
{
- ctx = new InitialLdapContext(props, null);
+ new InitialLdapContext(props, null);
return true;
}
catch (NamingException e)
@@ -177,20 +175,6 @@
e.printStackTrace();
return false;
}
- finally
- {
- try
- {
- if (ctx != null)
- {
- ctx.close();
- }
- }
- catch (NamingException ne)
- {
- LOG.debug("Can't close LDAP context", ne);
- }
- }
}
/**
15 years, 11 months
exo-jcr SVN: r2948 - in core/branches/2.3.x: exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl and 2 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 08:50:39 -0400 (Thu, 19 Aug 2010)
New Revision: 2948
Added:
core/branches/2.3.x/patch/
core/branches/2.3.x/patch/EXOJCR-909/
core/branches/2.3.x/patch/EXOJCR-909/EXOJCR-909.patch
Modified:
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-909: close LDAP context in LDAPServiceImpl.authenticate() method
Modified: core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 12:49:00 UTC (rev 2947)
+++ core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 12:50:39 UTC (rev 2948)
@@ -164,9 +164,11 @@
props.put(Context.SECURITY_PRINCIPAL, userDN);
props.put(Context.SECURITY_CREDENTIALS, password);
props.put("com.sun.jndi.ldap.connect.pool", "false");
+
+ InitialContext ctx = null;
try
{
- new InitialLdapContext(props, null);
+ ctx = new InitialLdapContext(props, null);
return true;
}
catch (NamingException e)
@@ -175,6 +177,20 @@
e.printStackTrace();
return false;
}
+ finally
+ {
+ try
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
+ catch (NamingException ne)
+ {
+ LOG.debug("Can't close LDAP context", ne);
+ }
+ }
}
/**
Added: core/branches/2.3.x/patch/EXOJCR-909/EXOJCR-909.patch
===================================================================
--- core/branches/2.3.x/patch/EXOJCR-909/EXOJCR-909.patch (rev 0)
+++ core/branches/2.3.x/patch/EXOJCR-909/EXOJCR-909.patch 2010-08-19 12:50:39 UTC (rev 2948)
@@ -0,0 +1,40 @@
+Index: exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
+===================================================================
+--- exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java (revision 2946)
++++ exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java (working copy)
+@@ -164,17 +164,32 @@
+ props.put(Context.SECURITY_PRINCIPAL, userDN);
+ props.put(Context.SECURITY_CREDENTIALS, password);
+ props.put("com.sun.jndi.ldap.connect.pool", "false");
++
++ InitialContext ctx = null;
+ try
+ {
+- new InitialLdapContext(props, null);
++ ctx = new InitialLdapContext(props, null);
+ return true;
+ }
+ catch (NamingException e)
+ {
+- if (LOG.isDebugEnabled())
+- e.printStackTrace();
++ LOG.debug("Error during initialization LDAP Context", e);
+ return false;
+ }
++ finally
++ {
++ try
++ {
++ if (ctx != null)
++ {
++ ctx.close();
++ }
++ }
++ catch (NamingException ne)
++ {
++ LOG.debug("Can't close LDAP context", ne);
++ }
++ }
+ }
+
+ /**
15 years, 11 months
exo-jcr SVN: r2947 - core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 08:49:00 -0400 (Thu, 19 Aug 2010)
New Revision: 2947
Modified:
core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-909: close LDAP context in LDAPServiceImpl.authenticate() method
Modified: core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 07:30:57 UTC (rev 2946)
+++ core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2010-08-19 12:49:00 UTC (rev 2947)
@@ -164,17 +164,32 @@
props.put(Context.SECURITY_PRINCIPAL, userDN);
props.put(Context.SECURITY_CREDENTIALS, password);
props.put("com.sun.jndi.ldap.connect.pool", "false");
+
+ InitialContext ctx = null;
try
{
- new InitialLdapContext(props, null);
+ ctx = new InitialLdapContext(props, null);
return true;
}
catch (NamingException e)
{
- if (LOG.isDebugEnabled())
- e.printStackTrace();
+ LOG.debug("Error during initialization LDAP Context", e);
return false;
}
+ finally
+ {
+ try
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
+ catch (NamingException ne)
+ {
+ LOG.debug("Can't close LDAP context", ne);
+ }
+ }
}
/**
15 years, 11 months
exo-jcr SVN: r2946 - in jcr/branches/1.12.x/patch: EXOJCR-908 and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 03:30:57 -0400 (Thu, 19 Aug 2010)
New Revision: 2946
Added:
jcr/branches/1.12.x/patch/EXOJCR-908/
jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch
Log:
EXOJCR-908: fox parsing permission value
Added: jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch
===================================================================
--- jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch (rev 0)
+++ jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch 2010-08-19 07:30:57 UTC (rev 2946)
@@ -0,0 +1,47 @@
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java (revision 2944)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java (working copy)
+@@ -18,7 +18,6 @@
+ */
+ package org.exoplatform.services.jcr.impl.core.value;
+
+-import org.exoplatform.services.jcr.access.AccessControlEntry;
+ import org.exoplatform.services.jcr.access.PermissionType;
+ import org.exoplatform.services.jcr.access.SystemIdentity;
+ import org.exoplatform.services.jcr.core.ExtendedPropertyType;
+@@ -43,6 +42,8 @@
+
+ private static final int TYPE = ExtendedPropertyType.PERMISSION;
+
++ private static final String IDENTITY_DELIMITER = " ";
++
+ private String identity;
+
+ private String permission;
+@@ -84,7 +85,7 @@
+
+ static public String[] parse(String pstring)
+ {
+- StringTokenizer parser = new StringTokenizer(pstring, AccessControlEntry.DELIMITER);
++ StringTokenizer parser = new StringTokenizer(pstring, IDENTITY_DELIMITER);
+ String identityString = parser.nextToken();
+ String permissionString = parser.nextToken();
+
+@@ -112,6 +113,7 @@
+ /**
+ * {@inheritDoc}
+ */
++ @Override
+ protected String getInternalString() throws ValueFormatException
+ {
+ return asString(identity, permission);
+@@ -120,7 +122,7 @@
+ static protected String asString(String identity, String permission)
+ {
+ if (identity != null || permission != null) // SystemIdentity.ANY, PermissionType.ALL
+- return (identity != null ? identity : SystemIdentity.ANY) + AccessControlEntry.DELIMITER
++ return (identity != null ? identity : SystemIdentity.ANY) + IDENTITY_DELIMITER
+ + (permission != null ? permission : PermissionType.READ);
+ else
+ return "";
15 years, 11 months
exo-jcr SVN: r2945 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-19 03:30:35 -0400 (Thu, 19 Aug 2010)
New Revision: 2945
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java
Log:
EXOJCR-908: fox parsing permission value
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java 2010-08-18 09:43:40 UTC (rev 2944)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java 2010-08-19 07:30:35 UTC (rev 2945)
@@ -18,7 +18,6 @@
*/
package org.exoplatform.services.jcr.impl.core.value;
-import org.exoplatform.services.jcr.access.AccessControlEntry;
import org.exoplatform.services.jcr.access.PermissionType;
import org.exoplatform.services.jcr.access.SystemIdentity;
import org.exoplatform.services.jcr.core.ExtendedPropertyType;
@@ -43,6 +42,8 @@
private static final int TYPE = ExtendedPropertyType.PERMISSION;
+ private static final String IDENTITY_DELIMITER = " ";
+
private String identity;
private String permission;
@@ -84,7 +85,7 @@
static public String[] parse(String pstring)
{
- StringTokenizer parser = new StringTokenizer(pstring, AccessControlEntry.DELIMITER);
+ StringTokenizer parser = new StringTokenizer(pstring, IDENTITY_DELIMITER);
String identityString = parser.nextToken();
String permissionString = parser.nextToken();
@@ -112,6 +113,7 @@
/**
* {@inheritDoc}
*/
+ @Override
protected String getInternalString() throws ValueFormatException
{
return asString(identity, permission);
@@ -120,7 +122,7 @@
static protected String asString(String identity, String permission)
{
if (identity != null || permission != null) // SystemIdentity.ANY, PermissionType.ALL
- return (identity != null ? identity : SystemIdentity.ANY) + AccessControlEntry.DELIMITER
+ return (identity != null ? identity : SystemIdentity.ANY) + IDENTITY_DELIMITER
+ (permission != null ? permission : PermissionType.READ);
else
return "";
15 years, 11 months
exo-jcr SVN: r2944 - in jcr/branches/1.12.x: exo.jcr.connectors.localadapter/src/main/rar/META-INF and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-18 05:43:40 -0400 (Wed, 18 Aug 2010)
New Revision: 2944
Modified:
jcr/branches/1.12.x/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml
jcr/branches/1.12.x/pom.xml
Log:
EXOJCR-826: change dependency to branch
Modified: jcr/branches/1.12.x/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml 2010-08-18 09:42:24 UTC (rev 2943)
+++ jcr/branches/1.12.x/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml 2010-08-18 09:43:40 UTC (rev 2944)
@@ -25,7 +25,7 @@
<display-name>JCR repository</display-name>
<vendor-name>exoplatform</vendor-name>
<eis-type />
- <resourceadapter-version>1.12.2-GA-SNAPSHOT</resourceadapter-version>
+ <resourceadapter-version>1.12.4-GA-SNAPSHOT</resourceadapter-version>
<license>
<license-required>false</license-required>
</license>
Modified: jcr/branches/1.12.x/pom.xml
===================================================================
--- jcr/branches/1.12.x/pom.xml 2010-08-18 09:42:24 UTC (rev 2943)
+++ jcr/branches/1.12.x/pom.xml 2010-08-18 09:43:40 UTC (rev 2944)
@@ -42,9 +42,9 @@
<properties>
<exo.product.name>exo-jcr</exo.product.name>
<exo.product.specification>1.12</exo.product.specification>
- <org.exoplatform.kernel.version>2.2.3-GA</org.exoplatform.kernel.version>
- <org.exoplatform.core.version>2.3.3-GA</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.1.3-GA</org.exoplatform.ws.version>
+ <org.exoplatform.kernel.version>2.2.4-GA-SNAPSHOT</org.exoplatform.kernel.version>
+ <org.exoplatform.core.version>2.3.4-GA-SNAPSHOT</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.4-GA-SNAPSHOT</org.exoplatform.ws.version>
<org.exoplatform.doc-style.version>1</org.exoplatform.doc-style.version>
</properties>
15 years, 11 months
exo-jcr SVN: r2943 - jcr/tags/1.12.3-GA/exo.jcr.connectors.localadapter/src/main/rar/META-INF.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-08-18 05:42:24 -0400 (Wed, 18 Aug 2010)
New Revision: 2943
Modified:
jcr/tags/1.12.3-GA/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml
Log:
EXOJCR-826: fix ra.xml
Modified: jcr/tags/1.12.3-GA/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml
===================================================================
--- jcr/tags/1.12.3-GA/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml 2010-08-18 09:14:04 UTC (rev 2942)
+++ jcr/tags/1.12.3-GA/exo.jcr.connectors.localadapter/src/main/rar/META-INF/ra.xml 2010-08-18 09:42:24 UTC (rev 2943)
@@ -25,7 +25,7 @@
<display-name>JCR repository</display-name>
<vendor-name>exoplatform</vendor-name>
<eis-type />
- <resourceadapter-version>1.12.2-GA-SNAPSHOT</resourceadapter-version>
+ <resourceadapter-version>1.12.3-GA</resourceadapter-version>
<license>
<license-required>false</license-required>
</license>
15 years, 11 months