Wicket EJB3 integration

View: New views
5 Messages — Rating Filter:   Alert me  

Wicket EJB3 integration

by Roman Ilin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi *,

what is the preferable solution to integrate Wicket war in existing ear project?
I would like to deploy wicket war as separate war and not in the ear.
In ear project I have stateful bean which is used by other part of application.
EJB interfaces are packed in separate jar.
Should I do lookup and save EJB in wicket session?
Do I need to attach/detach EJB reference on every request?


Regards

Roman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Wicket EJB3 integration

by Filippo De Luca :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think you can try to use Spring to reference remote EJB, and then use
wicket-spring.

2009/11/6 Roman Ilin <roman.ilin@...>

> Hi *,
>
> what is the preferable solution to integrate Wicket war in existing ear
> project?
> I would like to deploy wicket war as separate war and not in the ear.
> In ear project I have stateful bean which is used by other part of
> application.
> EJB interfaces are packed in separate jar.
> Should I do lookup and save EJB in wicket session?
> Do I need to attach/detach EJB reference on every request?
>
>
> Regards
>
> Roman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Filippo De Luca
--------------------------
Email: dl.filippo@...
Web:   http://www.filosganga.it
LinkedIn: http://www.linkedin.com/in/filippodeluca
mobile: +393395822588

Re: Wicket EJB3 integration

by aldaris :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

To do this, you would need Remote EJB interfaces first. After that, you
could do:
- create an EJB-reference manager (so not in the session - you should
store the least you can in your session), which resolves first the EJB
references, then the pages gets their cached references through getters.
- you could add cglib-2.2.jar, wicket-ioc.jar and
wicket-contrib-javaee.jar on your classpath, and add to the Application
init method:
addComponentInstantiationListener(new JavaEEComponentInjector(this));
but with this solution you would able to use the @EJB annotation ONLY in
your components.

Best Regards,
Peter Major


2009-11-06 09:54 keltezéssel, Roman Ilin írta:

> Hi *,
>
> what is the preferable solution to integrate Wicket war in existing ear project?
> I would like to deploy wicket war as separate war and not in the ear.
> In ear project I have stateful bean which is used by other part of application.
> EJB interfaces are packed in separate jar.
> Should I do lookup and save EJB in wicket session?
> Do I need to attach/detach EJB reference on every request?
>
>
> Regards
>
> Roman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Wicket EJB3 integration

by janneru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

or you could use seam / webbeans. it supports wicket as one of its 3
view technologies (jsf, gwt, wicket).

uwe.

2009/11/6 Major Péter <majorpetya@...>:

> Hi,
>
> To do this, you would need Remote EJB interfaces first. After that, you
> could do:
> - create an EJB-reference manager (so not in the session - you should
> store the least you can in your session), which resolves first the EJB
> references, then the pages gets their cached references through getters.
> - you could add cglib-2.2.jar, wicket-ioc.jar and
> wicket-contrib-javaee.jar on your classpath, and add to the Application
> init method:
> addComponentInstantiationListener(new JavaEEComponentInjector(this));
> but with this solution you would able to use the @EJB annotation ONLY in
> your components.
>
> Best Regards,
> Peter Major
>
>
> 2009-11-06 09:54 keltezéssel, Roman Ilin írta:
>> Hi *,
>>
>> what is the preferable solution to integrate Wicket war in existing ear project?
>> I would like to deploy wicket war as separate war and not in the ear.
>> In ear project I have stateful bean which is used by other part of application.
>> EJB interfaces are packed in separate jar.
>> Should I do lookup and save EJB in wicket session?
>> Do I need to attach/detach EJB reference on every request?
>>
>>
>> Regards
>>
>> Roman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Wicket EJB3 integration

by Roman Ilin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you all for the answers,

@Filippo De Luca we use spring already but in other direction. We use
Spring DAO called from EJBs :)
to use Spring in war project is to much not need overhead in my opinion

@janneru war project doesn't need spring or seem. I think it is too
much overhead

@Major Peter 1) We already use similar solution in on of our web
projects ( not wicket ) and probably it is what I will implement if
one of much smarter guys won't suggest better idea :)
2) As you wrote @EJB annotations are working in components only.



On Fri, Nov 6, 2009 at 12:45 PM, janneru <jan.ner.u@...> wrote:

> or you could use seam / webbeans. it supports wicket as one of its 3
> view technologies (jsf, gwt, wicket).
>
> uwe.
>
> 2009/11/6 Major Péter <majorpetya@...>:
>> Hi,
>>
>> To do this, you would need Remote EJB interfaces first. After that, you
>> could do:
>> - create an EJB-reference manager (so not in the session - you should
>> store the least you can in your session), which resolves first the EJB
>> references, then the pages gets their cached references through getters.
>> - you could add cglib-2.2.jar, wicket-ioc.jar and
>> wicket-contrib-javaee.jar on your classpath, and add to the Application
>> init method:
>> addComponentInstantiationListener(new JavaEEComponentInjector(this));
>> but with this solution you would able to use the @EJB annotation ONLY in
>> your components.
>>
>> Best Regards,
>> Peter Major
>>
>>
>> 2009-11-06 09:54 keltezéssel, Roman Ilin írta:
>>> Hi *,
>>>
>>> what is the preferable solution to integrate Wicket war in existing ear project?
>>> I would like to deploy wicket war as separate war and not in the ear.
>>> In ear project I have stateful bean which is used by other part of application.
>>> EJB interfaces are packed in separate jar.
>>> Should I do lookup and save EJB in wicket session?
>>> Do I need to attach/detach EJB reference on every request?
>>>
>>>
>>> Regards
>>>
>>> Roman
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...