[jboss-user] [JBoss Microcontainer Users] - Re: Confused about POJO service

2009-10-09 Thread alesj
"karypid" wrote : 
  | When can you use a different filename? 
  | 
It depends on the BeanDeployer:
 - 
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanDeployer.java

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259568#4259568

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259568
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Microcontainer Users] - Re: Confused about POJO service

2009-10-08 Thread karypid
Ok, I got it. The deployment descriptor filename must be "jboss-beans.xml" 
otherwise the jar is ignored.

BTW, this is an opportunity to document in the forum the naming issue: When can 
you use a different filename? You mentioned it in your reply and I've also seen 
it in various articles (e.g. the DZone article).

Thanks for your help.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259347#4259347

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259347
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Microcontainer Users] - Re: Confused about POJO service

2009-10-08 Thread karypid
Would that be packaged in a JAR for JBoss to pick it up?

My current test (which does not get activated) is a JAR with one class and one 
interface (the interface defines the start/stop methods) as follows:

public class MyServiceImpl implements MyService {
  | private Logger logger;
  | 
  | public void start() {
  | logger = LoggerFactory.getLogger(MyServiceImpl.class);
  | logger.info("has been started");
  | }
  | 
  | public void stop() {
  | logger.info("has been shut down");
  | logger = null;
  | }
  | }

It contains a META-INF/my-service-beans.xml as follows:

  | 
  | 
  | 

I drop it into the deploy folder (archived, not exploded) but nothing happens.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259343#4259343

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259343
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Microcontainer Users] - Re: Confused about POJO service

2009-10-08 Thread alesj
Simply create a POJO - drop the MBean stuff - and place it any 
META-INF/somename-jboss-beans.xml.
See JBoss5 config files on how MC's schema looks like.

MC tries to execute create/start/stop/destroy parameterless methods on the bean 
by default if they exist.
So, just keep the start() and stop() and you're fine.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259329#4259329

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259329
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user