Re: is usage of BaseEjbBean.iface safe?
On Wed, Jul 28, 2010 at 1:40 AM, Gurkan Erdogdu gurkanerdo...@yahoo.com wrote: Good catch Eric! Not mean that current logic is wrong. Bean API types are local interfaces of the EJB bean . We check all injection fields at deployment time for validation. If there is no validation error, using of EJB local interfaces are correct. What is the problem that you think about? My concern is that at runtime, each time we perform injection various threads are poking around at BaseEjbBean.iface when really all they need to is use the iface on the stack to create their proxies/instances. This is because there is not actually one iface per BaseEjbBean (EJB class), just one per injection point. -- Eric Covener cove...@gmail.com
Re: is usage of BaseEjbBean.iface safe?
On Wed, Jul 28, 2010 at 7:55 AM, Eric Covener cove...@gmail.com wrote: On Wed, Jul 28, 2010 at 1:40 AM, Gurkan Erdogdu gurkanerdo...@yahoo.com wrote: Good catch Eric! Not mean that current logic is wrong. Bean API types are local interfaces of the EJB bean . We check all injection fields at deployment time for validation. If there is no validation error, using of EJB local interfaces are correct. What is the problem that you think about? My concern is that at runtime, each time we perform injection various threads are poking around at BaseEjbBean.iface when really all they need to is use the iface on the stack to create their proxies/instances. This is because there is not actually one iface per BaseEjbBean (EJB class), just one per injection point. Although now I'm not sure if we can properly know the injected iface when it's time to get the instance, since we are funneled through the Contextual.getInstance() interface. But stashing away the injected iface in the BaseEjbBean in between proxy creation and obtaining the instance does not seem threadsafe. -- Eric Covener cove...@gmail.com
is usage of BaseEjbBean.iface safe?
If we have 1 EJB bean class, we only have 1 ENTERPRISE managed bean and one BaseEjbBean.iface. But if this EJB has two or more local interfaces, it can be injected as under multiple interfaces. It seems like the interface should only be passsed around on the stack not actually associated with the enterprise bean itself. Does this sound right? -- Eric Covener cove...@gmail.com
Re: is usage of BaseEjbBean.iface safe?
Good catch Eric! Actually we save all of local interfaces in EJB bean and bean is requested with one of those interfaces we supply proxy instance. --Gurkan From: Eric Covener cove...@gmail.com To: dev@openwebbeans.apache.org Sent: Wed, July 28, 2010 2:05:29 AM Subject: is usage of BaseEjbBean.iface safe? If we have 1 EJB bean class, we only have 1 ENTERPRISE managed bean and one BaseEjbBean.iface. But if this EJB has two or more local interfaces, it can be injected as under multiple interfaces. It seems like the interface should only be passsed around on the stack not actually associated with the enterprise bean itself. Does this sound right? -- Eric Covener cove...@gmail.com
Re: is usage of BaseEjbBean.iface safe?
Good catch Eric! Not mean that current logic is wrong. Bean API types are local interfaces of the EJB bean . We check all injection fields at deployment time for validation. If there is no validation error, using of EJB local interfaces are correct. What is the problem that you think about? --Gurkan From: Gurkan Erdogdu gurkanerdo...@yahoo.com To: dev@openwebbeans.apache.org Sent: Wed, July 28, 2010 8:27:42 AM Subject: Re: is usage of BaseEjbBean.iface safe? Good catch Eric! Actually we save all of local interfaces in EJB bean and bean is requested with one of those interfaces we supply proxy instance. --Gurkan From: Eric Covener cove...@gmail.com To: dev@openwebbeans.apache.org Sent: Wed, July 28, 2010 2:05:29 AM Subject: is usage of BaseEjbBean.iface safe? If we have 1 EJB bean class, we only have 1 ENTERPRISE managed bean and one BaseEjbBean.iface. But if this EJB has two or more local interfaces, it can be injected as under multiple interfaces. It seems like the interface should only be passsed around on the stack not actually associated with the enterprise bean itself. Does this sound right? -- Eric Covener cove...@gmail.com