Yeah, I am using composite value objects also for two screens in which i am putting collection objects into a java bean,as regards to my requirement i have to show the data on the screens based on some search criteria....the concern for large value objects bothers me when i have to populate each property using the setProperty methods of the javabean from the resultset...the populate method becomes very large...
Also i wanted to know is putting the ejb home in a session is good or not.
Thanks
Don't worry about the number of set methods.. hei if you have to display a lots of information at on one screen, thats the way to do it... setters are extremely fast
about the EJBs... if you wan't to be able to store reference to a particular EJB object:
* if you are using remote interface - I would recommend storing serialized handle intead of the home object (don't serialize it to String is in one example in J2EE Core Patterns book - use byte[] instead)
* if you are using local beans - store local references in session
IF you all you want to do is cache ejb home objects - take a look at the ServiceLocator pattern (one of the original J2EE Core Patterns, can be found at the patterns section on java.sun.com), and use a HashMap inside of it to store home objects, keyed by JNDI names..