JavaBean to JavaBean
I have a jsp application that uses 2 non-visual JavaBeans. One is an application scope and the other is a session scope. The beans are in separate jars. I would like to have the session bean be able to have the application bean do some work. Is there a way to have the session bean call a method in the application bean or use events? I have been reading about events and bound properties but nothing appears to address how to do this across beans in different jars.
Thannks in advance.
Bruce.
[512 byte] By [
Bruce_La] at [2007-11-27 9:58:24]

# 1
There's a library called Dozer that does bean-mapping. I don't know where it comes from, it's just one of our six squillion dependencies at work. Probably sourceforge.net
If the properties on both beans match by name, it's laughably simple to perform the mapping. I'm guessing that you want something a bit more lazy or flexible than simply having one bean invoke the other bean's methods directly. What is the actual scenario, and what do you mean by "session bean"? An EJB?
# 2
By "session", i mean that the useBean element in my jsp page that instantiates the bean uses a scope of session. The other bean uses an application scope.I am not familiar with bean mapping. I was thinking of other options. I will have to research this. Thanks.