wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: Wicket with JPA and container managed transactions
Date Mon, 08 Oct 2012 13:34:27 GMT
Hi Dieter,

javaee-inject uses wicket-ioc and injects a serializable Proxy instead
of the EJB bean itself that was returned by the container. This is the
same as how Spring and Guice work.

See the response of heapifyman. The simplest would be use only CDI in
your Wicket code. Hide any usage of EJBs behind CDI.

On Mon, Oct 8, 2012 at 4:25 PM, Dieter Tremel <tremel@tremel-computer.de> wrote:
> Am 08.10.2012 15:14, schrieb Martin Grigorov:
>> Are you aware of
>> https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/javaee-inject-parent
>> ?
>
> Hi Martin,
> I know this lib an had a look at it. If I am right, it is just another
> way of injection.
> In my running example of implementing a data provider the injection
> already works and a have a beautiful rendered result of my data. But
> after the request the error around serialization is:
>> SEVERE: Error serializing object class de.tremel_computer.buchbeispiel.wicket.BuecherPage
[object=[Page class = de.tremel_computer.buchbeispiel.wicket.BuecherPage, id = 0, render count
= 1]]
>> org.apache.wicket.core.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate
>> Field hierarchy is:
>>   0 [class=de.tremel_computer.buchbeispiel.wicket.BuecherPage, path=0]
>>     private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>>       java.lang.Object org.apache.wicket.Component.data[2] [class=org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable,
path=0:datatable]
>>         private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>>           java.lang.Object org.apache.wicket.Component.data[1] [class=org.apache.wicket.markup.html.WebMarkupContainer,
path=0:datatable:body]
>>             private java.lang.Object org.apache.wicket.MarkupContainer.children [class=org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1,
path=0:datatable:body:rows]
>>               private final org.apache.wicket.markup.repeater.data.IDataProvider
org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider [class=de.tremel_computer.wicketcrud.modeling.EntityDataProvider]
>>                 private de.tremel_computer.wicketcrud.controller.AbstractFacade de.tremel_computer.wicketcrud.modeling.EntityDataProvider.facade
[class=de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__Intf____Bean__]
>>                   private de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__Intf__
de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__Intf____Bean__.__ejb31_delegate
[class=$Proxy182]
>>                     protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h
[class=com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate] <----- field that
is not serializable
>
> I suppose with javaee-inject-parent I would have the same error after
> rendering.
>
> Thank You
> Dieter
>
> --
> Tremel Computer                    http://www.tremel-computer.de
> Dieter Tremel                      mailto:tremel@tremel-computer.de
> Rebenring 16                       Tel +49 871 9357080
> 84032 Altdorf                      Fax +49 871 9357081
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Mime
View raw message