JFox(J2EE Application Server Implementation Project)

Last Modified: 2003.12.03

Customization of EJBMeta


Users can customize the definition of EJBMetaInfo by referencing Class org.jfox.ejb.examples.meta.HelloMeta, The implementation code of getEJBMetaInfo() method is as below:


     public EJBMetaInfo getEJBMetaInfo() {
      // user defined Stateless SessionBean
       return EJBMetaHelper. createEJBMeta (
"EJB Hello with custom meta info",       //description
                        "Hello",                            // ejb name
"org.jfox.ejb.examples.meta.HelloHome", // Home class
                        "org.jfox.ejb.examples.meta.Hello",      // Remote class
                        "org.jfox.ejb.examples.meta.HelloBean",   // Bean class
                         SessionTxMetaInfo.not_support(),      // Transaction type
                        "org/jfox/ejb/examples/meta/HelloEJB",   // jndi name
                        false                               // is Stateful SessionBean
);
     }


By providing intact parameters to EJBMetaHelper. CreateEJBMeta, it defines the content of returned EJBMetaInfo. It is flexible to deploy those EJB components whose EJB namings don't accord to specification, which want to define transaction type by themselves, or which want to define jndi name by themselves.

Another thing needed to notify is that, because Jfox deploys EJB components according to the Meta class in EJB jar file, please make sure that every EJB has a Meta class with it, and must guarantee the information provided by Meta class is correct, or your EJB can not be deployed or failed to be deployed.