Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] probloem with static weaving and eclipselink @transient

Ok... Your variable is set in your constructor. I assume you are seeing this issue after a read from the DB.

By default, EclipseLink does not call your default constructor when it reads from the DB. It behaves this way to avoid instantiating objects in the constructor that will be instantiated as it populates the object from the database. (i.e. By default, it only deals with persistent attributes of the object)

For transient variables that are import to you, you have a couple of options.

1. Use an EntityListener with a postBuild method to instantiate the the transient variables

2. Turn off the optimization mentioned above by setting the following persistence unit property:

eclipselink.weaving.internal=false

I suggest the first option as it will allow you to still take advantage of the optimizations provided by our internal weaving.

-Tom



On 23/05/2013 9:02 AM, steffen.herter@xxxxxx wrote:
Sorry there is of cource weaved code inside the decompiled classes.

*DBObject*:

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.

// Jad home page: http://www.kpdus.com/jad.html

// Decompiler options: packimports(3)

// Source File Name:   DbObject.java

import java.beans.PropertyChangeEvent;

import java.beans.PropertyChangeListener;

import java.util.Date;

import java.util.List;

import org.eclipse.persistence.descriptors.changetracking.ChangeTracker;

import org.eclipse.persistence.indirection.ValueHolder;

import org.eclipse.persistence.indirection.WeavedAttributeValueHolderInterface;

import org.eclipse.persistence.internal.descriptors.PersistenceEntity;

import org.eclipse.persistence.internal.descriptors.PersistenceObject;

import org.eclipse.persistence.internal.identitymaps.CacheKey;

import org.eclipse.persistence.internal.jpa.EntityManagerImpl;

import org.eclipse.persistence.internal.weaving.*;

import org.eclipse.persistence.queries.FetchGroup;

import org.eclipse.persistence.queries.FetchGroupTracker;

import org.eclipse.persistence.sessions.Session;

// Referenced classes of package com.zf.tolcalc.dao.domain:

//            User

public abstract class DbObject

     implements Cloneable, PersistenceWeaved, PersistenceEntity,
PersistenceObject, FetchGroupTracker, PersistenceWeavedFetchGroups,
PersistenceWeavedLazy, ChangeTracker, PersistenceWeavedChangeTracking,
PersistenceWeavedRest

{

     public DbObject()

     {

         createUser = null;

         updateUser = null;

         createDate = null;

         updateDate = null;

         valid = true;

         updated = false;

     }

     public abstract Long getId();

     public User getCreateUser()

     {

         return _persistence_get_createUser();

     }

     public void setCreateUser(User createUser)

     {

         _persistence_set_createUser(createUser);

     }

     public User getUpdateUser()

     {

         return _persistence_get_updateUser();

     }

     public void setUpdateUser(User updateUser)

     {

         _persistence_set_updateUser(updateUser);

     }

     public Date getCreateDate()

     {

         return _persistence_get_createDate();

     }

     public void setCreateDate(Date createDate)

     {

         _persistence_set_createDate(createDate);

     }

     public Date getUpdateDate()

     {

         return _persistence_get_updateDate();

     }

     public void setUpdateDate(Date updateDate)

     {

         _persistence_set_updateDate(updateDate);

     }

     public boolean isValid()

     {

         return valid;

     }

     public void setValid(boolean valid)

     {

         this.valid = valid;

     }

     public boolean isUpdated()

     {

         return updated;

     }

     public void setUpdated(boolean updated)

     {

         this.updated = updated;

     }

     protected void copyValues(DbObject object)

     {

         setCreateDate(object.getCreateDate());

         setCreateUser(object.getCreateUser());

         setUpdateDate(object.getUpdateDate());

         setUpdateUser(object.getUpdateUser());

         setUpdated(object.isUpdated());

         setValid(object.isValid());

     }

     public Object _persistence_post_clone()

     {

         if(_persistence_createUser_vh != null)

             _persistence_createUser_vh =
(WeavedAttributeValueHolderInterface)_persistence_createUser_vh.clone();

         if(_persistence_updateUser_vh != null)

             _persistence_updateUser_vh =
(WeavedAttributeValueHolderInterface)_persistence_updateUser_vh.clone();

         _persistence_listener = null;

         _persistence_fetchGroup = null;

         _persistence_session = null;

         _persistence_primaryKey = null;

         return this;

     }

     public Object _persistence_shallow_clone()

     {

         return super.clone();

     }

     public Object _persistence_getId()

    {

         return _persistence_primaryKey;

     }

     public void _persistence_setId(Object obj)

     {

         _persistence_primaryKey = obj;

     }

     public CacheKey _persistence_getCacheKey()

     {

         return _persistence_cacheKey;

     }

     public void _persistence_setCacheKey(CacheKey cachekey)

     {

         _persistence_cacheKey = cachekey;

     }

     public Object _persistence_new(PersistenceObject persistenceobject)

     {

         return new DbObject(persistenceobject);

     }

     public DbObject(PersistenceObject persistenceobject)

     {

     }

     public Object _persistence_get(String s)

     {

         if(s == "createUser")

             return createUser;

         if(s == "createDate")

             return createDate;

         if(s == "updateDate")

             return updateDate;

         if(s == "updateUser")

             return updateUser;

         else

             return null;

     }

     public void _persistence_set(String s, Object obj)

     {

         if(s == "createUser")

         {

             createUser = (User)obj;

             return;

         }

         if(s == "createDate")

         {

             createDate = (Date)obj;

             return;

         }

         if(s == "updateDate")

         {

             updateDate = (Date)obj;

             return;

         }

         if(s == "updateUser")

         {

             updateUser = (User)obj;

             return;

         } else

         {

             return;

         }

     }

     protected void _persistence_initialize_createUser_vh()

     {

         if(_persistence_createUser_vh == null)

         {

             _persistence_createUser_vh = new ValueHolder(createUser);

             _persistence_createUser_vh.setIsNewlyWeavedValueHolder(true);

         }

     }

     public WeavedAttributeValueHolderInterface _persistence_get_createUser_vh()

     {

         _persistence_initialize_createUser_vh();

         if(_persistence_createUser_vh.isCoordinatedWithProperty() ||
_persistence_createUser_vh.isNewlyWeavedValueHolder())

         {

             User user = _persistence_get_createUser();

             if(user != _persistence_createUser_vh.getValue())

                 _persistence_set_createUser(user);

         }

         return _persistence_createUser_vh;

     }

     public void
_persistence_set_createUser_vh(WeavedAttributeValueHolderInterface
weavedattributevalueholderinterface)

     {

         _persistence_createUser_vh = weavedattributevalueholderinterface;

         if(weavedattributevalueholderinterface.isInstantiated())

         {

             User user = _persistence_get_createUser();

             Object obj = weavedattributevalueholderinterface.getValue();

             if(user != obj)

                 _persistence_set_createUser((User)obj);

         } else

         {

             createUser = null;

         }

     }

     public User _persistence_get_createUser()

     {

         _persistence_checkFetched("createUser");

         _persistence_initialize_createUser_vh();

         createUser = (User)_persistence_createUser_vh.getValue();

         return createUser;

     }

     public void _persistence_set_createUser(User user)

     {

         _persistence_checkFetchedForSet("createUser");

         _persistence_initialize_createUser_vh();

         createUser = (User)_persistence_createUser_vh.getValue();

         _persistence_propertyChange("createUser", createUser, user);

         createUser = user;

         _persistence_createUser_vh.setValue(user);

     }

     public Date _persistence_get_createDate()

     {

         _persistence_checkFetched("createDate");

         return createDate;

     }

     public void _persistence_set_createDate(Date date)

     {

         _persistence_checkFetchedForSet("createDate");

         _persistence_propertyChange("createDate", createDate, date);

         createDate = date;

     }

     public Date _persistence_get_updateDate()

     {

         _persistence_checkFetched("updateDate");

         return updateDate;

     }

     public void _persistence_set_updateDate(Date date)

     {

         _persistence_checkFetchedForSet("updateDate");

         _persistence_propertyChange("updateDate", updateDate, date);

         updateDate = date;

     }

     protected void _persistence_initialize_updateUser_vh()

     {

         if(_persistence_updateUser_vh == null)

         {

             _persistence_updateUser_vh = new ValueHolder(updateUser);

             _persistence_updateUser_vh.setIsNewlyWeavedValueHolder(true);

         }

     }

     public WeavedAttributeValueHolderInterface _persistence_get_updateUser_vh()

     {

         _persistence_initialize_updateUser_vh();

         if(_persistence_updateUser_vh.isCoordinatedWithProperty() ||
_persistence_updateUser_vh.isNewlyWeavedValueHolder())

         {

             User user = _persistence_get_updateUser();

             if(user != _persistence_updateUser_vh.getValue())

                 _persistence_set_updateUser(user);

         }

         return _persistence_updateUser_vh;

     }

     public void
_persistence_set_updateUser_vh(WeavedAttributeValueHolderInterface
weavedattributevalueholderinterface)

     {

         _persistence_updateUser_vh = weavedattributevalueholderinterface;

         if(weavedattributevalueholderinterface.isInstantiated())

         {

             User user = _persistence_get_updateUser();

             Object obj = weavedattributevalueholderinterface.getValue();

             if(user != obj)

                 _persistence_set_updateUser((User)obj);

         } else

         {

             updateUser = null;

         }

     }

     public User _persistence_get_updateUser()

     {

         _persistence_checkFetched("updateUser");

         _persistence_initialize_updateUser_vh();

         updateUser = (User)_persistence_updateUser_vh.getValue();

         return updateUser;

     }

     public void _persistence_set_updateUser(User user)

     {

         _persistence_checkFetchedForSet("updateUser");

         _persistence_initialize_updateUser_vh();

         updateUser = (User)_persistence_updateUser_vh.getValue();

         _persistence_propertyChange("updateUser", updateUser, user);

         updateUser = user;

         _persistence_updateUser_vh.setValue(user);

     }

     public PropertyChangeListener _persistence_getPropertyChangeListener()

     {

         return _persistence_listener;

     }

     public void _persistence_setPropertyChangeListener(PropertyChangeListener
propertychangelistener)

     {

         _persistence_listener = propertychangelistener;

     }

     public void _persistence_propertyChange(String s, Object obj, Object obj1)

     {

         if(_persistence_listener != null && obj != obj1)

             _persistence_listener.propertyChange(new PropertyChangeEvent(this,
s, obj, obj1));

     }

     public Session _persistence_getSession()

     {

        return _persistence_session;

     }

     public void _persistence_setSession(Session session)

     {

         _persistence_session = session;

     }

     public FetchGroup _persistence_getFetchGroup()

     {

         return _persistence_fetchGroup;

     }

     public void _persistence_setFetchGroup(FetchGroup fetchgroup)

     {

         _persistence_fetchGroup = fetchgroup;

     }

     public boolean _persistence_shouldRefreshFetchGroup()

     {

         return _persistence_shouldRefreshFetchGroup;

     }

     public void _persistence_setShouldRefreshFetchGroup(boolean flag)

     {

         _persistence_shouldRefreshFetchGroup = flag;

     }

     public void _persistence_resetFetchGroup()

     {

     }

     public boolean _persistence_isAttributeFetched(String s)

     {

         return _persistence_fetchGroup == null ||
_persistence_fetchGroup.containsAttributeInternal(s);

     }

     public void _persistence_checkFetched(String s)

     {

         if(!_persistence_isAttributeFetched(s))


EntityManagerImpl.processUnfetchedAttribute((FetchGroupTracker)this, s);

     }

     public void _persistence_checkFetchedForSet(String s)

     {

         if(!_persistence_isAttributeFetched(s))


EntityManagerImpl.processUnfetchedAttributeForSet((FetchGroupTracker)this, s);

     }

     public List _persistence_getRelationships()

     {

         return _persistence_relationshipInfo;

     }

     public void _persistence_setRelationships(List list)

     {

         _persistence_relationshipInfo = list;

     }

     private User createUser;

     private User updateUser;

     private Date createDate;

     private Date updateDate;

     private boolean valid;

     private boolean updated;

     public static final String COL_CRE_DATE = "createDate";

     public static final String COL_CRE_USER_ID = "createUser";

     public static final String COL_UPD_DATE = "updateDate";

     public static final String COL_UPD_USER_ID = "updateUser";

     static final long serialVersionUID = 0x37165f295a5982dfL;

     protected transient Object _persistence_primaryKey;

     protected transient CacheKey _persistence_cacheKey;

     protected WeavedAttributeValueHolderInterface _persistence_createUser_vh;

     protected WeavedAttributeValueHolderInterface _persistence_updateUser_vh;

     protected transient PropertyChangeListener _persistence_listener;

     protected FetchGroup _persistence_fetchGroup;

     protected transient boolean _persistence_shouldRefreshFetchGroup;

     protected transient Session _persistence_session;

     protected transient List _persistence_relationshipInfo;

}

*Category*:

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.

// Jad home page: http://www.kpdus.com/jad.html

// Decompiler options: packimports(3)

// Source File Name:   Category.java

import java.util.ArrayList;

import java.util.List;

import org.eclipse.persistence.indirection.ValueHolder;

import org.eclipse.persistence.indirection.WeavedAttributeValueHolderInterface;

import org.eclipse.persistence.internal.descriptors.PersistenceObject;

import org.eclipse.persistence.internal.weaving.*;

// Referenced classes of package com.zf.tolcalc.dao.domain:

//            DbObject, GearModel

public class Category extends DbObject

     implements PersistenceWeaved, PersistenceObject,
PersistenceWeavedFetchGroups, PersistenceWeavedLazy,
PersistenceWeavedChangeTracking, PersistenceWeavedRest

{

     public Category()

     {

         id = Long.valueOf(0L);

         name = "";

         comment = "";

         gearModel = null;

         workBooks = new ArrayList();

     }

     public Category(Long id)

     {

         this.id = Long.valueOf(0L);

         name = "";

         comment = "";

         gearModel = null;

         workBooks = new ArrayList();

         this.id = id;

     }

     public Long getId()

     {

         return _persistence_get_id();

     }

     public void setId(Long id)

     {

         _persistence_set_id(id);

     }

     public String getName()

     {

         return _persistence_get_name();

     }

     public void setName(String name)

     {

         _persistence_set_name(name);

     }

     public String getComment()

     {

         return _persistence_get_comment();

     }

     public void setComment(String comment)

     {

         _persistence_set_comment(comment);

     }

     public GearModel getGearModel()

     {

         return _persistence_get_gearModel();

     }

     public void setGearModel(GearModel gearModel)

     {

         _persistence_set_gearModel(gearModel);

     }

     public List getWorkbooks()

     {

         return _persistence_get_workBooks();

     }

     public void setWorkbooks(List workBooks)

     {

         _persistence_set_workBooks(workBooks);

     }

     public int getWorkbooksCount()

     {

         return getWorkbooks().size();

     }

     public boolean differs(Category obj)

     {

         if(!getName().equals(obj.getName()))

             return true;

         if(!getComment().equals(obj.getComment()))

             return true;

         if(getGearModel() != null)

         {

             if(obj.getGearModel() == null)

                 return true;

             if(getGearModel().getId().longValue() !=
obj.getGearModel().getId().longValue())

                 return true;

         } else

         if(obj.getGearModel() != null)

             return true;

         return false;

     }

     public boolean equals(Object obj)

     {

         if(obj instanceof Category)

             return ((Category)obj).getId().longValue() == getId().longValue();

         else

             return super.equals(obj);

     }

     public Object _persistence_post_clone()

     {

         super._persistence_post_clone();

         if(_persistence_gearModel_vh != null)

             _persistence_gearModel_vh =
(WeavedAttributeValueHolderInterface)_persistence_gearModel_vh.clone();

         if(_persistence_createUser_vh != null)

             _persistence_createUser_vh =
(WeavedAttributeValueHolderInterface)_persistence_createUser_vh.clone();

         if(_persistence_updateUser_vh != null)

             _persistence_updateUser_vh =
(WeavedAttributeValueHolderInterface)_persistence_updateUser_vh.clone();

         _persistence_listener = null;

         _persistence_fetchGroup = null;

         _persistence_session = null;

         _persistence_primaryKey = null;

         return this;

     }

     public Object _persistence_new(PersistenceObject persistenceobject)

     {

         return new Category(persistenceobject);

     }

     public Category(PersistenceObject persistenceobject)

     {

         super(persistenceobject);

     }

     public Object _persistence_get(String s)

     {

         if(s == "id")

             return id;

         if(s == "workBooks")

             return workBooks;

         if(s == "gearModel")

             return gearModel;

         if(s == "name")

             return name;

         if(s == "comment")

             return comment;

         else

             return super._persistence_get(s);

     }

     public void _persistence_set(String s, Object obj)

     {

         if(s == "id")

         {

             id = (Long)obj;

             return;

         }

         if(s == "workBooks")

         {

             workBooks = (List)obj;

             return;

         }

         if(s == "gearModel")

         {

             gearModel = (GearModel)obj;

             return;

         }

         if(s == "name")

         {

             name = (String)obj;

             return;

         }

         if(s == "comment")

         {

             comment = (String)obj;

             return;

         } else

         {

             super._persistence_set(s, obj);

             return;

         }

     }

     public Long _persistence_get_id()

     {

         _persistence_checkFetched("id");

         return id;

     }

     public void _persistence_set_id(Long long1)

     {

         _persistence_checkFetchedForSet("id");

         _persistence_propertyChange("id", id, long1);

         id = long1;

     }

     public List _persistence_get_workBooks()

     {

         _persistence_checkFetched("workBooks");

         return workBooks;

     }

     public void _persistence_set_workBooks(List list)

     {

         _persistence_checkFetchedForSet("workBooks");

         _persistence_propertyChange("workBooks", workBooks, list);

         workBooks = list;

     }

     protected void _persistence_initialize_gearModel_vh()

     {

         if(_persistence_gearModel_vh == null)

         {

             _persistence_gearModel_vh = new ValueHolder(gearModel);

             _persistence_gearModel_vh.setIsNewlyWeavedValueHolder(true);

         }

     }

     public WeavedAttributeValueHolderInterface _persistence_get_gearModel_vh()

     {

         _persistence_initialize_gearModel_vh();

         if(_persistence_gearModel_vh.isCoordinatedWithProperty() ||
_persistence_gearModel_vh.isNewlyWeavedValueHolder())

         {

             GearModel gearmodel = _persistence_get_gearModel();

             if(gearmodel != _persistence_gearModel_vh.getValue())

                 _persistence_set_gearModel(gearmodel);

         }

         return _persistence_gearModel_vh;

     }

     public void
_persistence_set_gearModel_vh(WeavedAttributeValueHolderInterface
weavedattributevalueholderinterface)

     {

         _persistence_gearModel_vh = weavedattributevalueholderinterface;

         if(weavedattributevalueholderinterface.isInstantiated())

         {

             GearModel gearmodel = _persistence_get_gearModel();

             Object obj = weavedattributevalueholderinterface.getValue();

             if(gearmodel != obj)

                 _persistence_set_gearModel((GearModel)obj);

         } else

         {

             gearModel = null;

         }

     }

     public GearModel _persistence_get_gearModel()

     {

         _persistence_checkFetched("gearModel");

         _persistence_initialize_gearModel_vh();

         gearModel = (GearModel)_persistence_gearModel_vh.getValue();

         return gearModel;

     }

     public void _persistence_set_gearModel(GearModel gearmodel)

     {

         _persistence_checkFetchedForSet("gearModel");

         _persistence_initialize_gearModel_vh();

         gearModel = (GearModel)_persistence_gearModel_vh.getValue();

         _persistence_propertyChange("gearModel", gearModel, gearmodel);

        gearModel = gearmodel;

         _persistence_gearModel_vh.setValue(gearmodel);

     }

     public String _persistence_get_name()

     {

         _persistence_checkFetched("name");

         return name;

     }

     public void _persistence_set_name(String s)

     {

         _persistence_checkFetchedForSet("name");

         _persistence_propertyChange("name", name, s);

         name = s;

     }

     public String _persistence_get_comment()

     {

         _persistence_checkFetched("comment");

         return comment;

     }

     public void _persistence_set_comment(String s)

     {

         _persistence_checkFetchedForSet("comment");

         _persistence_propertyChange("comment", comment, s);

         comment = s;

     }

     private Long id;

     private String name;

     private String comment;

     private GearModel gearModel;

     private List workBooks;

     static final long serialVersionUID = 0x85fedc825ff78787L;

     protected WeavedAttributeValueHolderInterface _persistence_gearModel_vh;

}

Mit freundlichen Grüssen / With best regards

Steffen Herter

Finanzen, Controlling, IT ZF-Konzern/Finance, Controlling, IT ZF Group

Informatik ZF-Konzern/Information Technology ZF Group

FC Engineering Applikationen ZF-Konzern/FC Engineering Application ZF Group

ZF Friedrichshafen AG

D-88038 Friedrichshafen, Deutschland/Germany

Telefon/Phone +49 -7541 77-8801, Telefax/Fax +49 7541 77-908801

mailto:steffen.herter@xxxxxx

Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr.
Giorgio Behr

Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr.
Konstantin Sauer, Jürgen Holeksa, Michael Hankel, Wilhelm Rehm, Rolf Lutz

Sitz/Headquarters: Friedrichshafen

Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the
municipal court of Ulm HRB 630206

-----Ursprüngliche Nachricht-----
Von: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] Im Auftrag von Tom Ware
Gesendet: Donnerstag, 23. Mai 2013 14:55
An: eclipselink-users@xxxxxxxxxxx
Betreff: Re: [eclipselink-users] probloem with static weaving and eclipselink
@transient

We weave more than just relationships.  There are a whole sequence of things we
weave.  Without an idea of what the whole source of Category (and DBObject) is
and exactly what is happening in your application that gets you to the point
where the value is different all we can do is guess what is happening.  The more
information you can post, the more likely you are to get relevant help.

On 23/05/2013 8:49 AM, steffen.herter@xxxxxx <mailto:steffen.herter@xxxxxx> wrote:

 > there is no weaved code inside the abstract class DbObject because there is
no onetoone or manytoone relation.

 > The class Category has a manytoone relation. But the weaved code is in the
associated class.

 >

 > Mit freundlichen Grüssen / With best regards Steffen Herter Finanzen,

 > Controlling, IT ZF-Konzern/Finance, Controlling, IT ZF Group

 > Informatik ZF-Konzern/Information Technology ZF Group FC Engineering

 > Applikationen ZF-Konzern/FC Engineering Application ZF Group

 >

 > ZF Friedrichshafen AG

 > D-88038 Friedrichshafen, Deutschland/Germany Telefon/Phone +49 -7541

 > 77-8801, Telefax/Fax +49 7541 77-908801 mailto:steffen.herter@xxxxxx

 > Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board:

 > Prof. Dr. Giorgio Behr Vorstand/Board of Management: Dr. Stefan Sommer

 > (Vorsitzender/CEO), Dr. Konstantin Sauer, Jürgen Holeksa, Michael

 > Hankel, Wilhelm Rehm, Rolf Lutz

 > Sitz/Headquarters: Friedrichshafen

 > Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of

 > the municipal court of Ulm HRB 630206

 >

 >

 > -----Ursprüngliche Nachricht-----

 > Von: eclipselink-users-bounces@xxxxxxxxxxx
<mailto:eclipselink-users-bounces@xxxxxxxxxxx>

 > [mailto:eclipselink-users-bounces@xxxxxxxxxxx] Im Auftrag von Tom Ware

 > Gesendet: Donnerstag, 23. Mai 2013 14:43

 > An: EclipseLink User Discussions

 > Betreff: Re: [eclipselink-users] probloem with static weaving and

 > eclipselink @transient

 >

 > Any decompiler should be able to decompile your weaved class file.  If you
can't tell by looking at it, please post the decompiled source.

 >

 > On 23/05/2013 8:38 AM, steffen.herter@xxxxxx <mailto:steffen.herter@xxxxxx>
wrote:

 >> Don't know!

 >>

 >> Mit freundlichen Grüssen / With best regards Steffen Herter Finanzen,

 >> Controlling, IT ZF-Konzern/Finance, Controlling, IT ZF Group

 >> Informatik ZF-Konzern/Information Technology ZF Group FC Engineering

 >> Applikationen ZF-Konzern/FC Engineering Application ZF Group

 >>

 >> ZF Friedrichshafen AG

 >> D-88038 Friedrichshafen, Deutschland/Germany Telefon/Phone +49 -7541

 >> 77-8801, Telefax/Fax +49 7541 77-908801 mailto:steffen.herter@xxxxxx

 >> Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board:

 >> Prof. Dr. Giorgio Behr Vorstand/Board of Management: Dr. Stefan

 >> Sommer (Vorsitzender/CEO), Dr. Konstantin Sauer, Jürgen Holeksa,

 >> Michael Hankel, Wilhelm Rehm, Rolf Lutz

 >> Sitz/Headquarters: Friedrichshafen

 >> Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of

 >> the municipal court of Ulm HRB 630206

 >>

 >>

 >> -----Ursprüngliche Nachricht-----

 >> Von: eclipselink-users-bounces@xxxxxxxxxxx
<mailto:eclipselink-users-bounces@xxxxxxxxxxx>

 >> [mailto:eclipselink-users-bounces@xxxxxxxxxxx] Im Auftrag von Tom

 >> Ware

 >> Gesendet: Donnerstag, 23. Mai 2013 14:31

 >> An: eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

 >> Betreff: Re: [eclipselink-users] probloem with static weaving and

 >> eclipselink @transient

 >>

 >> Can you tell what is wrong by decompiling your weaved classes?

 >>

 >> On 23/05/2013 4:06 AM, steffen.herter@xxxxxx <mailto:steffen.herter@xxxxxx>
wrote:

 >>> Hello,

 >>>

 >>> Infrastructure:

 >>>

 >>> Java 1.7

 >>>

 >>> Eclipselink 2.4

 >>>

 >>> JPA 2.0.1

 >>>

 >>> Tomcat 7

 >>>

 >>> Problem:

 >>>

 >>> Activated Static weaving in my Application with Maven:

 >>>

 >>> <build>

 >>>

 >>> <plugins>

 >>>

 >>> <plugin>

 >>>

 >>> <artifactId>_eclipselink_-_staticweave_-_maven_-_plugin_</artifactId

 >>> >

 >>>

 >>> <groupId>au.com.alderaan</groupId>

 >>>

 >>> <version>1.0.4</version>

 >>>

 >>> <executions>

 >>>

 >>> <execution>

 >>>

 >>> <goals>

 >>>

 >>> <goal>weave</goal>

 >>>

 >>> </goals>

 >>>

 >>> <phase>install</phase>

 >>>

 >>> <configuration>

 >>>

 >>> <logLevel>ALL</logLevel>

 >>>

 >>> <includeProjectClasspath>true</includeProjectClasspath>

 >>>

 >>> </configuration>

 >>>

 >>> </execution>

 >>>

 >>> </executions>

 >>>

 >>> <dependencies>

 >>>

 >>> <dependency>

 >>>

 >>> <groupId>org.eclipse.persistence</groupId>

 >>>

 >>> <artifactId>_eclipselink_</artifactId>

 >>>

 >>> <version>2.4.0</version>

 >>>

 >>> </dependency>

 >>>

 >>> </dependencies>

 >>>

 >>> </plugin>

 >>>

 >>> </plugins>

 >>>

 >>> </build>

 >>>

 >>> Superclass:

 >>>

 >>> @MappedSuperclass

 >>>

 >>> *abstract**public**class*DbObject

 >>>

 >>> {

 >>>

 >>> .

 >>>

 >>> /** indicates if the object is valid (e.g. successfully loaded from

 >>> database) or not **/

 >>>

 >>> @Transient

 >>>

 >>> *private**boolean*valid= *true*;

 >>>

 >>> .

 >>>

 >>> }

 >>>

 >>> Class:

 >>>

 >>> @Entity

 >>>

 >>> *public**class*Category *extends*DbObject

 >>>

 >>> {

 >>>

 >>> .

 >>>

 >>> }

 >>>

 >>> In My Manmged bean i've the following output with and without weaving:

 >>>

 >>> 1.

 >>>

 >>> weaving *inactive*

 >>>

 >>> is Category valid?:*true*

 >>>

 >>> 2.

 >>>

 >>> weaving *active*

 >>>

 >>> is Category valid?:*false*

 >>>

 >>> **

 >>>

 >>> *the valid variable is never been touched!*

 >>>

 >>> **

 >>>

 >>> *What I the cause for the change of the valid varible when weaving

 >>> is

 >>> activated???*

 >>>

 >>> Thanks and regards steffen

 >>>

 >>>

 >>>

 >>> _______________________________________________

 >>> eclipselink-users mailing list

 >>> eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

 >>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users

 >>>

 >> _______________________________________________

 >> eclipselink-users mailing list

 >> eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

 >> https://dev.eclipse.org/mailman/listinfo/eclipselink-users

 >> _______________________________________________

 >> eclipselink-users mailing list

 >> eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

 >> https://dev.eclipse.org/mailman/listinfo/eclipselink-users

 >>

 > _______________________________________________

 > eclipselink-users mailing list

 > eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

 > https://dev.eclipse.org/mailman/listinfo/eclipselink-users

 > _______________________________________________

 > eclipselink-users mailing list

 > eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

 > https://dev.eclipse.org/mailman/listinfo/eclipselink-users

 >

_______________________________________________

eclipselink-users mailing list

eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

https://dev.eclipse.org/mailman/listinfo/eclipselink-users



_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top