aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to deploy standalone java Api in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to deploy standalone java Api in JBoss" Watch "How to deploy standalone java Api in JBoss" New topic
Author

How to deploy standalone java Api in JBoss

Maurice Tambouradj
Greenhorn

Joined: Jun 10, 2012
Posts: 1
Hi,

I have a standalone java project which is basically a Snmp trap listener. this application will keep listening in a port. currently this app will be started by calling main method.
how to deploy this project in Jboss. whenever jboss server is started this application should also started and keep listening in a port.

please advice me what should i do for this.


Thanks in advance,
Maurice
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Sounds like you want to convert this app into a service. Exactly how to do this depends on the version of Boss AS. For 6.x and earlier you would convert it into an MBean. Not sure what the corresponding thing would be in 7.x.


JBoss In Action
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10096
    
164

Peter Johnson wrote:Not sure what the corresponding thing would be in 7.x.

AS 7.x supports MBeans too although the xsd for -service.xml files has changed slightly (some advanced features have been removed and no longer supported).

[My Blog] [JavaRanch Journal]
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
In EE6 you'll want to look at @Startup and @Singleton but remember that


Why can an enterprise bean not listen to or accept connections on a socket?
Because if an enterprise bean is listening on a socket, it can't be passivated -- it must always be available. Enterprise beans can be network socket clients, and so they can use other network resources (including other enterprise bean servers) to do their jobs. Just as with a database connection, don't hang on to open client sockets across method calls; instead, open them, communicate through the socket, and close it before returning from the method.
from http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html

Of course you could use container specific strategies to turn off passivation and probably get it to work but the question here is what is the motivation for deploying this into an EJB container?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to deploy standalone java Api in JBoss