Dec 5th, 2005, 12:17 PM
Programmatically setting target location?
I have been fighting JBoss and Glassfish for a while now, and I am hoping that Spring is the magic bullet. I read through the reference this weekend, so hopefully I'm not being completely new.
My application will have a remote java client which will need to access components on the server through RMI or web services. The problem is that the server location changes with the customer, so it is entered by the user in the client. Is there a way to still leverage the lookup capabilities of Spring, but programmatically set the server location used for the lookup?
Jan 12th, 2006, 06:05 AM
Facing the same problem
I'm facing the same problem too, trying to remotely access a few 'mirror' servers where each have the same sets of EJBs. Am able to define the url for one of it in jnditemplate in the xml config file, but unable to change the URL thereafter because 'SimpleRemoteStatelessSessionProxyFactoryBean' properties are by definition only set once.
It seems subclassing SimpleRemoteStatelessSessionProxyFactoryBean or creating a completely new FactoryBean is the direction to take. My current thinking is to implement a factorybean that dynamically create a new business interface proxy given a URL string. Any suggestions ? Thanks.