Skip to content

Commit 18ce941

Browse files
committed
Revert "Save current work"
This reverts commit b0303dc33e6d62052f8dddbbe1958e82a17b5533.
1 parent 78a9e0a commit 18ce941

File tree

19 files changed

+295
-2720
lines changed

19 files changed

+295
-2720
lines changed

build/src/main/resources/modules/org/hornetq/main/module.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
2323
-->
2424

25-
<module xmlns="urn:jboss:module:1.0" name="org.hornetq">
25+
<module xmlns="urn:jboss:module:1.0" name="org.jboss.messaging">
2626
<resources>
2727
<!-- Insert resources here -->
2828
</resources>
2929

3030
<dependencies>
31-
<module name="javax.jms.api" />
3231
<module name="org.hornetq"/>
32+
<module name="javax.jms
3333
</dependencies>
3434
</module>

build/src/main/resources/modules/org/jboss/as/messaging/main/module.xml

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@
2222
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
2323
-->
2424

25-
<module xmlns="urn:jboss:module:1.0" name="org.jboss.as.messaging">
25+
<module xmlns="urn:jboss:module:1.0" name="org.jboss.as.transactions">
2626

2727
<resources>
2828
<!-- Insert resources here -->
2929
</resources>
3030

3131
<dependencies>
32+
<module name="javax.transaction.api"/>
3233
<module name="org.jboss.staxmapper"/>
3334
<module name="org.jboss.as.domain"/>
35+
<module name="org.jboss.integration.jboss-transaction-spi"/>
3436
<module name="org.jboss.msc"/>
3537
<module name="org.jboss.logging"/>
36-
<module name="org.hornetq"/>
38+
<module name="org.jboss.jts"/>
39+
<module name="org.jboss.jts.integration"/>
3740
<module name="system"/>
3841
</dependencies>
3942
</module>

domain/src/main/java/org/jboss/as/services/net/SocketBinding.java

+122-122
Original file line numberDiff line numberDiff line change
@@ -43,136 +43,136 @@
4343
*/
4444
public class SocketBinding {
4545

46-
public static final ServiceName JBOSS_BINDING_NAME = ServiceName.JBOSS.append("binding");
47-
48-
private final String name;
49-
private int port;
50-
private boolean isFixedPort;
51-
private InetAddress multicastAddress;
52-
private int multicastPort;
53-
private final NetworkInterfaceBinding networkInterface;
54-
private final SocketBindingManager socketBindings;
55-
56-
SocketBinding(final String name, int port, boolean isFixedPort,
57-
InetAddress multicastAddress, int multicastPort,
58-
final NetworkInterfaceBinding networkInterface, SocketBindingManager socketBindings) {
59-
this.name = name;
60-
this.port = port;
61-
this.isFixedPort = isFixedPort;
62-
this.multicastAddress = multicastAddress;
63-
this.multicastPort = multicastPort;
64-
this.socketBindings = socketBindings;
65-
this.networkInterface = networkInterface;
66-
}
46+
public static final ServiceName JBOSS_BINDING_NAME = ServiceName.JBOSS.append("binding");
47+
48+
private final String name;
49+
private int port;
50+
private boolean isFixedPort;
51+
private InetAddress multicastAddress;
52+
private int multicastPort;
53+
private final NetworkInterfaceBinding networkInterface;
54+
private final SocketBindingManager socketBindings;
55+
56+
SocketBinding(final String name, int port, boolean isFixedPort,
57+
InetAddress multicastAddress, int multicastPort,
58+
final NetworkInterfaceBinding networkInterface, SocketBindingManager socketBindings) {
59+
this.name = name;
60+
this.port = port;
61+
this.isFixedPort = isFixedPort;
62+
this.multicastAddress = multicastAddress;
63+
this.multicastPort = multicastPort;
64+
this.socketBindings = socketBindings;
65+
this.networkInterface = networkInterface;
66+
}
6767

6868
/**
6969
* Return the name of the SocketBinding used in the configuration
70-
*
7170
* @return the SocketBinding configuration name
7271
*/
7372
public String getName() {
7473
return name;
7574
}
7675

77-
/**
78-
* Get the socket binding manager.
79-
*
80-
* @return the socket binding manger
81-
*/
82-
public SocketBindingManager getSocketBindings() {
83-
return socketBindings;
84-
}
85-
86-
/**
87-
* Get the socket address.
88-
*
89-
* @return the socket address
90-
*/
91-
public InetSocketAddress getSocketAddress() {
92-
int port = this.port;
93-
if (port > 0 && isFixedPort == false) {
94-
port += socketBindings.getPortOffset();
95-
}
96-
return new InetSocketAddress(networkInterface.getAddress(), port);
97-
}
98-
99-
/**
100-
* Get the multicast socket address.
101-
*
102-
* @return
103-
*/
104-
public InetSocketAddress getMulticastSocketAddress() {
105-
if (multicastAddress == null) {
106-
throw new IllegalStateException("no multicast binding: " + name);
107-
}
108-
return new InetSocketAddress(multicastAddress, multicastPort);
109-
}
110-
111-
/**
112-
* Create and bind a socket.
113-
*
114-
* @return the socket
115-
* @throws IOException
116-
*/
117-
public Socket createSocket() throws IOException {
118-
final Socket socket = getSocketFactory().createSocket();
119-
socket.bind(getSocketAddress());
120-
return socket;
121-
}
122-
123-
/**
124-
* Create and bind a server socket
125-
*
126-
* @return the server socket
127-
* @throws IOException
128-
*/
129-
public ServerSocket createServerSocket() throws IOException {
130-
final ServerSocket socket = getServerSocketFactory().createServerSocket();
131-
socket.bind(getSocketAddress());
132-
return socket;
133-
}
134-
135-
/**
136-
* Create and bind a server socket.
137-
*
138-
* @param backlog the backlog
139-
* @return the server socket
140-
* @throws IOException
141-
*/
142-
public ServerSocket createServerSocket(int backlog) throws IOException {
143-
final ServerSocket socket = getServerSocketFactory().createServerSocket();
144-
socket.bind(getSocketAddress(), backlog);
145-
return socket;
146-
}
147-
148-
/**
149-
* Create and bind a datagrap socket.
150-
*
151-
* @return the datagram socket
152-
* @throws SocketException
153-
*/
154-
public DatagramSocket createDatagramSocket() throws SocketException {
155-
return new ManagedDatagramSocketBinding(socketBindings, getSocketAddress());
156-
}
157-
158-
/**
159-
* Create and bind a multicast socket. This will also join the given multicast address.
160-
*
161-
* @return the multicast socket
162-
* @throws IOException
163-
*/
164-
public MulticastSocket createMulticastSocket() throws IOException {
165-
final MulticastSocket socket = new ManagedMulticastSocketBinding(socketBindings, getSocketAddress());
166-
socket.joinGroup(getMulticastSocketAddress(), networkInterface.getNetworkInterface());
167-
return socket;
168-
}
169-
170-
SocketFactory getSocketFactory() {
171-
return socketBindings.getSocketFactory();
172-
}
173-
174-
ServerSocketFactory getServerSocketFactory() {
175-
return socketBindings.getServerSocketFactory();
176-
}
76+
/**
77+
* Get the socket binding manager.
78+
*
79+
* @return the socket binding manger
80+
*/
81+
public SocketBindingManager getSocketBindings() {
82+
return socketBindings;
83+
}
84+
85+
/**
86+
* Get the socket address.
87+
*
88+
* @return the socket address
89+
*/
90+
public InetSocketAddress getSocketAddress() {
91+
int port = this.port;
92+
if(port > 0 && isFixedPort == false) {
93+
port += socketBindings.getPortOffset();
94+
}
95+
return new InetSocketAddress(networkInterface.getAddress(), port);
96+
}
97+
98+
/**
99+
* Get the multicast socket address.
100+
*
101+
* @return
102+
*/
103+
public InetSocketAddress getMulticastSocketAddress() {
104+
if(multicastAddress == null) {
105+
throw new IllegalStateException("no multicast binding: " + name);
106+
}
107+
return new InetSocketAddress(multicastAddress, multicastPort);
108+
}
109+
110+
/**
111+
* Create and bind a socket.
112+
*
113+
* @return the socket
114+
* @throws IOException
115+
*/
116+
public Socket createSocket() throws IOException {
117+
final Socket socket = getSocketFactory().createSocket();
118+
socket.bind(getSocketAddress());
119+
return socket;
120+
}
121+
122+
/**
123+
* Create and bind a server socket
124+
*
125+
* @return the server socket
126+
* @throws IOException
127+
*/
128+
public ServerSocket createServerSocket() throws IOException {
129+
final ServerSocket socket = getServerSocketFactory().createServerSocket();
130+
socket.bind(getSocketAddress());
131+
return socket;
132+
}
133+
134+
/**
135+
* Create and bind a server socket.
136+
*
137+
* @param backlog the backlog
138+
* @return the server socket
139+
* @throws IOException
140+
*/
141+
public ServerSocket createServerSocket(int backlog) throws IOException {
142+
final ServerSocket socket = getServerSocketFactory().createServerSocket();
143+
socket.bind(getSocketAddress(), backlog);
144+
return socket;
145+
}
146+
147+
/**
148+
* Create and bind a datagrap socket.
149+
*
150+
* @return the datagram socket
151+
* @throws SocketException
152+
*/
153+
public DatagramSocket createDatagramSocket() throws SocketException {
154+
return new ManagedDatagramSocketBinding(socketBindings, getSocketAddress());
155+
}
156+
157+
/**
158+
* Create and bind a multicast socket. This will also join the given
159+
* multicast address.
160+
*
161+
* @return the multicast socket
162+
* @throws IOException
163+
*/
164+
public MulticastSocket createMulticastSocket() throws IOException {
165+
final MulticastSocket socket = new ManagedMulticastSocketBinding(socketBindings, getSocketAddress());
166+
socket.joinGroup(getMulticastSocketAddress(), networkInterface.getNetworkInterface());
167+
return socket;
168+
}
169+
170+
SocketFactory getSocketFactory() {
171+
return socketBindings.getSocketFactory();
172+
}
173+
174+
ServerSocketFactory getServerSocketFactory() {
175+
return socketBindings.getServerSocketFactory();
176+
}
177177

178178
}

domain/src/main/resources/schema/jboss_7_0.xsd

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
2626
xmlns="urn:jboss:domain:1.0"
2727
targetNamespace="urn:jboss:domain:1.0"
28-
elementFormDefault="unqualified"
28+
elementFormDefault="qualified"
2929
attributeFormDefault="unqualified"
3030
>
3131

messaging/.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
*.java ident

messaging/src/main/java/org/jboss/as/messaging/AcceptorsElement.java

+9-27
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.jboss.as.messaging;
22

3-
import org.hornetq.api.core.TransportConfiguration;
43
import org.hornetq.core.config.Configuration;
54
import org.hornetq.core.config.ConnectorServiceConfiguration;
65
import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -16,7 +15,6 @@
1615
import javax.xml.stream.XMLStreamException;
1716
import java.util.Collection;
1817
import java.util.List;
19-
import java.util.Set;
2018

2119
/**
2220
@@ -26,36 +24,21 @@ public class AcceptorsElement extends AbstractModelElement<AcceptorsElement> imp
2624
private static final long serialVersionUID = 1L;
2725
private static final Logger log = Logger.getLogger("org.jboss.as.messaging");
2826

27+
Configuration config = new ConfigurationImpl();
28+
29+
2930
public AcceptorsElement(final Location location) {
3031
super(location);
3132
}
3233

33-
public AcceptorsElement(final XMLExtendedStreamReader reader, Configuration config) throws XMLStreamException {
34+
public AcceptorsElement(final XMLExtendedStreamReader reader) throws XMLStreamException {
3435
super(reader);
35-
System.out.println("Begin " + reader.getLocation() + reader.getLocalName());
36-
// Handle elements
37-
int tag = reader.getEventType();
38-
String localName = null;
39-
do {
40-
tag = reader.nextTag();
41-
localName = reader.getLocalName();
42-
final org.jboss.as.messaging.Element element = org.jboss.as.messaging.Element.forName(reader.getLocalName());
43-
/*
44-
<acceptor name="netty">
45-
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
46-
<param key="host" value="${jboss.bind.address:localhost}"/>
47-
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
48-
</acceptor>
49-
*/
50-
switch (element) {
51-
case ACCEPTOR:
52-
String name = reader.getAttributeValue(0);
53-
TransportConfiguration acceptorConfig = ElementUtils.parseTransportConfiguration(reader, name, Element.ACCEPTOR);
54-
config.getAcceptorConfigurations().add(acceptorConfig);
55-
break;
56-
}
57-
} while (reader.hasNext() && localName.equals(Element.ACCEPTOR.getLocalName()));
36+
System.out.println("Begin "+reader.getLocation()+reader.getLocalName());
37+
reader.discardRemainder();
38+
}
5839

40+
public List<ConnectorServiceConfiguration> getConnectorServiceConfigurations() {
41+
return null; //To change body of created methods use File | Settings | File Templates.
5942
}
6043

6144
@Override
@@ -82,5 +65,4 @@ public void writeContent(XMLExtendedStreamWriter streamWriter) throws XMLStreamE
8265
public void activate(ServiceActivatorContext serviceActivatorContext) {
8366
//To change body of implemented methods use File | Settings | File Templates.
8467
}
85-
8668
}

0 commit comments

Comments
 (0)