Re: [concern-users] Transient values in subjects
Brought to you by:
hengels,
leonchiver
|
From: Manfred D. <mf...@ma...> - 2005-10-24 11:01:33
|
Holger,
Thank you for the quick answer.
I'm using hibernate for the object. Some attributes of the class are
mapped as hibernate properties. Another attribute of this class isn't
mapped to a persistent field. Here is an example of such a class (see
hibernate-xdoclet-tags for persistent fields):
/**
* Speicherung Dateien
*
* @hibernate.class
* table="FILES"
*/
public class LoadFile implements Serializable {
// Persistente Felder
private Integer fileId;
private String fileName;
// Transiente Felder
private String transientValue;
/**
* Objekt anlegen
*/
public LoadFile() {
super();
}
/**
* @return Returns the fileId.
*
* @hibernate.id
* column="FILE_ID"
* generator-class="hilo"
* unsaved-value="null"
* @hibernate.generator-param
* name="table"
* value="SEQUENCE_FILE"
* @hibernate.generator-param
* name="column"
* value="IDX"
*/
public Integer getFileId() {
return fileId;
}
/**
* @param fileId The fileId to set.
*/
public void setFileId(Integer fileId) {
this.fileId = fileId;
}
/**
* @return Returns the fileName.
*
* @hibernate.property
* column="FILE_NAME"
* length="256"
*/
public String getFileName() {
return fileName;
}
/**
* @param fileName The fileName to set.
*/
public void setFileName(String fileName) {
this.fileName = fileName;
}
/**
* @return Returns the transientValue
*/
public String getTransientValue() {
return this.transientValue;
}
/**
* @param transientValue The transientValue to set.
*/
public void setTransientValue(String transientValue) {
this.transientValue = transientValue;
}
}
I'm new to con:cern. So may be I didn't understand how to do some things
right.
Manfred
Am Montag, den 24.10.2005, 10:10 +0200 schrieb Holger Engels:
> Quoting Manfred Deutsch <mf...@ma...>:
>
> > Hello,
> >
> > 1) Is is possible to store transient values in subjects?
> >
> > I added a non persistant attribute to a subject. In an action I tried
> > to change the value of this attribute. The call to setValue
> > succeeded, but when it returned the value wasn't changed. Looks like
> > it was set to an proxy?
>
> I don't quite understand, what you mean here. Are you using hibernate and are
> you talking about a hibernate mapped property?
>
> > 2) I want to process a subject immediately from within a session bean
> > (JBoss). So I called subject.process(subjectId). The call throws a
> > ControllerException: transaction not allowed.
> > subject.announceSubject(...) at same place works fine.
> > How should I start immediate processing of a subject from within a
> > session bean?
>
> the call to process will run several transactions (one per activity).
> it is not
> allowed to run it from inside a running transaction. commit or suspend your
> transaction, before calling process.
>
> Holger
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> concern-users mailing list
> con...@li...
> https://lists.sourceforge.net/lists/listinfo/concern-users
|