How to configure MDB as Durable Subscriber

          I can't seem to find any documentation on how to set up an MDB as a Durable Subscriber.
          I tried using the Edit EJB Descriptor link in the console. I then drilled down
          to Message Driven Destination. For Subscription Durability, I selected Durable.
          I clicked Apply. I also went back to the jar and pressed the Persist button to
          "Persist changes made to the Descriptor(s)".
          I check the Topic to see if there were any Durable Subscribers listed. No. I bounced
          the server. Still no.
          What am I missing? The only info I can find in the documentation about setting
          up Durable Subscriptions is via the JMS API (http://e-docs.bea.com/wls/docs61/jms/implement.html#1097632)
          Using WL v6 SP5, not clustered.
          Any help would be appreciated.
          Jim
          

Hi James,
          I'm unfamiliar with the console ejb xml editor. I suggest
          posting to the ejb newsgbroup, which is more familiar
          with these things. Meanwhile, the attached notes
          and the following example may help if your willing
          to hand-edit the xml.
          Tom, BEA
          <ejb-jar>
          <enterprise-beans>
          <message-driven>
          <ejb-name>exampleMessageDrivenA</ejb-name>
          <ejb-class>MessageBean</ejb-class>
          <transaction-type>Container</transaction-type>
          <message-driven-destination>
          <destination-type>javax.jms.Queue</destination-type>
          <!--
          <destination-type>javax.jms.Topic</destination-type>
          <subscription-durability>Durable</subscription-durability>
          -->
          </message-driven-destination>
          </message-driven>
          </enterprise-beans>
          <assembly-descriptor>
          <container-transaction>
          <method>
          <ejb-name>exampleMessageDrivenA</ejb-name>
          <method-name>onMessage()</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
          </container-transaction>
          </assembly-descriptor>
          </ejb-jar>
          <!-- Sample MessageDriven bean Weblogic deployment descriptor -->
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>exampleMessageDrivenA</ejb-name>
          <message-driven-descriptor>
          <pool>
          <max-beans-in-free-pool>5</max-beans-in-free-pool>
          <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
          </pool>
          <!--
          <destination-jndi-name>quotestopic</destination-jndi-name>
          -->
          <destination-jndi-name>MDBQ</destination-jndi-name>
          <!--
          <provider-url>t3://localhost:10001</provider-url>
          <connection-factory-jndi-name>cf3</connection-factory-jndi-name>
          <jms-client-id>cid444</jms-client-id>
          -->
          </message-driven-descriptor>
          <jndi-name>someid</jndi-name>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>
          James Goodwin wrote:
          > I can't seem to find any documentation on how to set up an MDB as a Durable Subscriber.
          > I tried using the Edit EJB Descriptor link in the console. I then drilled down
          > to Message Driven Destination. For Subscription Durability, I selected Durable.
          > I clicked Apply. I also went back to the jar and pressed the Persist button to
          > "Persist changes made to the Descriptor(s)".
          >
          > I check the Topic to see if there were any Durable Subscribers listed. No. I bounced
          > the server. Still no.
          >
          > What am I missing? The only info I can find in the documentation about setting
          > up Durable Subscriptions is via the JMS API (http://e-docs.bea.com/wls/docs61/jms/implement.html#1097632)
          >
          > Using WL v6 SP5, not clustered.
          >
          > Any help would be appreciated.
          >
          > Jim
          A durable topic subscriber MDB uses its name to generate its client-id.
          Since JMS enforces uniqueness on this client-id, this means that if a durable
          subscriber MDB is deployed to multiple servers only one server will be able
          to connect. Some applications want a different behavior where
          each MDB pool on each server gets its own durable subscription.
          The MDB durable subscription id, which must be unique on its topic, comes from:
          1) <jms-client-id>MyClientID</jms-client-id>
          (the weblogic dtd)
          2) if (1) is not set then the client-id
          comes from the ejb name.
          The durable subscription is uniquely identified within a cluster by a
          combination of "connection-id" and "subscription-id". Only one active
          connection may use a particular "connection-id" within a WebLogic cluster.
          The connection id comes from:
          1) The "ClientId" attribute configured on the WebLogic connection factory.
          This defaults to null. Note that if the ClientId is set on a connection
          factory, only one connection created by the factory
          may be active at a time.
          2) If (1) is not set, then, as with the subscriber-id,
          the connection-id is derived from jms-client-id descriptor attribute:
          <jms-client-id>MyClientID</jms-client-id>
          (the weblogic dtd)
          3) If (1) and (2) are not set, then, as with the subscriber-id,
          the connection-id is derived from the ejb name.
          Work-around:
          A) Create a custom connection-factory for each server:
          1) configure "JNDIName" to the same value across all servers
          ("myMDBCF" in this example)
          2) configure "ClientId" to a unique value per server
          3) enable "UserTransactionsEnabled"
          4) enable "XAConnectionFactoryEnabled"
          5) set "AcknowledgePolicy" to "ACKNOWLEDGE_PREVIOUS"
          6) target the CF at a single WebLogic server
          (Number 5 is required for non-transactional topic MDBs)
          B) In the MDB's weblogic-ejb-jar.xml descriptor, set the MDB's connection
          factory to the JNDI name of the custom connection factories configured in
          (A). Optionally, also specify the subscriber-id via the jms-client-id
          attribute.
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>exampleBean</ejb-name>
          <message-driven-descriptor>
          <connection-factory-jndi-name>myMDBCF</connection-factory-jndi-name>
          <jms-client-id>myClientID</jms-client-id>
          </message-driven-descriptor>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>
          C) Target the application at the same servers that have the custom connection
          factories targeted at them.
          Notes/Limitations:
          1) If the MDB is moved from one server to another, the MDB's corresponding
          connection-factory must be moved with it.
          2) This work-around will not work if the destination is not in the same
          cluster as the MDB. (The MDB can not use the local connection factory, which
          contains the connection-id, as connection factories do not work unless they
          are in the same cluster as the destination.)
          3) This work-around will not work for non-WebLogic JMS topics.
          

Similar Messages

  • JMS - How to configure incremental redelivery intervals for an MDB

    Hi all,
    I noticed that when message delivery in an MDB fails, the time to the next delivery attempt for the message increases with every failed delivery. The intervals are 5, 10, 20, 40 and 60 seconds. After this the interval stays at 60 seconds.
    Now I was trying to find out how to change this behavior, but did not find the appropriate configuration elements in the console or the documentation. What I found are the options to configure "Default Redelivery Delay" in the ConnectionFactory which is set to 0 and in the Queue "Redelivery Delay Override" which is set to -1.
    Both of these settings do not explain the incremental delay. Can anyone tell me how to configure this? Is that part of the MDB deployment descriptors?
    Thanks,
    Chris

    Hi Tom,
    thanks again for your answer :-) I am sorry, i forgot to mention in my initial post, that i had a look at those parameters. But according to the documentation the default values for both are 60 seconds. In my MDB i did not set any of those, so it should not start at 5 seconds like it does but at 60 seconds. Additionally this suspension, I if understood correctly, should only kick in if the JMS resource (I figure this is the queue in this case) is unavailable, which is not the case in my scenario. And as a third the suspension described there is not growing exponentially as I experienced.
    Sorry if I am just thick here, but the documentation just does not look like what I am looking for. Are there any misunderstandings on my side?
    Thanks, Chris

  • Durable Subscriber MDB

    Getting the following error when creating a durable subscriber MDB to FioranoMQ:
    2/24/04 10:50 AM Error listening to 'Fiorano JMS Topic : CACHELOCALHOST'
    java.lang.InstantiationException: Error: null
         at com.evermind.server.jms.OrionServerSessionPool.getServerSessionFull(OrionServerSessionPool.java:433)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:882)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
         at java.lang.Thread.run(Thread.java:534)
    I have a standalone subscriber that works so I'm pretty sure this isn't a Fiorano issue.
    Anyone had any luck in this type of situation?

    Which versin of the appserver are using? MDB support for 3rd party JMS providers will only be supported in the next version of the appserver.

  • Durable subscriber configured for the topic - reconnect policy

    Hi,
    we have Durable subscriber configured for the topic. When ever the managed server associated with the Topic is restarted, we have to restart subscriber to receive the messages again.
    we did tried using the reconnect policy to all , still we have same issue, could you please provide your suggestions.
    Susbcriber is not throwing the connect exception as well,when ever the managed server goes down also.
    thanks
    ARun

    I would suggest, if you have done so, that you set an Exception listener on the connection, or on the session using WLS extension interface, so that your client will get Exception on server failure and refresh the JMS objects (connection/session/subscriber).

  • How to configure Queue and QueueConnectionFactory for a MDB

    Hi *,
    I want to send some messages from a session bean to a message driven bean. Therefore I'll use the default Queue (sapDemoQueue) and QueueConnectionFactory.
    In the ServiceLocator of my SessionBean I do the lookup with following methods:
        public QueueConnectionFactory getQueueConnectionFactory() throws NamingException {
            if (queueConnectionFactory == null) {
                Object obj = ctx.lookup("jmsfactory/default/QueueConnectionFactory");
                queueConnectionFactory = (QueueConnectionFactory) obj;
            return queueConnectionFactory;
        public Queue getQueue() throws NamingException {
            if (queue == null) {
                Object obj = ctx.lookup("jmsqueues/default/sapDemoQueue");
                queue = (Queue) obj;
            return queue;
    My Message Driven Bean is configure as followed:
    ejb-jar.xml:
    <message-driven>
      <ejb-name>ExportBean</ejb-name>
      <ejb-class>de.test.ejb.abschluss.ExportBean</ejb-class>
      <transaction-type>Container</transaction-type>
      <message-driven-destination>
        <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>
    </message-driven>
    ejb-j2ee-engine.xml:
    <enterprise-bean>
      <ejb-name>ExportBean</ejb-name>
      <message-props>
        <destination-name>jmsqueues/default/sapDemoQueue</destination-name>
        <connection-factory-name>jmsfactory/default/QueueConnectionFactory</connection-factory-name>
      </message-props>
    </enterprise-bean>
    I also create a jms-factories.xml and a jms-destination.xml.
    EAR-Project/META-INF/jms-factories.xml:
    <jms-factories>
      <connection-factory>
        <factory-name>jmsfactory/default/QueueConnectionFactory</factory-name>
        <context-factory-type>
          <link-factory-name>jmsfactory/default/QueueConnectionFactory</link-factory-name>
          <initial-context-factory>com.sap.engine.services.jndi.InitialContextFactoryImpl</initial-context-factory>
          <provider-url>localhost</provider-url>
          <security-principal>Administrator</security-principal>
        </context-factory-type>
        <client-id></client-id>
      </connection-factory>
    </jms-factories>
    EAR-Project/META-INF/jms-destination.xml:
    <jms-destinations>
      <destination>
        <connection-factory>jmsfactory/default/QueueConnectionFactory</connection-factory>
        <destination-name>jmsqueues/default/sapDemoQueue</destination-name>
      </destination>
    </jms-destinations>
    How to configure correctly?
    Does anybody an example how to configure?
    Where may I download the example of the SAP documentation at http://help.sap.com/saphelp_nw04/helpdata/en/3d/41bee546e94ad48537f2cf06a29818/frameset.htm
    Thank a lot,
    Juergen

    Hello Vesselin
    My deployment descriptors:
    ejb-jar.xml
              <session>
                   <ejb-name>MonatsabschlussBean</ejb-name>
                   <home>de.filiadata.leistungserfassung.ejb.abschluss.MonatsabschlussHome</home>
                   <remote>de.filiadata.leistungserfassung.ejb.abschluss.Monatsabschluss</remote>
                   <local-home>de.filiadata.leistungserfassung.ejb.abschluss.MonatsabschlussLocalHome</local-home>
                   <local>de.filiadata.leistungserfassung.ejb.abschluss.MonatsabschlussLocal</local>
                   <ejb-class>de.filiadata.leistungserfassung.ejb.abschluss.MonatsabschlussBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <resource-ref>
                        <res-ref-name>FdlbQueueConnectionFactory</res-ref-name>
                        <res-type>javax.jms.QueueConnectionFactory</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
                   <resource-env-ref>
                        <resource-env-ref-name>FdlbQueue</resource-env-ref-name>
                        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
                   </resource-env-ref>
              </session>
              <message-driven>
                   <ejb-name>ExportBean</ejb-name>
                   <ejb-class>de.filiadata.leistungserfassung.ejb.abschluss.ExportBean</ejb-class>
                   <transaction-type>Container</transaction-type>
                   <message-driven-destination>
                        <destination-type>javax.jms.Queue</destination-type>
                   </message-driven-destination>
                   <resource-ref>
                        <res-ref-name>FdlbQueueConnectionFactory</res-ref-name>
                        <res-type>javax.jms.QueueConnectionFactory</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
                   <resource-env-ref>
                        <resource-env-ref-name>FdlbQueue</resource-env-ref-name>
                        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
                   </resource-env-ref>
              </message-driven>
    ejb-j2ee-engine.xml
              <enterprise-bean>
                   <ejb-name>MonatsabschlussBean</ejb-name>
                   <session-props/>
              </enterprise-bean>
              <enterprise-bean>
                   <ejb-name>ExportBean</ejb-name>
                   <message-props>
                        <destination-name>FdlbQueue</destination-name>
                        <connection-factory-name>FdlbQueueConnectionFactory</connection-factory-name>
                   </message-props>
              </enterprise-bean>
    jms-factories.xml
    <jms-factories>
      <connection-factory>
        <factory-name>FdlbQueueConnectionFactory</factory-name>
        <context-factory-type>
          <link-factory-name>jmsfactory/default/XAQueueConnectionFactory</link-factory-name>
          <initial-context-factory>com.sap.engine.services.jndi.InitialContextFactoryImpl</initial-context-factory>
          <provider-url>localhost</provider-url>
          <security-principal>Administrator</security-principal>
          <security-credentials></security-credentials>
        </context-factory-type>
      </connection-factory>
    </jms-factories>
    jms-destinations.xml
    <jms-destinations>
      <destination>
        <connection-factory>FdlbQueueConnectionFactory</connection-factory>
        <destination-name>FdlbQueue</destination-name>
      </destination>
    </jms-destinations>
    And I'll put mit ServiceLocator:
        public QueueConnectionFactory getQueueConnectionFactory() throws NamingException {
            if (queueConnectionFactory == null) {
                Object obj = ctx.lookup("java:comp/env/FdlbQueueConnectionFactory");
                queueConnectionFactory = (QueueConnectionFactory) obj;
            return queueConnectionFactory;
        public Queue getQueue() throws NamingException {
            if (queue == null) {
                Object obj = ctx.lookup("java:comp/env/FdlbQueue");
                queue = (Queue) obj;
            return queue;
    Kind Regards,
    Juergen

  • Error of Foreign JMS server connecting to durable subscriber topic

    Weblogic server domain is trying to connect to the durable topic configured on the other weblogic domain. (Both domain are running on weblogic 9.2 platform)
    WLI 9.2 Event generator is TestPinFJ is the MDB which is trying to listen message from Foreign JMS.
    Following error we have got when I did following configuration for connecting to durable topic using foreign JMS.
    <EJB> <BEA-010061> <The Message-Driven EJB: TestPinFJ is unable to connect to the JMS destination: TestQueue. The Error was:
    java.lang.IllegalArgumentException: port out of range:-16>
    Detail configuration is as follows:
    Foreign JMS : TestFS
    General:
    JNDI Connection URL: t3://10.20.65.95:9004 TestClient123 (where TestClient123 is the client id for durable subscriber topic )
    Destinations:
    Local JNDI Name: TestQueue
    Remote JNDI Name: TestTopic
    Connection Factories :
    Local JNDI Name: TestQCF
    Remote JNDI Name: TestTCF
    My suspect is the JNDI connection URL is incorrect. Please advice how to configure JNDI conn url while connecting to durable topic with client id?

    hi Hussain,
    I am the collegue of the person created this thread.
    Thaks for the input. can u please suggest me how do we configure connectionfactory and JSM topic to durable subscription with ClientID.Shoudl th eClientID be same for JMSTopic and ConectionFactory?
    In Domain "A" I have created JMS topic with durable subscriber wioth client ID "TestClient123" and created a conenctionfacory with same client ID "TestClient123" .
    In Domain "B" i created a foreign JMS connecting to topic in Domain A using connection facatory created in Domain "A" configured as as remoteConnectionFActory.
    Also the JNDI Connection URL is : t3://10.20.65.95:9004
    "weblogic.jms.common.InvalidClientIDException: Client id, Testclient1, is in use. The reason for rejection is "The JNDI name weblogic.jms.connection.clientid.TestClient123was found, and was bound to an object of type weblogic.jms.frontend.FEClientIDSingularAggregatable : FEClientIDSingularAggregatable(SingularAggregatable(<9222810352589496374.1>:1):TestClient123)"
    Nested exception: weblogic.jms.common.InvalidClientIDException: Client id, EAIEXTTestClient123, is in use. The reason for rejection is "The JNDI name weblogic.jms.connection.clientid.TestClient123 was found, and was bound to an object of type weblogic.jms.frontend.FEClientIDSingularAggregatable : FEClientIDSingularAggregatable(SingularAggregatable(<9222810352589496374.1>:1):TestClient123)".
    weblogic.jms.common.InvalidClientIDException: Client id, EAIEXTTestClient123, is in use. The reason for rejection is "The JNDI name weblogic.jms.connection.clientid.TestClient123 was found, and was bound to an object of type weblogic.jms.frontend.FEClientIDSingularAggregatable : FEClientIDSingularAggregatable(SingularAggregatable(<9222810352589496374.1>:1):TestClient123)"
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:211)"
    IS there any chnage i need to make to get this connectivity between Domain A and B working?
    Appreciate your help on this.

  • Using MDBs for durable subscriptions

    I need to be able to deploy my MDB as a durable subscriber i.e I have my MDB ubscribing to a Topic. For some reason if the application hosting the MDB(message driven bean) fails, I would like the JMS provider to republish all the messages that were already in the Topic in addition to those messages which might have been published when the MDB application was down.
    I am trying to achieve this using Weblogic 7.0. The weblogic documentation says that messages will not be accumulated if the MDB using durable subscriptions is not deployed(which would be the case when the MDB application failed).
    Any ideas on how I could design around this shortcoming within WLS?
    Thanks
    Ramdas

    The WLS documentation for MDBs says :
    "If your bean will demarcate its own transaction
    boundaries, set the acknowledge-mode sub-element to
    specify the JMS acknowledgment semantics to use. This
    element has two possible values: AUTO_ACKNOWLEDGE (the
    default) or DUPS_OK_ACKNOWLEDGE."Okay, I missed the part where you were specifying WLS. In the case quoted above, you will have to explicitly rollback the transaction and make sure that your MDB is set to transaction "Required" (or "RequiresNew").
    I am not sure what you meant by "concurrency issues"
    when using MDBs.
    Please could you clarify.Sure, if your BMP, as called from the MDB, blows up, you rollback the transaction. Which means the EXACT SAME message that caused the error will get redelivered, based upon your server settings: either immediately or within the delay period.
    This means that while your first MDB is (potentially) still dealing with whatever problems the message caused in the BMP, a second invocation of the MDB can be starting, albeit in another transaction. The state of your BMP could be undefined in this situation - which could cause an entirely different set of problems.
    Even though you program EJBs as "single-threaded," you still have to consider the likelyhood of multiple invocations accessing/changing the same "piece" of data. Yes, that's what transactions are for - but there can be programmatic holes where this kind of situation can arise. You just have to be careful about what you're doing.

  • How to configure email Alerts in OEM Cloud 12c for Database Servers up/down

    Hi everybody,
    How to configure email Alerts in OEM Cloud 12c for Database Servers up/down status?
    Regards,
    Miguel Vega

    Hi Miguel Vega,
    Information regarding the notifications:
    ==============================
    Configuring notification rules in 12c is different from earlier releases.
    The concept and function of notification rules has been replaced with a two-tier system consisting of Incident Rules and Incident Rule Sets :
    1. Incident Rules: Operate at the lowest level granularity (on discrete events) and performs the same role as notification rules from earlier releases.
    By using incident rules, you can automate the response to incoming incidents and their updates.
    A rule contains a set of automated actions to be taken on specific events, incidents or problems.
    The actions taken are for example : sending e-mails, creating incidents, updating incidents, and creating tickets.
    2. Incident Rule Set: A rule set is a collection of rules that applies to a common set of objects, for example, targets, jobs, and templates.
    To help you to achieve the Notification Rules configuration, refer those notes :
    How To Configure Notification Rules in 12C Enterprise Manager Cloud Control ? Doc ID 1368036.1
    EM12c How to Add and Configure Email Addresses to EM Administrators and Update the Notification Schedule ?Doc ID 1368262.1
    EM12c How to Subscribe or Unsubscribe for Email Notification for an Incident Rule Set ?Doc ID 1389460.1
    EM 12c How to Configure Notifications for Job Executions ? Doc ID 1386816.1
    Best Regards,
    Venkat

  • How to configure CustomLoginModule in jps-config.xml

    Hi,
    How can we configure a Custom Login Module using jps-config.xml, as we do not want to use weblogic custom authentication provider as it needs application jars(which we require fo authenticating the user) to be kept in weblogic classpath.
    Is there any documentation on how to configure and use Custom Login Modules in jps-config.xml, I tried to create a LoginModule and specify it in jps-config.xml, but
    My LoginModule is not getting called.
    Jdev version: 11.1.1.3.0
    Server : weblogic
    my jps-config.xml is
                  <?xml version = '1.0' encoding = 'Cp1252'?>
    <jpsConfig xmlns="http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd">
       <property value="doasprivileged" name="oracle.security.jps.jaas.mode"/>
       <property value="custom.provider" name="true"/>
       <propertySets/>
       <serviceProviders>
          <serviceProvider class="oracle.security.jps.internal.credstore.ssp.SspCredentialStoreProvider" name="credstore.provider" type="CREDENTIAL_STORE">
             <description>Credential Store Service Provider</description>
          </serviceProvider>
          <serviceProvider class="oracle.security.jps.internal.login.jaas.JaasLoginServiceProvider" name="jaas.login.provider" type="LOGIN">
             <description>
                Login Module Service Provider
             </description>
          </serviceProvider>
          <serviceProvider class="oracle.security.jps.internal.idstore.xml.XmlIdentityStoreProvider" name="idstore.xml.provider" type="IDENTITY_STORE">
             <description>XML-based IdStore Provider</description>
          </serviceProvider>
          <serviceProvider class="oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider" name="policystore.xml.provider" type="POLICY_STORE">
             <description>XML-based PolicyStore Provider</description>
          </serviceProvider>
       </serviceProviders>
       <serviceInstances>
          <serviceInstance provider="credstore.provider" name="credstore">
             <property value="./" name="location"/>
          </serviceInstance>
          <serviceInstance provider="jaas.login.provider" name="CustomLoginModule">
             <property value="SUFFICIENT" name="jaas.login.controlFlag"/>
             <property value="SEVERE" name="log.level"/>
             <property value="org.calwin.view.CustomLoginModule" name="loginModuleClassName"/>
          </serviceInstance>
          <serviceInstance provider="idstore.xml.provider" name="idstore.xml">
             <property value="./jazn-data.xml" name="location"/>
             <property value="OBFUSCATE" name="jps.xml.idstore.pwd.encoding"/>
             <property value="jps" name="subscriber.name"/>
          </serviceInstance>
          <serviceInstance provider="policystore.xml.provider" name="policystore.xml">
             <property value="./jazn-data.xml" name="location"/>
          </serviceInstance>
       </serviceInstances>
       <jpsContexts default="TestMultiDatasource">
          <jpsContext name="TestMultiDatasource">
             <serviceInstanceRef ref="idstore.xml"/>
             <serviceInstanceRef ref="credstore"/>
             <serviceInstanceRef ref="policystore.xml"/>
          </jpsContext>
          <jpsContext name="anonymous">
             <serviceInstanceRef ref="credstore"/>
          </jpsContext>
       </jpsContexts>
    </jpsConfig>My Login Module Class:
    package org.calwin.view;
    import java.io.IOException;
    import java.security.Principal;
    import java.util.Map;
    import javax.security.auth.Subject;
    import javax.security.auth.callback.Callback;
    import javax.security.auth.callback.CallbackHandler;
    import javax.security.auth.callback.NameCallback;
    import javax.security.auth.callback.PasswordCallback;
    import javax.security.auth.callback.UnsupportedCallbackException;
    import javax.security.auth.login.LoginException;
    import javax.security.auth.spi.LoginModule;
    import javax.servlet.http.HttpServletRequest;
    import weblogic.security.auth.callback.ContextHandlerCallback;
    import weblogic.security.principal.WLSUserImpl;
    import weblogic.security.service.ContextHandler;
    public class CustomLoginModule
        implements LoginModule
      // initial state
      private Subject subject;
      private CallbackHandler callbackHandler;
      // the authentication status
      private boolean succeeded = false;
      private boolean commitSucceeded = false;
      // username and password
      private String username;
      private String password;
      // testUser's SamplePrincipal
      private Principal userPrincipal;
       * Initialize this <code>LoginModule</code>.
       * <p>
       * @param subject the <code>Subject</code> to be authenticated. <p>
       * @param callbackHandler a <code>CallbackHandler</code> for communicating
       *      with the end user (prompting for user names and
       *      passwords, for example). <p>
       * @param sharedState shared <code>LoginModule</code> state. <p>
       * @param options options specified in the login
       *      <code>Configuration</code> for this particular
       *      <code>LoginModule</code>.
      public void initialize(Subject subject, CallbackHandler callbackHandler,
                             Map sharedState, Map options) {
        this.subject = subject;
        this.callbackHandler = callbackHandler;
       * Authenticate the user by prompting for a user name and password.
       * <p>
       * @return true in all cases since this <code>LoginModule</code>
       *    should not be ignored.
       * @exception FailedLoginException if the authentication fails. <p>
       * @exception LoginException if this <code>LoginModule</code>
       *    is unable to perform the authentication.
      public boolean login() throws LoginException {
        if (callbackHandler == null)
          throw new LoginException("Error: no CallbackHandler available " +
                                   "to garner authentication information from the user");
        Callback[] callbacks = new Callback[3];
        callbacks[0] = new NameCallback("user name: ");
        callbacks[1] = new PasswordCallback("password: ", false);
        callbacks[2]=new ContextHandlerCallback();
          try {
            callbackHandler.handle(callbacks);
          } catch (UnsupportedCallbackException uce) {
              throw new LoginException("Callback Not Supported");
          } catch (IOException ioe) {
              throw new LoginException("I/O Failed");
          username = ((NameCallback)callbacks[0]).getName();
          char[] tmpPassword = ((PasswordCallback)callbacks[1]).getPassword();
          if (tmpPassword == null) {
            tmpPassword = new char[0];
          password = new String(tmpPassword);
          ((PasswordCallback)callbacks[1]).clearPassword();
        // verify the username/password
        boolean usernameCorrect = true;
        boolean passwordCorrect = true;
        succeeded = true;
        return true;
       * <p> This method is called if the LoginContext's
       * overall authentication succeeded
       * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
       * succeeded).
       * <p> If this LoginModule's own authentication attempt
       * succeeded (checked by retrieving the private state saved by the
       * <code>login</code> method), then this method associates a
       * <code>SamplePrincipal</code>
       * with the <code>Subject</code> located in the
       * <code>LoginModule</code>.  If this LoginModule's own
       * authentication attempted failed, then this method removes
       * any state that was originally saved.
       * <p>
       * @exception LoginException if the commit fails.
       * @return true if this LoginModule's own login and commit
       *    attempts succeeded, or false otherwise.
      public boolean commit() throws LoginException {
        if (succeeded == false) {
          return false;
        } else {
          userPrincipal = new WLSUserImpl(username);
          if (!subject.getPrincipals().contains(userPrincipal))
            subject.getPrincipals().add(userPrincipal);
          // in any case, clean out state
          username = null;
          password = null;
          commitSucceeded = true;
          return true;
       * <p> This method is called if the LoginContext's
       * overall authentication failed.
       * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
       * did not succeed).
       * <p> If this LoginModule's own authentication attempt
       * succeeded (checked by retrieving the private state saved by the
       * <code>login</code> and <code>commit</code> methods),
       * then this method cleans up any state that was originally saved.
       * <p>
       * @exception LoginException if the abort fails.
       * @return false if this LoginModule's own login and/or commit attempts
       *    failed, and true otherwise.
      public boolean abort() throws LoginException {
        if (succeeded == false) {
          return false;
        } else if (succeeded == true && commitSucceeded == false) {
          // login succeeded but overall authentication failed
          succeeded = false;
          username = null;
          if (password != null) {
            password = null;
          userPrincipal = null;
        } else {
          // overall authentication succeeded and commit succeeded,
          // but someone else's commit failed
          logout();
        return true;
       * Logout the user.
       * <p> This method removes the <code>SamplePrincipal</code>
       * that was added by the <code>commit</code> method.
       * <p>
       * @exception LoginException if the logout fails.
       * @return true in all cases since this <code>LoginModule</code>
       *          should not be ignored.
      public boolean logout() throws LoginException {
        subject.getPrincipals().remove(userPrincipal);
        succeeded = false;
        succeeded = commitSucceeded;
        username = null;
        if (password != null) {
          password = null;
        userPrincipal = null;
        return true;
    }My adf-config.xml:
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
        <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
                                credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
        <sec:JaasSecurityContext initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory"
                                 jaasProviderClass="oracle.adf.share.security.providers.jps.JpsSecurityContext"
                                 authorizationEnforce="true"
                                 authenticationRequire="true"/>
      </sec:adf-security-child>My jazn.xml:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <jazn-data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/jazn-data-11_0.xsd">
      <jazn-realm default="jazn.com">
        <realm>
          <name>jazn.com</name>
        </realm>
      </jazn-realm>
    </jazn-data>My web.xml:
    <filter>
        <filter-name>JpsFilter</filter-name>
        <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
        <init-param>
          <param-name>enable.anonymous</param-name>
          <param-value>true</param-value>
        </init-param>
        <init-param>
          <param-name>remove.anonymous.role</param-name>
          <param-value>false</param-value>
        </init-param>
      </filter>
    <servlet>
        <servlet-name>adfAuthentication</servlet-name>
        <servlet-class>oracle.adf.share.security.authentication.AuthenticationServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
    <servlet-mapping>
        <servlet-name>adfAuthentication</servlet-name>
        <url-pattern>/adfAuthentication</url-pattern>
      </servlet-mapping>
    <security-constraint>
        <web-resource-collection>
          <web-resource-name>adfAuthentication</web-resource-name>
          <url-pattern>/adfAuthentication</url-pattern>
        </web-resource-collection>
        <auth-constraint>
          <role-name>valid-users</role-name>
        </auth-constraint>
      </security-constraint>
      <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
          <form-login-page>/login.html</form-login-page>
          <form-error-page>/error.html</form-error-page>
        </form-login-config>
      </login-config>
      <security-role>
        <role-name>valid-users</role-name>
      </security-role>weblogic.xml:
      <security-role-assignment>
        <role-name>valid-users</role-name>
        <principal-name>users</principal-name>
      </security-role-assignment>Regards,
    Saikiran

    Ours is not a Desktop Application, but we want to handle Authentication(Which authenticates the userid and password by making a Tuxedo call) and add the Principal to Subject in session, so that ADF Authorization and securityContext can be used as is,
    but doing this with Custom Authentication Provider in weblogic needs me to have a lot of Tuxedo Service related jars in weblogic/system classpath which i feel is not right thing to do, as the same jars are required in application also, which means i will have the jars in class path twice and i need to deploy the jars to both places everytime there is any change.
    Is there any way by which i can set Authenticated principal to Subject in the created session from within Application?

  • How to configure thrid party listeners to JMS queu

    I have to design a BPEL process that publishes a message onto a topic. The subscriber to the topic is not another Fusion process, but an external, third part service.
    How do I do the configurations to register a subscriber to this topic.
    Allso, I would like information on optimum JMS adapter settings.
    Please let me know how.
    Edited by: user591314 on Oct 31, 2008 2:04 AM
    Edited by: user591314 on Oct 31, 2008 4:36 AM

    I have to design a BPEL process that publishes a message onto a topic. The subscriber to the topic is not another Fusion process, but an external, third part service.
    How do I do the configurations to register a subscriber to this topic.
    Allso, I would like information on optimum JMS adapter settings.
    Please let me know how.
    Edited by: user591314 on Oct 31, 2008 2:04 AM
    Edited by: user591314 on Oct 31, 2008 4:36 AM

  • How to configure a JMS Queue

    Hi,
    I have an EAR file thai includes an EJB 3.0 module with a MDB. I use a Queue.
    This is my code,
    @Resource(mappedName = "jms/NotificationQueue")
    private Queue notificationQueue;
    @Resource(mappedName = "jms/NotificationQueueFactory")
    private ConnectionFactory notificationQueueFactory;
    public Customer update(Customer customer){
    Customer updated = em.merge(customer);
    try {
    sendJMSMessageToNotificationQueue(updated);
    } catch (JMSException ex) {
    Logger.getLogger(CustomerSessionBean.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("Customer updated in CustomerSessionBean!");
    return updated;
    private Message createJMSMessageForjmsNotificationQueue(Session session, Object messageData) throws JMSException
    //Modified to use ObjectMessage instead
    ObjectMessage tm = session.createObjectMessage();
    tm.setObject((Serializable) messageData);
    return tm;
    private void sendJMSMessageToNotificationQueue(Object messageData) throws JMSException
    Connection connection = null;
    Session session = null;
    try
    connection = notificationQueueFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer messageProducer = session.createProducer(notificationQueue);
    messageProducer.send(createJMSMessageForjmsNotificationQueue(session, messageData));
    finally
    if (session != null)
    try
    session.close();
    catch (JMSException e)
    Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot close session", e);
    if (connection != null)
    connection.close();
    layed inside a stateless EJB 3.0.
    And the MDB looks as follow,
    @MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class NotificationBean implements MessageListener {
    public NotificationBean() {
    public void onMessage(Message message)
    try
    Object msgObj = ((ObjectMessage)message).getObject();
    if (msgObj != null)
    Customer customer = (Customer)msgObj;
    System.out.println("Customer with the following details has been updated:");
    StringBuilder sb = new StringBuilder();
    sb.append("Customer ID=");
    sb.append(customer.getCustomerId());
    sb.append(", ");
    sb.append("Name=");
    sb.append(customer.getName());
    sb.append(", ");
    sb.append("Email=");
    sb.append(customer.getEmail());
    System.out.println(sb.toString());
    catch (JMSException ex)
    Logger.getLogger(NotificationBean.class.getName()).log(Level.SEVERE, null, ex);
    I have configured both "jms/NotificationQueue" and "jms/NotificationQueueFactory" inside OC4J server.
    But when I try to deploy the EAR file, the server gives me the following error,
    Operation failed with error: No destination location set for message-driven bean NotificationBean
    How must I do to let the EAR file be deployed?
    Thanks in advance
    Jose

    Mingzhuang
    I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
    1. using jms transport configure proxy service:
    Retry Count :3
    Retry Interval:10
    Error Destination: ErrorTopic
    Expiration olicy: RedirectUnlike File/SFTP, JMS proxy service definition does not have the concept of Error Destination. To accomplish similar functionality go to JMSQ on (for which proxy is configured) server console (http://localhost:7001/console) and configure the Error Destination. Following URL will help in how to configure JMS Q.
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueues.html
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueueDeliveryFailure.html
    I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.If every thing is configured as per above step, then the after retries, the weblogic server will put the message into JMS topic configured. Your proxy will receive from this topic.
    Let me know if we are not on same page.
    Cheers
    Manoj

  • How to configure JMS queue on OC4J server. Development in JDeveloper 10G

    Hi there,
    I have to configure a JMS for an Asynchronous process in my Application which will be running in Oracle 10G Application Server. Development Environment is Oracle JDeveloper 10G.
    I am facing a problem on how to configure JMS queue.
    Steps Followed are:
    in the <JDevloperHome>/j2ee/home/config
    1. Made the new queue and connection factory's JMS entry in jms.xml.
    2. Specifed the queue in oc4j-connectors.xml.
    3. played around with application.xml
    and tried all combinations, but the message producer always failed to lookup the queue.
    Need help on the steps to follow so that the producer can post the message in the queue.
    Also please help how to configure the MDB to listen to the queue.
    Thanx and Regards
    Subham

    If you were dealing with Oracle 10g app server as opposed to standalone, I might be better able to help you.
    One thing though, when you are configuring your MDB in the orion-ejb-jar.xml file, do not forget to specify attribute listener-threads, otherwise no matter how many beans you have in your MDB pool, only one bean will be listening to the queue. Many listener-threads equal to max number of beans in pool.

  • How to configure global transaction wthin Oracle AS JMS and Oracle JMS

    How to configure global transaction if I take a message from Oracle JMS(AQ) and send it to the Oracle JMS?

    Which version of OC4J are you working on?
    In OC4J 10.1.3.x, presume your OC4J JMS listens messages via MDB which uses a resource adapter as a message listener. The resouce adaper could be the generic JMS adapter deployed in OC4J as the default.
    Resource adapter configuration to support MDBs is included in the standard ra.xml file, which lists the message listener types that the resource adapter supports.
    The MDB developer or deployer configures the MDB in the ejb-jar.xml file, through a <message-driven> element.
    In addition to above, configuration in the ejb-jar.xml file specifies whether an MDB uses transactions.
    1) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, and the <trans-attribute> subelement of <container-transaction> (under the <assembly-descriptor> element) has a value of Required. In this circumstance, if there is an imported transaction, then message delivery and related work are performed within that transaction. If there is no imported transaction, OC4J creates a transaction, and message delivery and related work are performed within that transaction.
    2) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Bean. In this circumstance, the MDB manages the transaction. If a transaction is imported, OC4J will suspend it before the message delivery method call to the MDB, in order to avoid conflict.
    Message delivery is not transacted if the <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, but the <trans-attribute> element has a value of NotSupported. If there is an imported transaction in this circumstance, OC4J will suspend the transaction before the message delivery method call to the MDB.
    Details could be found from OC4J Resource Adapter Guide.

  • How to configure mail server for subscription

    Hi,
    I want to test subscription. My problem is how to configure the mail server.
    As to my understanding, we need first configure mail server, then the user can choose "Subscribe" in the Details screen of a folder.
    My steps are:
    1. In KM - CM - Utilities - Channels, specify SMTP server, userId and password.
    2. In KM - CM - Utilities - Channel originators, set the Original address for notificator.EMAIL.
    3. In KM - Collaboration - Groupware Transport - Mail Transport, specify SMTP server and sent message folder.
    After that, when I choose a user and click "Send email", it failed saying "Failed to communicate with SMTP server when sending the email.".
    Could anyone tell me what's wrong with my configuration, or what should I do to make subscription work?
    Thanks,
    Ray

    Hi Vineeth,
    Thanks for help.
    According to your steps:
    1. set up a mail transport and making notification and mailing service active.
       In System admin - KM - CM - Global services, I've enabled Inbox, Mailing and Notification services.
      In KM - CM - Collaboration - Groupware Transport, I've set up a mail transport:
      Name: JavaMailTransport
      SMTP Server: smtp.yahoo.com
      Sent message folder: /documents
      System alias name: mytransport
    2. Give everyone read permission on notifications in KM.
      Where can I set user's permission on notifications? I think you mean folder /etc/notifications, but I don't know how to set permissions.
    3. Check if proper id's are maintained in users profile.
      How to do this?
    Thanks for help~~
    Regards,
    Ray

  • How to configure Wake On LAN to work through the Internet?

    I'm using an iOS app to wake my desktop computer. It works perfectly fine when I'm within my WiFi range. However, when I'm out of my Linksys E3000 access point, it no longer works over the Internet. So, if anyone can point me to documentation that have step by step instruction on how to configure this through the Linksys E3000 access point, I'll be grateful.

    Hi ohgosh,
    I believe your computer is already configured and has all the requirements for Wake on Lan since it works locally. To do it remotely you need to open the regular port numbers used for WOL like UDP ports 9 and 32767. Your desktop IP address must be set to static because that's what you need to enter on the port forwarding page of your router. You may use this link below for instructions on how to do port forwarding on your router.
    http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=d9b27a0c1bb9496d8c22d0d55f875ddf_17241.xml&pid=80&...
    Another option is to set up DynDNS on your router. With this, you need to subscribe to DynDNS.com. I found some online links that could help you enable WOL remotely:
    http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=3ff9013e9f4f4a0b9d9805b0697407b7_4578.xml&pid=80&r...
    http://lifehacker.com/5786791/rule-your-computer-from-afar-by-setting-up-wake+on+lan
    http://www.dslreports.com/faq/9389
    http://www.teamviewer.com/en/res/pdf/TeamViewer-Manual-Wake-on-LAN-en.pdf
    Hope this helps!

Maybe you are looking for