Permalink
Browse files

add tests for socketbinding

  • Loading branch information...
1 parent 862843f commit b281fc984b4a908929b1d77704c346d4b590a266 @ctomc ctomc committed with bstansberry Dec 4, 2012
@@ -53,6 +53,6 @@ protected void populateModel(ModelNode operation, ModelNode model) throws Operat
SocketBindingGroupResourceDefinition.DEFAULT_INTERFACE.validateAndSet(operation, model);
- model.get(SOCKET_BINDING);
+
}
}
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ ~ /*
+ ~ * JBoss, Home of Professional Open Source.
+ ~ * Copyright 2012, Red Hat, Inc., and individual contributors
+ ~ * as indicated by the @author tags. See the copyright.txt file in the
+ ~ * distribution for a full listing of individual contributors.
+ ~ *
+ ~ * This is free software; you can redistribute it and/or modify it
+ ~ * under the terms of the GNU Lesser General Public License as
+ ~ * published by the Free Software Foundation; either version 2.1 of
+ ~ * the License, or (at your option) any later version.
+ ~ *
+ ~ * This software is distributed in the hope that it will be useful,
+ ~ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ * Lesser General Public License for more details.
+ ~ *
+ ~ * You should have received a copy of the GNU Lesser General Public
+ ~ * License along with this software; if not, write to the Free
+ ~ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ ~ */
+ -->
+
+<server xmlns="urn:jboss:domain:1.4">
+ <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
+ <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
+ <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
+ <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
+ <socket-binding name="ajp" port="8009"/>
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <socket-binding name="jacorb" interface="unsecure" port="3528"/>
+ <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
+ <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
+ <socket-binding name="jgroups-tcp" port="7600"/>
+ <socket-binding name="jgroups-tcp-fd" port="57600"/>
+ <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
+ <socket-binding name="jgroups-udp-fd" port="54200"/>
+ <socket-binding name="messaging" port="5445"/>
+ <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}"
+ multicast-port="${jboss.messaging.group.port:9876}"/>
+ <socket-binding name="messaging-throughput" port="5455"/>
+ <socket-binding name="modcluster" port="0" multicast-address="230.0.0.4" multicast-port="23364"/>
+ <socket-binding name="remoting" port="4447"/>
+ <socket-binding name="txn-recovery-environment" port="4712"/>
+ <socket-binding name="txn-status-manager" port="4713"/>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="${smtp.mail.server.host:127.0.0.1}" port="${smtp.mail.server.port:25}"/>
+ </outbound-socket-binding>
+ </socket-binding-group>
+</server>
@@ -1,19 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<domain xmlns="urn:jboss:domain:1.4">
- <interfaces>
- <interface name="public"/>
- <interface name="management"/>
- </interfaces>
- <socket-binding-groups>
- <socket-binding-group name="standard-sockets" default-interface="public">
- <socket-binding name="specified-interface" interface="management" port="1111"/>
- <socket-binding name="default-interface" port="8009"/>
- <outbound-socket-binding name="out-local">
- <local-destination socket-binding-ref="standard-sockets"/>
- </outbound-socket-binding>
- <outbound-socket-binding name="out-remote">
- <remote-destination host="localhost" port="25"/>
- </outbound-socket-binding>
- </socket-binding-group>
- </socket-binding-groups>
+ <interfaces>
+ <interface name="public"/>
+ <interface name="management"/>
+ </interfaces>
+ <socket-binding-groups>
+ <socket-binding-group name="standard-sockets" default-interface="public">
+ <socket-binding name="specified-interface" interface="management" port="1111"/>
+ <socket-binding name="default-interface" port="8009"/>
+ <outbound-socket-binding name="out-local">
+ <local-destination socket-binding-ref="standard-sockets"/>
+ </outbound-socket-binding>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="${smtp.mail.server.host:127.0.0.1}" port="${smtp.mail.server.port:25}"/>
+ </outbound-socket-binding>
+ </socket-binding-group>
+ </socket-binding-groups>
</domain>
@@ -4,14 +4,28 @@
<interface name="public"/>
<interface name="management"/>
</interfaces>
- <socket-binding-group name="standard-sockets" default-interface="public" port-offset="100">
- <socket-binding name="specified-interface" interface="management" port="1111"/>
- <socket-binding name="default-interface" port="8009"/>
- <outbound-socket-binding name="out-local">
- <local-destination socket-binding-ref="standard-sockets"/>
- </outbound-socket-binding>
- <outbound-socket-binding name="out-remote">
- <remote-destination host="localhost" port="25"/>
- </outbound-socket-binding>
- </socket-binding-group>
+ <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
+ <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
+ <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
+ <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
+ <socket-binding name="ajp" port="8009"/>
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
+ <socket-binding name="jgroups-tcp" port="7600"/>
+ <socket-binding name="jgroups-tcp-fd" port="57600"/>
+ <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
+ <socket-binding name="jgroups-udp-fd" port="54200"/>
+ <socket-binding name="messaging" port="5445"/>
+ <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}"
+ multicast-port="${jboss.messaging.group.port:9876}"/>
+ <socket-binding name="messaging-throughput" port="5455"/>
+ <socket-binding name="modcluster" port="0" multicast-address="230.0.0.4" multicast-port="23364"/>
+ <socket-binding name="remoting" port="4447"/>
+ <socket-binding name="txn-recovery-environment" port="4712"/>
+ <socket-binding name="txn-status-manager" port="4713"/>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="${smtp.mail.server.host:127.0.0.1}" port="${smtp.mail.server.port:25}"/>
+ </outbound-socket-binding>
+ </socket-binding-group>
</server>
View
@@ -76,5 +76,9 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-core-model-test</artifactId>
+ </dependency>
</dependencies>
</project>
@@ -1,23 +1,25 @@
/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * /
*/
package org.jboss.as.security;
@@ -44,8 +44,8 @@
*/
public abstract class OutboundSocketBindingResourceDefinition extends SimpleResourceDefinition {
- public static final SimpleAttributeDefinition NAME = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.NAME, ModelType.STRING, false)
- .setValidator(new StringLengthValidator(1)).build();
+ /*public static final SimpleAttributeDefinition NAME = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.NAME, ModelType.STRING, false)
+ .setValidator(new StringLengthValidator(1)).build();*/
public static final SimpleAttributeDefinition SOURCE_PORT = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.SOURCE_PORT, ModelType.INT, true)
.setAllowExpression(true).setValidator(new IntRangeValidator(0, 65535, true, true))

0 comments on commit b281fc9

Please sign in to comment.