Announcement Announcement Module
Collapse
No announcement yet.
invoking EJBs protected with declarative security Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • invoking EJBs protected with declarative security

    Hi all,

    I have a legacy EJB protected with declarative security deployed in WL8.1SP4. Only the user 'middleware' with role 'mw' can invoke this EJBs' methods. I am defining a proxyfactory for this EJB in my Spring context, and this proxies are being invoked by another spring-managed bean.

    How can I assign this user and role to my delegate bean for WL to accept these calls?

    What is the best way to do this?

    Thank you in advance.

    J.

  • #2
    Workaround for declarative security issue.

    Hi all.

    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.

    Regards.

    J.

    Comment


    • #3
      details please?

      Could you please provide more details on how you resolved this problem?

      Thanks

      Comment


      • #4
        How to specify the user principal

        At runtime how do you specify the user principal and credentials?

        Comment

        Working...
        X