-
1. Re: can i use my service to process the requerst from the <socket-binding-group> ?
jaikiran Sep 6, 2012 4:54 AM (in response to sh1theng)I'm not sure what the question is. Can you explain a bit, please?
-
2. Re: can i use my service to process the requerst from the <socket-binding-group> ?
sh1theng Sep 6, 2012 5:29 AM (in response to jaikiran)can i set a port 9002 in <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="myport" port="9002"/>
...
<socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>and then use my own service to listen on "myport" like the jms subsystem listen on port 5445
i think jboss is already in an "nio" way when it's service listen on the port group.
i want to built a socket server use jboss own nio.
-
3. Re: can i use my service to process the requerst from the <socket-binding-group> ?
ctomc Sep 6, 2012 5:32 AM (in response to sh1theng)Hi,
yes it is absolutly possible to do that
but! you would need to be in a subsystem not in user deployment.
you can create extension by folowing this documentation https://docs.jboss.org/author/display/AS71/Extending+JBoss+AS+7
and then when you have your own Service you can inject socketBinding into it something like this:
final ServiceBuilder<Connector> serviceBuilder = context.getServiceTarget().addService(WebSubsystemServices.JBOSS_WEB_CONNECTOR.append(name), service)
.addDependency(SocketBinding.JBOSS_BINDING_NAME.append(bindingRef), SocketBinding.class, service.getBinding());
where bindingRef is name of socket-binding you have in standalone.xml
hope this helps.
--
tomaz
-
4. Re: can i use my service to process the requerst from the <socket-binding-group> ?
sh1theng Sep 6, 2012 5:42 AM (in response to ctomc)yes,that's what i need.
but , i must learn how to write a subsystem first
in particular, the key code connect my handle to the socketBinding.
thx.