Hi...

I managed to solve my problem with the xdoclet tags, but am now facing
further obstacles:

The database seems to have been created as appropriate, but when I try to
set a unidirectional field, it appears not to get updated in the db. The
following code extract illustrates this:

  /** @ejb:relation name="TargetState-Transition-Relation"
    *       role-name="transition-target"
    *       target-role-name="target-state-for-this-transition"
    *       target-ejb="State"
    *       target-multiple="yes"
    *  @ejb:interface-method view-type="local"
    *  @jboss:relation related-pk-field="stateID" fk-column="targetstate"
    */
   public abstract StateLocal getTargetState();

   /**@ejb:interface-method view-type="local"*/
   public abstract void setTargetState(StateLocal state);

   /**@ejb:interface-method view-type="remote"*/
   public void updateTargetState(State state) throws Exception
   {
     StateLocal ts=((StateLocal) ((StateLocalHome) (new 
InitialContext()).lookup("StateLocal")).findByPrimaryKey((StatePK) 
state.getPrimaryKey()));
     setTargetState(ts);
     System.out.println(ts);
     System.out.println("ts:"+getTargetState());
   }

When I call updateTargetState(...), the println prints the right thing.
However, if I call getTargetState() in a later method, I get null back.
Looking in the database, the field is always empty.

I've got another set of methods that operate in a similar manner, they
also never seem to update the database.

Also a hopefully unrelated problem that is appearing is that I get

java.rmi.ServerException: Internal error getting results for field member
contextID

errors at random intervals when trying to use some of my methods. This
error appears only sporadically. contextID is a java object (which does
extend java.io.Serializable), and is stored as a bytea type within the
database.

My backend db is postgresql 7.2.1, and I'm running jBoss 3.0.0.

Any and all help will be greatly appreciated
Nir Oren






-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to