Permalink
Browse files

Revert "Save current work"

This reverts commit b0303dc33e6d62052f8dddbbe1958e82a17b5533.
  • Loading branch information...
1 parent 78a9e0a commit 18ce941f217d37dcc992ac677007ded9e0853c4c @starksm64 starksm64 committed Sep 23, 2010
Showing with 295 additions and 2,720 deletions.
  1. +2 −2 build/src/main/resources/modules/org/hornetq/main/module.xml
  2. +5 −2 build/src/main/resources/modules/org/jboss/as/messaging/main/module.xml
  3. +122 −122 domain/src/main/java/org/jboss/as/services/net/SocketBinding.java
  4. +1 −1 domain/src/main/resources/schema/jboss_7_0.xsd
  5. +0 −1 messaging/.gitattributes
  6. +9 −27 messaging/src/main/java/org/jboss/as/messaging/AcceptorsElement.java
  7. +80 −107 messaging/src/main/java/org/jboss/as/messaging/AddressSettingsElement.java
  8. +1 −16 messaging/src/main/java/org/jboss/as/messaging/Attribute.java
  9. +24 −1,329 messaging/src/main/java/org/jboss/as/messaging/ConfigurationElement.java
  10. +1 −105 messaging/src/main/java/org/jboss/as/messaging/ConnectorsElement.java
  11. +5 −86 messaging/src/main/java/org/jboss/as/messaging/Element.java
  12. +0 −62 messaging/src/main/java/org/jboss/as/messaging/ElementUtils.java
  13. +7 −31 messaging/src/main/java/org/jboss/as/messaging/MessagingSubsystemElement.java
  14. +7 −121 messaging/src/main/java/org/jboss/as/messaging/SecuritySettingsElement.java
  15. +4 −81 messaging/src/main/java/org/jboss/as/messaging/hornetq/HornetQService.java
  16. +6 −537 messaging/src/main/resources/jboss-messaging.xsd
  17. +8 −80 messaging/src/main/test/java/org/jboss/as/messaging/test/ConfigParsingUnitTestCase.java
  18. +5 −0 messaging/src/main/test/java/org/jboss/as/messaging/test/NullSubsystemElement.java
  19. +8 −10 messaging/src/main/test/resources/domain-with-messaging.xml
@@ -22,13 +22,13 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<module xmlns="urn:jboss:module:1.0" name="org.hornetq">
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.messaging">
<resources>
<!-- Insert resources here -->
</resources>
<dependencies>
- <module name="javax.jms.api" />
<module name="org.hornetq"/>
+ <module name="javax.jms
</dependencies>
</module>
@@ -22,18 +22,21 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<module xmlns="urn:jboss:module:1.0" name="org.jboss.as.messaging">
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.as.transactions">
<resources>
<!-- Insert resources here -->
</resources>
<dependencies>
+ <module name="javax.transaction.api"/>
<module name="org.jboss.staxmapper"/>
<module name="org.jboss.as.domain"/>
+ <module name="org.jboss.integration.jboss-transaction-spi"/>
<module name="org.jboss.msc"/>
<module name="org.jboss.logging"/>
- <module name="org.hornetq"/>
+ <module name="org.jboss.jts"/>
+ <module name="org.jboss.jts.integration"/>
<module name="system"/>
</dependencies>
</module>
@@ -43,136 +43,136 @@
*/
public class SocketBinding {
- public static final ServiceName JBOSS_BINDING_NAME = ServiceName.JBOSS.append("binding");
-
- private final String name;
- private int port;
- private boolean isFixedPort;
- private InetAddress multicastAddress;
- private int multicastPort;
- private final NetworkInterfaceBinding networkInterface;
- private final SocketBindingManager socketBindings;
-
- SocketBinding(final String name, int port, boolean isFixedPort,
- InetAddress multicastAddress, int multicastPort,
- final NetworkInterfaceBinding networkInterface, SocketBindingManager socketBindings) {
- this.name = name;
- this.port = port;
- this.isFixedPort = isFixedPort;
- this.multicastAddress = multicastAddress;
- this.multicastPort = multicastPort;
- this.socketBindings = socketBindings;
- this.networkInterface = networkInterface;
- }
+ public static final ServiceName JBOSS_BINDING_NAME = ServiceName.JBOSS.append("binding");
+
+ private final String name;
+ private int port;
+ private boolean isFixedPort;
+ private InetAddress multicastAddress;
+ private int multicastPort;
+ private final NetworkInterfaceBinding networkInterface;
+ private final SocketBindingManager socketBindings;
+
+ SocketBinding(final String name, int port, boolean isFixedPort,
+ InetAddress multicastAddress, int multicastPort,
+ final NetworkInterfaceBinding networkInterface, SocketBindingManager socketBindings) {
+ this.name = name;
+ this.port = port;
+ this.isFixedPort = isFixedPort;
+ this.multicastAddress = multicastAddress;
+ this.multicastPort = multicastPort;
+ this.socketBindings = socketBindings;
+ this.networkInterface = networkInterface;
+ }
/**
* Return the name of the SocketBinding used in the configuration
- *
* @return the SocketBinding configuration name
*/
public String getName() {
return name;
}
- /**
- * Get the socket binding manager.
- *
- * @return the socket binding manger
- */
- public SocketBindingManager getSocketBindings() {
- return socketBindings;
- }
-
- /**
- * Get the socket address.
- *
- * @return the socket address
- */
- public InetSocketAddress getSocketAddress() {
- int port = this.port;
- if (port > 0 && isFixedPort == false) {
- port += socketBindings.getPortOffset();
- }
- return new InetSocketAddress(networkInterface.getAddress(), port);
- }
-
- /**
- * Get the multicast socket address.
- *
- * @return
- */
- public InetSocketAddress getMulticastSocketAddress() {
- if (multicastAddress == null) {
- throw new IllegalStateException("no multicast binding: " + name);
- }
- return new InetSocketAddress(multicastAddress, multicastPort);
- }
-
- /**
- * Create and bind a socket.
- *
- * @return the socket
- * @throws IOException
- */
- public Socket createSocket() throws IOException {
- final Socket socket = getSocketFactory().createSocket();
- socket.bind(getSocketAddress());
- return socket;
- }
-
- /**
- * Create and bind a server socket
- *
- * @return the server socket
- * @throws IOException
- */
- public ServerSocket createServerSocket() throws IOException {
- final ServerSocket socket = getServerSocketFactory().createServerSocket();
- socket.bind(getSocketAddress());
- return socket;
- }
-
- /**
- * Create and bind a server socket.
- *
- * @param backlog the backlog
- * @return the server socket
- * @throws IOException
- */
- public ServerSocket createServerSocket(int backlog) throws IOException {
- final ServerSocket socket = getServerSocketFactory().createServerSocket();
- socket.bind(getSocketAddress(), backlog);
- return socket;
- }
-
- /**
- * Create and bind a datagrap socket.
- *
- * @return the datagram socket
- * @throws SocketException
- */
- public DatagramSocket createDatagramSocket() throws SocketException {
- return new ManagedDatagramSocketBinding(socketBindings, getSocketAddress());
- }
-
- /**
- * Create and bind a multicast socket. This will also join the given multicast address.
- *
- * @return the multicast socket
- * @throws IOException
- */
- public MulticastSocket createMulticastSocket() throws IOException {
- final MulticastSocket socket = new ManagedMulticastSocketBinding(socketBindings, getSocketAddress());
- socket.joinGroup(getMulticastSocketAddress(), networkInterface.getNetworkInterface());
- return socket;
- }
-
- SocketFactory getSocketFactory() {
- return socketBindings.getSocketFactory();
- }
-
- ServerSocketFactory getServerSocketFactory() {
- return socketBindings.getServerSocketFactory();
- }
+ /**
+ * Get the socket binding manager.
+ *
+ * @return the socket binding manger
+ */
+ public SocketBindingManager getSocketBindings() {
+ return socketBindings;
+ }
+
+ /**
+ * Get the socket address.
+ *
+ * @return the socket address
+ */
+ public InetSocketAddress getSocketAddress() {
+ int port = this.port;
+ if(port > 0 && isFixedPort == false) {
+ port += socketBindings.getPortOffset();
+ }
+ return new InetSocketAddress(networkInterface.getAddress(), port);
+ }
+
+ /**
+ * Get the multicast socket address.
+ *
+ * @return
+ */
+ public InetSocketAddress getMulticastSocketAddress() {
+ if(multicastAddress == null) {
+ throw new IllegalStateException("no multicast binding: " + name);
+ }
+ return new InetSocketAddress(multicastAddress, multicastPort);
+ }
+
+ /**
+ * Create and bind a socket.
+ *
+ * @return the socket
+ * @throws IOException
+ */
+ public Socket createSocket() throws IOException {
+ final Socket socket = getSocketFactory().createSocket();
+ socket.bind(getSocketAddress());
+ return socket;
+ }
+
+ /**
+ * Create and bind a server socket
+ *
+ * @return the server socket
+ * @throws IOException
+ */
+ public ServerSocket createServerSocket() throws IOException {
+ final ServerSocket socket = getServerSocketFactory().createServerSocket();
+ socket.bind(getSocketAddress());
+ return socket;
+ }
+
+ /**
+ * Create and bind a server socket.
+ *
+ * @param backlog the backlog
+ * @return the server socket
+ * @throws IOException
+ */
+ public ServerSocket createServerSocket(int backlog) throws IOException {
+ final ServerSocket socket = getServerSocketFactory().createServerSocket();
+ socket.bind(getSocketAddress(), backlog);
+ return socket;
+ }
+
+ /**
+ * Create and bind a datagrap socket.
+ *
+ * @return the datagram socket
+ * @throws SocketException
+ */
+ public DatagramSocket createDatagramSocket() throws SocketException {
+ return new ManagedDatagramSocketBinding(socketBindings, getSocketAddress());
+ }
+
+ /**
+ * Create and bind a multicast socket. This will also join the given
+ * multicast address.
+ *
+ * @return the multicast socket
+ * @throws IOException
+ */
+ public MulticastSocket createMulticastSocket() throws IOException {
+ final MulticastSocket socket = new ManagedMulticastSocketBinding(socketBindings, getSocketAddress());
+ socket.joinGroup(getMulticastSocketAddress(), networkInterface.getNetworkInterface());
+ return socket;
+ }
+
+ SocketFactory getSocketFactory() {
+ return socketBindings.getSocketFactory();
+ }
+
+ ServerSocketFactory getServerSocketFactory() {
+ return socketBindings.getServerSocketFactory();
+ }
}
@@ -25,7 +25,7 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:jboss:domain:1.0"
targetNamespace="urn:jboss:domain:1.0"
- elementFormDefault="unqualified"
+ elementFormDefault="qualified"
attributeFormDefault="unqualified"
>
View
@@ -1 +0,0 @@
-*.java ident
@@ -1,6 +1,5 @@
package org.jboss.as.messaging;
-import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.ConnectorServiceConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -16,7 +15,6 @@
import javax.xml.stream.XMLStreamException;
import java.util.Collection;
import java.util.List;
-import java.util.Set;
/**
* @author scott.stark@jboss.org
@@ -26,36 +24,21 @@
private static final long serialVersionUID = 1L;
private static final Logger log = Logger.getLogger("org.jboss.as.messaging");
+ Configuration config = new ConfigurationImpl();
+
+
public AcceptorsElement(final Location location) {
super(location);
}
- public AcceptorsElement(final XMLExtendedStreamReader reader, Configuration config) throws XMLStreamException {
+ public AcceptorsElement(final XMLExtendedStreamReader reader) throws XMLStreamException {
super(reader);
- System.out.println("Begin " + reader.getLocation() + reader.getLocalName());
- // Handle elements
- int tag = reader.getEventType();
- String localName = null;
- do {
- tag = reader.nextTag();
- localName = reader.getLocalName();
- final org.jboss.as.messaging.Element element = org.jboss.as.messaging.Element.forName(reader.getLocalName());
- /*
- <acceptor name="netty">
- <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
- <param key="host" value="${jboss.bind.address:localhost}"/>
- <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
- </acceptor>
- */
- switch (element) {
- case ACCEPTOR:
- String name = reader.getAttributeValue(0);
- TransportConfiguration acceptorConfig = ElementUtils.parseTransportConfiguration(reader, name, Element.ACCEPTOR);
- config.getAcceptorConfigurations().add(acceptorConfig);
- break;
- }
- } while (reader.hasNext() && localName.equals(Element.ACCEPTOR.getLocalName()));
+ System.out.println("Begin "+reader.getLocation()+reader.getLocalName());
+ reader.discardRemainder();
+ }
+ public List<ConnectorServiceConfiguration> getConnectorServiceConfigurations() {
+ return null; //To change body of created methods use File | Settings | File Templates.
}
@Override
@@ -82,5 +65,4 @@ public void writeContent(XMLExtendedStreamWriter streamWriter) throws XMLStreamE
public void activate(ServiceActivatorContext serviceActivatorContext) {
//To change body of implemented methods use File | Settings | File Templates.
}
-
}
Oops, something went wrong.

0 comments on commit 18ce941

Please sign in to comment.