-
1. Re: Port Listener integrated with JBoss
poojac20 Aug 31, 2004 5:02 AM (in response to poojac20)Hello
While searching for how to write a service in jboss, I have more questions.
http://www.huihoo.com/jboss/online_manual/3.0/ch13s26.html
This Page seems to give a lot of information but none for simple services.
"MBeans that are independent of JBoss services are the trival case and can be written per the JMX specification and added to a JBoss server by adding their MLET tag to the jboss.conf file." My Questions:
1. Isn't jboss.conf read just once at server start up?
2. If I add something to jboss.conf, won't it require the service class to be in classpath at that time? So, is it necessary for services to be libs?
3. How will I be able to hot deploy/redeploy the service?
4. just one stupid question .. I cant find jboss.jcml?
Does someone have any step-by-step guide to writing a "trivial" custom service in jboss? Please forward ne pointers.
Thanks in advance
--- Pooja. -
2. Re: Port Listener integrated with JBoss
dimitris Sep 13, 2004 2:33 PM (in response to poojac20)Writing an MBean service would do. You'll have to manage your threads.
Have a look at the second chapter of the free JBoss documentation:
http://docs.jboss.org/admin-devel/AdminDevelTOC.html
(you may have to register first).
The jboss.jcml file refers to older jboss versions 2.x, so it is not current anymore.
Regards
/Dimitris -
3. Re: Port Listener integrated with JBoss
nfuentes Sep 17, 2004 8:13 PM (in response to poojac20)So, where does the service config goes if it's not the jboss.jcml?
-
4. Re: Port Listener integrated with JBoss
starksm64 Sep 17, 2004 9:39 PM (in response to poojac20)The server/default/conf/jboss-service.xml file is the equivalent of the legacy jboss.jcml file.
-
5. Re: Port Listener integrated with JBoss
nfuentes Sep 20, 2004 1:39 PM (in response to poojac20)"poojac20" wrote:
Hello
I intend to write a port listener (Which will listen on lets say 7001) . The incoming data does not follow any protocol, its just a stream of bytes. After analyzing the bytes I need to call EJBs etc.
I can write this listener as an independent daemon and call EJBs on RMI. But I want it to be integerated with JBoss so i can use its infra.
After a lot of research on how to write such a servlet, I gave up. (my data is coming from NAC and only server IP and port can be configured there, not url text) It seems, the best approach wud be to copy the way WebService/NamingService etc work? Packaged as MBean and listening to another port. Is this line of thinking correct?
I had a look at org.jboss.web.WebService code, If I go with this decision, I'll be following its way of functioning/Coding. Again, is this line of thinking correct?
2 specific questions
1. It IS possible to write a custom service to listen on a port integratedw with JBoss? Right?
2. The Thread Management - Will I have to do it? Or can I use container Thread?
I'll appreciate any pointers.
Thank You
--- Pooja.
Where are you in implementing your port listener using MBeans? I'm basically trying to do the same. Still struggling with using MBeans since there is no mention of the service actually running when JBoss starts up. I've done startup classes in Weblogic but cannot get definite way to do it in JBoss.
Thanks,
NF -
6. Re: Port Listener integrated with JBoss
genman Sep 21, 2004 1:26 AM (in response to poojac20)
There are many examples on how to create a service:
http://www.jboss.org/wiki/Wiki.jsp?page=ExampleHelloWorldService
You should try to deploy the example and then extend it as needed.