One more thing is that Java EE 6 specification says that each lookup for 
managed 
beans must return a new instance. Currently, ManagedBeans are bound to JNDI 
with 
java:/module/BeanName and java:/app/module_name/bean_name and each lookup gives 
the same instance.

I think that relfecting managed beans as like EJBs may not be a good idea.


--Gurkan



----- Original Message ----
From: Gurkan Erdogdu <[email protected]>
To: [email protected]
Sent: Wed, September 22, 2010 6:43:03 PM
Subject: Managed Beans References

Hello;

Currently OpenEJB scans managed beans as normal EJBs. If a managed bean class 
does not implement any interface, it treats as LocalBean otherwise it treats as 
Business Local interface. I think that one can always assumes managed beans as 
LocalBeans. It is easy to update current code for this happen:

In AnnotationDeployer # processSessionInterfaces

boolean isManagedBean = beanClass.isAnnotationPresent(ManagedBean.class);
if(isManagedBean){
   sessionBean.setLocalBean(new Empty()); 
}else{
   .....
}

WDYT?

--Gurkan


Reply via email to