You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Gurkan Erdogdu <cg...@gmail.com> on 2009/04/06 12:28:31 UTC

Re: Integration with OpenWebBeans

Hi,

Is there any progress?

Thanks;

Gurkan

2009/3/26 Gurkan Erdogdu <cg...@gmail.com>

> >> Did you copy it over from a spec or something?
>
> No. I just want to explain a bit more than simple :)
>
> >>I'll disappear for a while for reading. I'll get back
> >>when I'm done with it.
>
> Ok, thanks.
>
> >> On to building owb and seeing how it works.
>
> If you have any problem with it, I am pleasure to help.
>
> Thanks again;
>
> Gurkan
>
>
> 2009/3/26 Jacek Laskowski <ja...@laskowski.net.pl>
>
>> On Thu, Mar 26, 2009 at 2:17 PM, Gurkan Erdogdu
>>
>> <cg...@gmail.com> wrote:
>> > I assume that owe --> owb
>> >
>> > Actually, I think that there are two different aspects of the
>> integration;
>> >
>> > 1* Discovery and Definition
>> ...
>> > 2* Lifecycle and injection
>> ...
>>
>> Whoa, quite a lot to digest. I was about to stop reading it thinking
>> it's even more to come, but it turned out I was just about the end of
>> the email. Did you copy it over from a spec or something? It's so
>> clear and easy to grasp. Nice.
>>
>> I've printed out the spec to find out about (formerly called) webbeans
>> a bit more so I'll disappear for a while for reading. I'll get back
>> when I'm done with it. On to building owb and seeing how it works.
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>>
>
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>



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

Re: Integration with OpenWebBeans

Posted by Gurkan Erdogdu <cg...@gmail.com>.
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 <no...@gmail.com>

> Hi Gurkan...
>
>   Would you please explain how you did it ?
>
> On Thu, Jul 16, 2009 at 8:47 AM, Gurkan Erdogdu<cg...@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 <cg...@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 <cg...@gmail.com>
> >>
> >> Hi Mohammad;
> >>>
> >>> Its great to hear this.
> >>>
> >>> Thanks a lot;
> >>>
> >>> Gurkan
> >>>
> >>> 2009/4/6 Mohammad Nour El-Din <no...@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 <ja...@laskowski.net.pl>
> >>>> >
> >>>> >> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
> >>>> >> <cg...@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

Re: Integration with OpenWebBeans

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Gurkan...

   Would you please explain how you did it ?

On Thu, Jul 16, 2009 at 8:47 AM, Gurkan Erdogdu<cg...@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 <cg...@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 <cg...@gmail.com>
>>
>> Hi Mohammad;
>>>
>>> Its great to hear this.
>>>
>>> Thanks a lot;
>>>
>>> Gurkan
>>>
>>> 2009/4/6 Mohammad Nour El-Din <no...@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 <cg...@gmail.com>
>>>> wrote:
>>>> > thanks for the answer Jacek.
>>>> >
>>>> > Gurkan
>>>> >
>>>> > 2009/4/6 Jacek Laskowski <ja...@laskowski.net.pl>
>>>> >
>>>> >> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
>>>> >> <cg...@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

Re: Integration with OpenWebBeans

Posted by Gurkan Erdogdu <cg...@gmail.com>.
I did it. I have integrated OWB with OpenEJB.

Now, Tomcat becomes full blown DI container :)

Thanks;

--Gurkan

2009/7/15 Gurkan Erdogdu <cg...@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 <cg...@gmail.com>
>
> Hi Mohammad;
>>
>> Its great to hear this.
>>
>> Thanks a lot;
>>
>> Gurkan
>>
>> 2009/4/6 Mohammad Nour El-Din <no...@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 <cg...@gmail.com>
>>> wrote:
>>> > thanks for the answer Jacek.
>>> >
>>> > Gurkan
>>> >
>>> > 2009/4/6 Jacek Laskowski <ja...@laskowski.net.pl>
>>> >
>>> >> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
>>> >> <cg...@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

Re: Integration with OpenWebBeans

Posted by Gurkan Erdogdu <cg...@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 <cg...@gmail.com>

> Hi Mohammad;
>
> Its great to hear this.
>
> Thanks a lot;
>
> Gurkan
>
> 2009/4/6 Mohammad Nour El-Din <no...@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 <cg...@gmail.com>
>> wrote:
>> > thanks for the answer Jacek.
>> >
>> > Gurkan
>> >
>> > 2009/4/6 Jacek Laskowski <ja...@laskowski.net.pl>
>> >
>> >> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
>> >> <cg...@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

Re: Integration with OpenWebBeans

Posted by Gurkan Erdogdu <cg...@gmail.com>.
Hi Mohammad;

Its great to hear this.

Thanks a lot;

Gurkan

2009/4/6 Mohammad Nour El-Din <no...@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 <cg...@gmail.com>
> wrote:
> > thanks for the answer Jacek.
> >
> > Gurkan
> >
> > 2009/4/6 Jacek Laskowski <ja...@laskowski.net.pl>
> >
> >> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
> >> <cg...@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

Re: Integration with OpenWebBeans

Posted by Mohammad Nour El-Din <no...@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 <cg...@gmail.com> wrote:
> thanks for the answer Jacek.
>
> Gurkan
>
> 2009/4/6 Jacek Laskowski <ja...@laskowski.net.pl>
>
>> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
>> <cg...@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

Re: Integration with OpenWebBeans

Posted by Gurkan Erdogdu <cg...@gmail.com>.
thanks for the answer Jacek.

Gurkan

2009/4/6 Jacek Laskowski <ja...@laskowski.net.pl>

> On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
> <cg...@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

Re: Integration with OpenWebBeans

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Mon, Apr 6, 2009 at 12:28 PM, Gurkan Erdogdu
<cg...@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