[jboss-cvs] JBoss Messaging SVN: r3598 - in branches/Branch_Stable/src: main/org/jboss/jms/server and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 21 02:41:52 EST 2008
Author: scott.stark at jboss.org
Date: 2008-01-21 02:41:52 -0500 (Mon, 21 Jan 2008)
New Revision: 3598
Modified:
branches/Branch_Stable/src/etc/xmdesc/ServerPeer-xmbean.xml
branches/Branch_Stable/src/main/org/jboss/jms/server/SecurityStore.java
branches/Branch_Stable/src/main/org/jboss/jms/server/ServerPeer.java
branches/Branch_Stable/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java
Log:
Add the aop config attributes and setters
Modified: branches/Branch_Stable/src/etc/xmdesc/ServerPeer-xmbean.xml
===================================================================
--- branches/Branch_Stable/src/etc/xmdesc/ServerPeer-xmbean.xml 2008-01-20 21:57:55 UTC (rev 3597)
+++ branches/Branch_Stable/src/etc/xmdesc/ServerPeer-xmbean.xml 2008-01-21 07:41:52 UTC (rev 3598)
@@ -134,6 +134,17 @@
<type>java.lang.String</type>
</attribute>
+ <attribute access="read-write" getMethod="getServerAopConfig" setMethod="setServerAopConfig">
+ <description>The aop.xml resource name for the server aspects.</description>
+ <name>ServerAopConfig</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute access="read-write" getMethod="getClientAopConfig" setMethod="setClientAopConfig">
+ <description>The aop.xml resource name for the client aspects.</description>
+ <name>ClientAopConfig</name>
+ <type>java.lang.String</type>
+ </attribute>
+
<attribute access="read-write" getMethod="getSecurityStore" setMethod="setSecurityStore">
<description>The SecurityStore implementation for the server.</description>
<name>SecurityStore</name>
@@ -207,7 +218,7 @@
</attribute>
<attribute access="write-only" setMethod="setSuckerPassword">
- <description>The password used for message suckers</description>
+ <description>The password used for message suckers. Must match the SecurityStore.SuckerPassword.</description>
<name>SuckerPassword</name>
<type>java.lang.String</type>
</attribute>
Modified: branches/Branch_Stable/src/main/org/jboss/jms/server/SecurityStore.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/server/SecurityStore.java 2008-01-20 21:57:55 UTC (rev 3597)
+++ branches/Branch_Stable/src/main/org/jboss/jms/server/SecurityStore.java 2008-01-21 07:41:52 UTC (rev 3598)
@@ -38,6 +38,9 @@
*/
public interface SecurityStore
{
+ /** The special user used for internal connections that suck messages between nodes */
+ public static final String SUCKER_USER = "JBM.SUCKER";
+
/**
* @return the security meta-data for the given destination.
*/
@@ -51,7 +54,7 @@
* Authenticate the specified user with the given password. Implementations are most likely to
* delegates to a JBoss AuthenticationManager.
*
- * Successful autentication will place a new SubjectContext on thread local, which will be used
+ * Successful authentication will place a new SubjectContext on thread local, which will be used
* in the authorization process. However, we need to make sure we clean up thread local
* immediately after we used the information, otherwise some other people security my be screwed
* up, on account of thread local security stack being corrupted.
Modified: branches/Branch_Stable/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/server/ServerPeer.java 2008-01-20 21:57:55 UTC (rev 3597)
+++ branches/Branch_Stable/src/main/org/jboss/jms/server/ServerPeer.java 2008-01-21 07:41:52 UTC (rev 3598)
@@ -251,16 +251,24 @@
clusterNotifier.registerListener(connFactoryJNDIMapper);
failoverWaiter = new FailoverWaiter(serverPeerID, failoverStartTimeout, failoverCompleteTimeout, txRepository);
clusterNotifier.registerListener(failoverWaiter);
-
+
+ // Allow the securityStore to default to the SecurityMetadataStore impl
+ if (securityStore == null)
+ {
+ log.debug("Using default SecurityMetadataStore implementation for securityStore");
+ securityStore = new SecurityMetadataStore();
+ }
+ // TODO: Only used for ClusterConnectionManager, won't work if the
+ // external SecurityStore does not use passwords
if (suckerPassword == null)
{
suckerPassword = SecurityMetadataStore.DEFAULT_SUCKER_USER_PASSWORD;
}
if (clusterPullConnectionFactoryName != null)
- {
+ {
clusterConnectionManager = new ClusterConnectionManager(useXAForMessagePull, serverPeerID,
clusterPullConnectionFactoryName, defaultPreserveOrdering,
- SecurityMetadataStore.SUCKER_USER, suckerPassword);
+ SecurityStore.SUCKER_USER, suckerPassword);
clusterNotifier.registerListener(clusterConnectionManager);
}
@@ -1319,12 +1327,32 @@
return "ServerPeer[" + getServerPeerID() + "]";
}
+ public String getServerAopConfig()
+ {
+ return serverAopConfig;
+ }
+
+ public void setServerAopConfig(String serverAopConfig)
+ {
+ this.serverAopConfig = serverAopConfig;
+ }
+
+ public String getClientAopConfig()
+ {
+ return clientAopConfig;
+ }
+
+ public void setClientAopConfig(String clientAopConfig)
+ {
+ this.clientAopConfig = clientAopConfig;
+ }
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
// Private --------------------------------------------------------------------------------------
-
+
private void loadServerAOPConfig() throws Exception
{
URL url = this.getClass().getClassLoader().getResource(serverAopConfig);
Modified: branches/Branch_Stable/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java 2008-01-20 21:57:55 UTC (rev 3597)
+++ branches/Branch_Stable/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java 2008-01-21 07:41:52 UTC (rev 3598)
@@ -57,8 +57,6 @@
private static final Logger log = Logger.getLogger(SecurityMetadataStore.class);
- public static final String SUCKER_USER = "JBM.SUCKER";
-
public static final String DEFAULT_SUCKER_USER_PASSWORD = "CHANGE ME!!";
// Attributes ----------------------------------------------------
@@ -72,7 +70,7 @@
private RealmMapping realmMapping;
private Element defaultSecurityConfig;
- private String securityDomain;
+ private String securityDomain = "java:/jaas/messaging";
private String suckerPassword;
More information about the jboss-cvs-commits
mailing list