[jboss-user] [Microcontainer] - Re: Web Bean Discovery

pete.muir@jboss.org do-not-reply at jboss.com
Mon Nov 17 06:24:40 EST 2008


Here's the updated SPI based on Gavin's clarification and Adrian's suggestion:

/**
  |  * A container should implement this interface to allow the Web Beans RI to
  |  * discover the Web Beans to deploy
  |  * 
  |  * @author Pete Muir
  |  *
  |  */
  | public interface WebBeanDiscovery
  | {
  |    /**
  |     * @return A list of all classes in classpath archives with web-beans.xml files
  |     */
  |    public Iterable<Class<?>> discoverWebBeanClasses();
  |    
  |    /**
  |     * @return A list of all web-beans.xml files in the app classpath 
  |     */
  |    public Iterable<URL> discoverWebBeansXml();
  |    
  |    /**
  |     * @return A Map of EJB descriptors, keyed by the EJB bean class
  |     */
  |    public Map<Class<?>, EjbDescriptor<?>> discoverEjbs();
  |    
  | }

public interface EjbDescriptor<T>
  | {
  |    /**
  |     * @return The EJB Bean class
  |     */
  |    public Class<T> getType();
  | 
  |    /**
  |     * @return The JNDI name under which the EJB is registered
  |     */
  |    public String getJndiName();
  | 
  |    /**
  |     * @return The local interfaces of the EJB 
  |     */
  |    public Iterator<Class<?>> getLocalInterfaces();
  | 
  |    /**
  |     * @return The remove methods of the EJB
  |     */
  |    public Iterator<Method> getRemoveMethods();
  |    
  | }

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189766



More information about the jboss-user mailing list