openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gurkan Erdogdu <cgurkanerdo...@gmail.com>
Subject Re: Integration with OpenWebBeans
Date Thu, 16 Jul 2009 20:22:35 GMT
Hi Mohammad,

I will post an example using EJB stuff.

Basically, I wrote a plugin for EJB stuff. This plugin is asked questions by
OWB about a scanned class, like "isEjbClass(), getProxy(),
isStateless()...etc". Plugin gets all EJB information from the
"ContainerSystem" in its startup so it can answer all of the questions using
bean's "DeploymentInfo".

When plugin is asked about proxy, it finds the proxy from JNDI tree. I also
wrote "OWBInterceptor" that is used for injecting OWB related stuffs into
the EJBs.

You can look at the svn for full source code under the "webbeans-ejb"
project.

Thanks;

Gurkan

2009/7/16 Mohammad Nour El-Din <nour.mohammad@gmail.com>

> Hi Gurkan...
>
>   Would you please explain how you did it ?
>
> On Thu, Jul 16, 2009 at 8:47 AM, Gurkan Erdogdu<cgurkanerdogdu@gmail.com>
> wrote:
> > I did it. I have integrated OWB with OpenEJB.
> >
> > Now, Tomcat becomes full blown DI container :)
> >
> > Thanks;
> >
> > --Gurkan
> >
> > 2009/7/15 Gurkan Erdogdu <cgurkanerdogdu@gmail.com>
> >
> >>
> >> Hi;
> >>
> >> I am trying to integrate OpenEJB in Tomcat with OpenWebbeans to use EJBs
> in
> >> OWB beans. I have successfully injected EJBs into the OWB beans. But
> >> moreover, I want to inject OWB beans into the EJBs fields.
> >>
> >> For example
> >> @Stateless
> >> public class HelloBean implements Hello
> >> {
> >>     private @Synchronous PaymentProcessor processor;  --> This will be
> >> injected by the OWB
> >> }
> >>
> >>
> >> I am getting the proxy instance from EJB container using
> >> "containerSystem.getJNDIContext().lookup("opeejb/Deployment" + .....)",
> but
> >> I am not able to set ejb instance fields via this proxy instance.
> >>
> >> How could I inject OWB instance?  Maybe, it can be done writing general
> >> OWBInterceptor that handles injection using @PostConstruct. But it
> imposes
> >> developers to add this interceptor to every EJB? Is there any hack?
> >>
> >> Thanks;
> >>
> >> --Gurkan
> >>
> >> 2009/4/7 Gurkan Erdogdu <cgurkanerdogdu@gmail.com>
> >>
> >> Hi Mohammad;
> >>>
> >>> Its great to hear this.
> >>>
> >>> Thanks a lot;
> >>>
> >>> Gurkan
> >>>
> >>> 2009/4/6 Mohammad Nour El-Din <nour.mohammad@gmail.com>
> >>>
> >>> I am reading the specs Gurkan. I am expecting to work on that next
> week.
> >>>>
> >>>> On Mon, Apr 6, 2009 at 3:32 PM, Gurkan Erdogdu <
> cgurkanerdogdu@gmail.com>
> >>>> wrote:
> >>>> > thanks for the answer Jacek.
> >>>> >
> >>>> > Gurkan
> >>>> >
> >>>> > 2009/4/6 Jacek Laskowski <jacek@laskowski.net.pl>
> >>>> >
> >>>> >> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
> >>>> >> <cgurkanerdogdu@gmail.com> wrote:
> >>>> >>
> >>>> >> > Is there any progress?
> >>>> >>
> >>>> >> Nope. I haven't finished the spec yet. In fact, I'm quite busy
with
> >>>> >> reading about Grails and its features with DGG2 so I'm back
with
> the
> >>>> >> task at hand once it's finished. I'm presenting OpenEJB at
GeeCON
> [1]
> >>>> >> conference in May so there's no way I don't spend some time
on the
> >>>> >> integration just to get up-to-speed with openejb itself. It'd
be
> >>>> >> awesome if I could present some OWB-OE features then. Stay
tuned.
> >>>> >>
> >>>> >> [1] http://geecon.org
> >>>> >>
> >>>> >> Jacek
> >>>> >>
> >>>> >> --
> >>>> >> Jacek Laskowski
> >>>> >> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
> >>>> >>
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Gurkan Erdogdu
> >>>> > http://gurkanerdogdu.blogspot.com
> >>>> >
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> ----
> >>>> Thanks
> >>>> - Mohammad Nour
> >>>> - LinkedIn: http://www.linkedin.com/in/mnour
> >>>> ----
> >>>> "Life is like riding a bicycle. To keep your balance you must keep
> >>>> moving"
> >>>> - Albert Einstein
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Gurkan Erdogdu
> >>> http://gurkanerdogdu.blogspot.com
> >>>
> >>
> >>
> >>
> >> --
> >> Gurkan Erdogdu
> >> http://gurkanerdogdu.blogspot.com
> >>
> >
> >
> >
> > --
> > Gurkan Erdogdu
> > http://gurkanerdogdu.blogspot.com
> >
>
>
>
> --
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>



-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message