1. #1
    Ext User
    Join Date
    Sep 2008
    Posts
    4
    Vote Rating
    0
    powerj is on a distinguished road

      0  

    Thumbs up Wire EJBs over the wire.

    Wire EJBs over the wire.


    Hi.

    I am trying to wire Enteprise Java Beans over the wire.

    The objects i try to wire are Entity Beans that looks like simple beans, but have som annotations that forms it to Eneity Beans.

    The first problem i had was that gwt-compiler was unable to compile my EJBs becouse gwt-1.5 knows about annotations. The annotations required from import javax.persistence.*; was unable to be found, and gwt was failing on me. I quickly creatad some fake-annotations and sence there is to no use for gwt, it compiled successfully.

    Fine! i thouth until i loaded the page and tried to wire my List<> of EJBs, gwt-servlet then complained about having problems to serialize the bean for transmission, becouse:
    Code:
    Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'oracle.toplink.essentials.internal.indirection.UnitOfWorkQueryValueHolder' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.
    I dont really care what additional data my persistence layer ads to my bean, i just want to wire the raw-bean data over.

    Is there someone that knows how to make gwt serialize this the right way?

    Thanks for your time.
    Jimmy


    Example Entity Bean:
    Code:
    import javax.persistence.*;
    
    @Entity
    @Table(name = "cars")
    public class Car implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Column(name = "car_id", nullable = false)
        private Integer carId;
        @Column(name = "carnr", nullable = false)
        private int carnr;
    
        int getId() { return(this.carId); }
        void setId(int id) { this.carId=id; }
        int getNr() { return(this.carnr); }
        void setNr(int nr) { this.carnr=nr; }
    }

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    you cannot send objects that extend api that GWT doesn't support... you will need to create a pojo and transfer your Enteprise Java Beans into it

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar