[EJB 3.0] - Re: @SecondaryTable
by NigelWhite
I'm trying the composite entity the other way round now.
I have a "Contact" entity which contains the contact details for a Person at a location. ie. job title, email, phone number etc.
The Contact links to the Person entity which contains personal details.
So on the Contact entity, there is an @ManyToOne Person. And so on the Contact table there is a person_id field pointing to the Person row.
I'm trying to have Contact as the primary Table, and pulling Person as the secondary table using
@SecondaryTable(name="Person",
pkJoinColumns=@PrimaryKeyJoinColumn(name="id",
referencedColumnName="person_id"))
It's just a basic join on person_id->Person.id, but the config doesn't like it, I get
| org.hibernate.AnnotationException: SecondaryTable JoinColumn cannot reference a non primary key
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054020#4054020
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054020
18Â years, 11Â months
[JBoss jBPM] - I need the package
by yave.guadano
hi.
here:
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
public class XorJoinHandler implements JoinHandler {
public void join(JoinContext joinContext) throws ExecutionException {
// if there is really an arriving token
if ( joinContext.getConcurrentTokens().size() != 0 ) {
//get other tokens than the arriving token
Collection brotherTokens = joinContext.getConcurrentTokens().values();
// get the token arriving in this join Token arrivingToken = joinContext.getToken();
//cancel all living brother tokens...
Iterator iter = brotherTokens.iterator();
while(iter.hasNext()){
Token token = (Token) iter.next();
// ExecutionService es = JbpmServiceFactory.getInstance().openExecutionService(token.getActorId()); // the line above resulted in infinite waits to some jdbc-lock method (I'm using postgres). This
// works for me and looks "cleaner" to me
ExecutionService es = joinContext.getExecutionService(token.getActorId()); es.cancelToken(token.getId());
}
// reactivate the parent token.
joinContext.reactivateToken( arrivingToken.getParent() );
}
}
}
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
i need the package org.jbpm.delegation, because i must import the class JoinHandler and someones more.
can anyone help me? can anyone send me some .jar?
thanks
Yavé Guadaño
mail to yave.guadano(a)degesys.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054016#4054016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054016
18Â years, 11Â months
[JBoss Seam] - understanding application scoped components in a cluster
by codelion
Making sure I get this right:
An application scoped component is good e.g. to keep settings. It has the same contents on all machines in a cluster. Nice magic working for us inside JBoss.
Now if I change (i.e. code changes) the value of a member field it will be available on all machines in the cluster, right?
Now if that application scoped component e.g. contains a map (e.g. LinkedHashMap), and the map contains settings (entity beans in memory), which contain a name and a value (logically pairs), and if I change (i.e. code changes) the value in a setting object, will that be available on all machines in the cluster?
The question is, how far into that tree from the component to its map to the settings does that replication work? Anywhere in the tree? (Assuming replication is the right word, is it?)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054013#4054013
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054013
18Â years, 11Â months