Results 1 to 4 of 4

Thread: Letting Spring go on even though EJB can not be invoked

  1. #1
    Join Date
    Sep 2004
    Location
    USA
    Posts
    27

    Default Letting Spring go on even though EJB can not be invoked

    Hi,

    I have configured a EJB session bean "myBean" using the
    org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean.

    Its properties are set as:

    <property name="jndiName">
    <value>ejb/*my name*</value>
    </property>
    <property name="businessInterface">
    <value>*my class*</value>
    </property>
    <property name="jndiEnvironment">
    <ref bean=*myJNDI.properties*/>
    </property>

    This is not a critical EJB remote for the app. The problem is that when
    application starts and when EJB server is down application will not start
    because this bean can not be instantiated.

    Is there any way that I can let application go on without this bean being instantiated. It is used for trivial purposes and the application can live without it being instantiated.

    Thank you,
    Edmon

  2. #2
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    You can set the bean attribute lazy-init to true. It won't be initialized until retrieved from the context.

  3. #3
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Besieds that, setting "lookupHomeOnStartup" to "false" might also be worth a try. I successfully used this approach in a similar scenario.

    Regards,
    Andreas

  4. #4
    Join Date
    Sep 2004
    Location
    USA
    Posts
    27

    Default lookupHomeOnStartup

    Quote Originally Posted by Andreas Senft
    Besieds that, setting "lookupHomeOnStartup" to "false" might also be worth a try. I successfully used this approach in a similar scenario.

    Regards,
    Andreas
    Thank you.

    Setting:

    <bean id="myBean" lazy-init="true" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
    <property name="lookupHomeOnStartup" value="false"/>
    ...
    </bean>

    did the trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •