Topic
5 replies Latest Post - ‏2012-03-29T05:50:56Z by bioflash
bioflash
bioflash
4 Posts
ACCEPTED ANSWER

Pinned topic How to configure JNDI DataSource for Application Engine.WPXT components

‏2012-03-26T05:59:46Z |
Dear All,

I'm new to FileNet BPM. We are trying to develop a component to be integrated in a workflow step. This component needs to query a database. We want to configure a JNDI Datasource for the database connection. We configured it in WAS console under the whole Cell scope. However, while executing the component, we got an exception complaint that the JNDI resource is not found. Below is the exception.

Did I miss anything? Need your help

Work Performer Exception: acmdemo1 Context:
acmdemo1Node01Cell/nodes/acmdemo1Node01/servers/server1,name=config.jndi:First Component in name config.jndi not found.
Root Cause:
IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
Updated on 2012-03-29T05:50:56Z at 2012-03-29T05:50:56Z by bioflash
  • bioflash
    bioflash
    4 Posts
    ACCEPTED ANSWER

    Re: How to configure JNDI DataSource for Application Engine.WPXT components

    ‏2012-03-26T08:43:03Z  in response to bioflash
    Sorry that we have a typo in JNDI name, After correcting the JNDI name, we got this exception instead. Does anyone know how to fix it?
    Exception occured with the JNDI NamingManager was processing a javax.naming.Reference object.
    Root Cause:
    com.ibm.ws.rsadapter.dbutils.impl.DB2UniversalUtilityImpl
  • drdamour
    drdamour
    15 Posts
    ACCEPTED ANSWER

    Re: How to configure JNDI DataSource for Application Engine.WPXT components

    ‏2012-03-26T15:57:50Z  in response to bioflash
    component integrator steps don't run within the EE Container (WAS) so they can't reference the JEE container named items (directly). You would have to create and EJB or similar and host that in your Container than invoke it from your component.

    It's much more common practice to treat components as if they are Java SE applications and have db connections in .properties files.

    Side note, it's very easy to execute DB stored procedures from PE using the DBExecute system call, perhaps you can just use that instead of a component, or at least use that to do the database part?

    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions
    • bioflash
      bioflash
      4 Posts
      ACCEPTED ANSWER

      Re: How to configure JNDI DataSource for Application Engine.WPXT components

      ‏2012-03-27T01:34:00Z  in response to drdamour
      Thanks for your information.
      I thought component integrator steps run in the same EE container with PE originally. As you mentioned, does DBExecute function reuse the connection ? We want to use JNDI because we want to use the connection pool mechanism to save the connection building time.
      • drdamour
        drdamour
        15 Posts
        ACCEPTED ANSWER

        Re: How to configure JNDI DataSource for Application Engine.WPXT components

        ‏2012-03-27T15:32:15Z  in response to bioflash
        PE is not a EE app either. It is not hosted in WAS or any EE container, it too is better thought of as a Java SE application.

        PE does keep "links" to a db handy for you, but i doubt it's connection pool level. however, a dbexecute step executes asynchronously from the UI as part of your process flow so i would not be worried about the performance hit of bringing up a db connection, that's not the right place to be optimizing as it has no direct impact on the user. there is indirect impact to the user based on how long it takes to execute the stored procedure as that work won't get to use queues until it completes.


        I am Just a new Boy,
        A Stranger in this Town,
        Where are All the Good Times,
        Who's Gonna Show this Stranger Around?
        Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions
        • bioflash
          bioflash
          4 Posts
          ACCEPTED ANSWER

          Re: How to configure JNDI DataSource for Application Engine.WPXT components

          ‏2012-03-29T05:50:56Z  in response to drdamour
          Got it. Thanks for your information.