Topic
  • 6 replies
  • Latest Post - ‏2014-06-24T03:13:08Z by Stephen·Tan
bioflash
bioflash
4 Posts

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

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

    ‏2012-03-26T08:43:03Z  
    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

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

    ‏2012-03-26T15:57:50Z  
    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

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

    ‏2012-03-27T01:34:00Z  
    • drdamour
    • ‏2012-03-26T15:57:50Z
    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
    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

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

    ‏2012-03-27T15:32:15Z  
    • bioflash
    • ‏2012-03-27T01:34:00Z
    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.
    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

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

    ‏2012-03-29T05:50:56Z  
    • drdamour
    • ‏2012-03-27T15:32:15Z
    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
    Got it. Thanks for your information.
  • Stephen·Tan
    Stephen·Tan
    3 Posts

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

    ‏2014-06-24T03:13:08Z  
    • drdamour
    • ‏2012-03-26T15:57:50Z
    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

    Hi,drdamour.

    I wanne to Using PE of the DBExecute call DB Stor procedures, but the workflow is termination when DBExecute call DB store procedures.

    the Malfunction state changes for review.

    however, By using the component is to be able to call store procedures

    Environment:

    FileNet  5.2

    SQL Server 2008