How can one dynamically figure out what EJBs exist in an app server and make calls on them (presumably, using reflection)?
One approach is to read the ejb-jar.xml descriptor. Using that, one can use their own class loader with the jar that the ejb-jar.xml came in and load the home and ejb classes and determine the methods for 'create' and for the actual bean methods. But, when one does a lookup to retrieve a home, and then attempts to make a method.invoke call, it doesn't work because in this case the classloader for the method being used is different than the classloader of the object that came from the lookup. (This presumes that the classes you are dynamically introspecting aren't directly in your classpath, thus the classloader trick above.) So this approach appears not to work. Is there another approach to this? Or is this just a lost cause (I can't imagine doing reflection on the results of a lookup to a home as that can be 'bout anything - a 'proxy' object for instance)? Are there and EJB generic ways to doing this or would it be completely appserver specific? Thanks, Joel =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
