Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8385433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:40:08+00:00 2026-06-09T17:40:08+00:00

I am using spring portlet mvc as my front end and connecting to some

  • 0

I am using spring portlet mvc as my front end and connecting to some remote EJB running on a WAS. Now in my configuration file for the portlet where I specify the remote EJB lookup url, I have specified the url(s) as a cluster since the EJB is deployed in a clustered WAS. So the url looks like :iiop://server1:port,iiop://server2:port.

Now to save resources, spring mvc caches the initial context.Now I am noticing that spring is always able to make a connection to the remote ejb so long as one of the servers is up.

This is confusing to me since the cluster is resolved(for lack of a better word) at the time of lookup of the initial context and after that if the cluster member goes down, there should be a connection exception. So how does spring know when it should automatically refresh its initial context because the old context has become stale?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:40:10+00:00Added an answer on June 9, 2026 at 5:40 pm

    I found that in the applicationContext.xml file, there is the declaration:

    <jee:remote-slsb id="remoteService" jndi-name="com.business.ejb.ServiceSLRemote" business-interface="com.business.ejb.ServiceSLRemote" cache-home="true" lookup-home-on-startup="false" resource-ref="false" refresh-home-on-connect-failure="true">
    <jee:environment>
    java.naming.factory.initial=${JAVA.NAMING.FACTORY.INITIAL}
    java.naming.provider.url=${JAVA.NAMING.PROVIDER.URL}
    </jee:environment>
    </jee:remote-slsb>
    

    It is the refresh-home-on-connect-failure="true" that tells the spring container that if the initial context has become stale, then it should refresh the connection. That is how it can work so long as one cluster member is active.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Spring 3 Portlet MVC. Validation/binding in just MVC should be the same.
Is it possible to dynamically set a Spring MVC portlet:actionURL portlet:param using javascript? I
I want to make spring MVC 3.0.3 portlet using DispatcherPortlet class With JSON support.
im using spring MVC and webflow to create a game server and serve some
I am using spring mvc portlet for one of my applications. I have a
I have a portlet application. It is configured using Spring framework IoC container. I
I am trying to write a portlet for Liferay (using Tomcat and Spring) and
I am using spring mvc in my application,when i created user i have to
I am using Spring MVC 3.1.x with Tiles 2.2.2 (bootstrapped project with Roo) and
I am using Spring MVC with Hibernate. My page has a button that creates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.