Announcement Announcement Module
Collapse
No announcement yet.
Accessing ejbs protected with declarative security Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing ejbs protected with declarative security

    Hi all,

    I posted this on the EJB forum, but got no response. I am reposting here for the sake of good semantics.

    I have a SimpleRemoteStatelessSessionProxyFactoryBean to an EJB deployed in WL8. This EJB is protected using declarative security.

    This is a legacy component, and cannot be changed whatsoever.

    I also have a spring bean that must use the services provided by this EJB.

    Whenever I try to access this EJB, I get an obvious RemoteAccessException.

    What's the best way to get through declarative security in this case? Is Acegi needed? Is there a simpler approach?

    Please help. My deadlines are getting closer, and so is the guillotine.

    J.

  • #2
    Hi,

    Can't you just use WL8's container security? Presumable other users of the EJB must be doing this? I don't think the Spring proxy bean should make any difference. Do you have container security configured?

    Luke.

    Comment


    • #3
      Configuring container security

      Originally posted by Luke
      Hi,

      Can't you just use WL8's container security? Presumable other users of the EJB must be doing this? I don't think the Spring proxy bean should make any difference. Do you have container security configured?

      Luke.
      Thank you for your reply

      That is what I have found on the net, but I do not know where to start. Could you give any links or info on how to do this? Or leastways how to start doing this?

      Thanks a lot.

      J.

      Comment


      • #4
        I guess BEA's web site would be the best place to look. This isn't really an acegi-related topic.

        Comment


        • #5
          Hi Luke.

          I have found a workaround for this issue, awkward as it may be.

          Given the following SSLSBProxyFactoryBean:

          Code:
          <!-- Proxy to Phoenix Legacy System Connector//-->
          		<bean id="phoenixConnectorService" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean" lazy-init="true">
          			<description>Proxy para accesar el conector a Legacy System Phoenix</description>
          			<property name="jndiName">
          				<value>ejb/conector/phoenix/PHXBcoHome</value>
          			</property>
          			<property name="businessInterface">
          				<value>com.ixe.treasury.middleware.phoenix.PhoenixService</value>
          			</property>
          			<property name="jndiTemplate">
          				<ref local="weblogicJndiTemplate" />
          			</property>
          		</bean>
          Note that a jndiTemplate property is wired to this bean. In the jndiTemplate you can provide the context initialization values, as well as the user principal, and the credentials for container authentication. JndiTemplate is just a wrapper for a properties object, just like instantiating an InitialContext.

          I am sure there is a better way to do this, but for now this is all I have. Any replies with additional info, or best practices will be most welcome.

          Thank you all for your follow-ups.

          J.

          Comment

          Working...
          X