[jboss-user] [Microcontainer] - OneToMany relationships

clebert.suconic@jboss.com do-not-reply at jboss.com
Mon Jan 28 16:32:18 EST 2008


I'm looking for a way to remove/add items on a list according to deployment/undeployment. It might be documented somewhere, but it wasn't obvious how to do it by looking at docs.

Example:

"You have a Bean Employee with Addresses. Employee will have add/remove methods for Address (addAddress(Address), removeAddress(Address))."

As soon as Address is deployed, Employee would know about its list of Addresses.

The simple way of doing this would be Adress to call Employee.add(this). But it would be better to do it automatically, so I don't need to trust users to do it.

Is there an example similar to this?


Thanks,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124193#4124193

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124193



More information about the jboss-user mailing list