Announcement Announcement Module
Collapse
No announcement yet.
SLSB support: dynamic JNDI settings Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SLSB support: dynamic JNDI settings

    Hi,

    I work on a distributed application in which each client (Swing-based GUI) can access several remote appservers implementing SLSBs. I'd like to leverage Spring SLSB support by using SimpleRemoteStatelessSessionProxyFactoryBean.

    My problem is that clients receive the system topology (including the JNDI settings of the servers) at runtime. Is there a way to dynamically set these properties, in order for the Spring proxies to call the right appserver ?

    Thanks for answering. Regards,
    Baptiste

  • #2
    Delay your initialization of Spring (ApplicationContext or BeanFactory) to after the client receives the topology, then you can easily implement a BeanFactoryPostProcessor that replaces tokens (something like ${jndi_url} ) in the definition file at runtime.

    See PropertyPlaceholderConfigurer.java for a sample.

    Comment

    Working...
    X