Results 1 to 2 of 2

Thread: Wire EJBs over the wire.

  1. #1
    Ext User
    Join Date
    Sep 2008
    Vote Rating

    Thumbs up Wire EJBs over the wire.


    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:
    Caused by: 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.

    Example Entity Bean:
    import javax.persistence.*;
    @Table(name = "cars")
    public class Car implements Serializable {
        private static final long serialVersionUID = 1L;
        @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
    Brisbane, Australia
    Vote Rating


    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts