Friday, February 11, 2011

Issues on Jboss ear file creation


While creating ear file as specified in my earlier blog post faced below issues. Believe it could help someone to save some time.


1. Tried creating a service by writing a class then extends ServiceMBeanSupport and implementing methods like createService(), startService(), stopService(). But on deployment it throwed JMXNotComplaintException. What you need to do is you have to write an Interface (either with some method you would like to expose through JMX or empty interface). And the important point here to note is that interface's name should end with MBean otherwise jboss complains the above. Funny thing but many users faced the same.

2. Creating default users for jboss. Its straight forward as I used default form based authentication. Edited /server/default/conf/login-config.xml and changed users properties and roles properties file for web-console policy.

3. Loading an xml file from the ear file.

My ear has the below directory structure for a xml file. If you would like to bundle an xml file in the ear, then have it under <WEB-INF>/classes directory.

No comments:

Post a Comment