-
1. Re: How to unregister a ServerInvoker?
tom.elrod Aug 21, 2006 11:21 AM (in response to cnbs)Just as a simple tests, I deployed a remoting-service.xml file in the deploy directory for JBossAS 4.0.4 and would then change some of the attribute values (i.e. backlog to 205). This worked without any problems. Contentes of remoting-service.xml pasted below.
Can you post the service.xml you are using (or what ever you are using) or create a jira issue and put in how to duplicate what you are doing?
Thanks.
-Tom<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server> <server> <classpath codebase="lib" archives="*"/> <mbean code="org.jboss.remoting.network.NetworkRegistry" name="jboss.remoting:service=NetworkRegistry"/> <mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=Connector,transport=Socket" display-name="Socket transport Connector"> <attribute name="Configuration"> <config> <invoker transport="socket"> <attribute name="numAcceptThreads">1</attribute> <attribute name="maxPoolSize">303</attribute> <attribute name="clientMaxPoolSize" isParam="true">305</attribute> <attribute name="socketTimeout">60000</attribute> <attribute name="serverBindAddress">${jboss.bind.address}</attribute> <attribute name="serverBindPort">6666</attribute> <attribute name="enableTcpNoDelay" isParam="false">false</attribute> <attribute name="backlog">203</attribute> </invoker> <handlers> <handler subsystem="mock">org.jboss.remoting.samples.http.WebInvocationHandler</handler> </handlers> </config> </attribute> </mbean> </server>
-
2. Re: How to unregister a ServerInvoker?
cnbs Aug 22, 2006 3:13 AM (in response to cnbs)Thank you Tom.
I have not used any remoting-service.xml, and my code looks like this:locatorURI = "rmi://localhost:3550"; public void startServer() { try { InvokerLocator locator = new InvokerLocator(locatorURI); Connector connector = new Connector(locator); connector.create(); connector.addInvocationHandler("ASubSystem", this); log.debug("Starting remoting server with locator uri : " + locatorURI); connector.start(); log.debug("Remoting server started with locator uri : " + locatorURI); } catch (MalformedURLException e) { log.error("Server start failed :" + e.getMessage()); } catch (Exception e) { e.printStackTrace(); } }
As you can see there is no configuration. I have to restart JbossAP every time i redeploy my app. -
3. Re: How to unregister a ServerInvoker?
cnbs Aug 22, 2006 8:32 AM (in response to cnbs)i mean JBossAS :)
-
4. Re: How to unregister a ServerInvoker?
tom.elrod Aug 22, 2006 1:20 PM (in response to cnbs)Since are creating the Connector via code, will also need to call stop() and destroy() on Connector when done using it (i.e. have a stopServer() method to do this that gets called when your app is undeployed).
-
5. Re: How to unregister a ServerInvoker?
cnbs Aug 23, 2006 7:02 AM (in response to cnbs)Sorry for a stupid question but how can i do this:
"tom.elrod@jboss.com" wrote:
... that gets called when your app is undeployed... -
6. Re: How to unregister a ServerInvoker?
tom.elrod Aug 23, 2006 9:12 AM (in response to cnbs)Will depend on type of application being deployed. May have to deploy the remoting server as an service mbean and have your other class look it up when being deployed.
Can find more info at http://wiki.jboss.org/wiki/Wiki.jsp?page=DeploymentService. -
7. Re: How to unregister a ServerInvoker?
cnbs Aug 23, 2006 9:32 AM (in response to cnbs)"tom.elrod@jboss.com" wrote:
Will depend on type of application being deployed. May have to deploy the remoting server as an service mbean and have your other class look it up when being deployed.
Can find more info at http://wiki.jboss.org/wiki/Wiki.jsp?page=DeploymentService.
Why is it so complicated? Why not just let the application know when it is undeployed? There got to be a simpler way to do this.
Anyway. Thank you :)