Hi,

With little tweak I've been able to successfully run Merlin as a Jboss service 
(in fact OpenIM running as JBoss applicaiton).

Here is the stuff (it is experimental so stay cool)

1/ Define a MerlinMBean (in kernel/bootstrap) interface defining classical 
JBoss required method

    public void start() throws Exception;
    public void stop() throws Exception;
    public void destroy();

and custom method

    public void setHomePath( String home );
    public String getHomePath();

    public void setConfigFile( String configFile );
    public String getConfigFile();

    public void setTargetFile( String targetFile );
    public String getTargetFile();


2/ Implement MerlinMBean in Merlin
and call the main() method in start() rebuilding a String[] args from 
home/configFile/targetFile


3/ Adjust in Merlin.java the apiClassloader to use current classload as parent

ClassLoader apiLoader = new URLClassLoader( api,  classloader);

(required as there is class conflict with the repository class provided in 
bootstrap and repository provided by merlin/repository


4/ setup JBoss server/---/deploy/merlin-service.xml file

<server>
  <mbean code="Merlin" name="jboss:service=Merlin">
    <attribute name="homePath">/home/Al/openim/</attribute>
    <attribute name="configFile">/home/Al/openim/conf/config.xml</attribute>
    <attribute 
name="targetFile">/home/Al/.maven/repository/openim/jars/openim-server-impl-1.1.1.jar</attribute>
  </mbean>
</server>

5/ copy $MERLIN_HOME/bin/lib/merlin-bootstrap-1.0.jar in server/---/lib/

Now you can lauch jboss and have fun

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to