You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Radhakrishna Nimmagadda <sa...@gmail.com> on 2013/11/29 14:40:17 UTC

Need suggestion (Using OpenEJB in Java SE)

Hi,

I want to use CDI and other EJB related features in Java SE application,
for that I would like to use OpenEJB and want to call the following code in
my *public static void main()* method.

*EJBContainer.createEJBContainer(properties).getContext().bind("inject",
this)*;

I want to know if this is a preferred way of doing.

PS: I don't want to use any application server.

Saranya

Re: Need suggestion (Using OpenEJB in Java SE)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Sounds correct

Note the bind is not portable
Le 29 nov. 2013 14:41, "Radhakrishna Nimmagadda" <sa...@gmail.com> a
écrit :

> Hi,
>
> I want to use CDI and other EJB related features in Java SE application,
> for that I would like to use OpenEJB and want to call the following code in
> my *public static void main()* method.
>
> *EJBContainer.createEJBContainer(properties).getContext().bind("inject",
> this)*;
>
> I want to know if this is a preferred way of doing.
>
> PS: I don't want to use any application server.
>
> Saranya
>