Topic
  • 8 replies
  • Latest Post - ‏2013-10-02T22:09:48Z by orlando_gutierrez
SystemAdmin
SystemAdmin
6089 Posts

Pinned topic Querying Human Task Manager service

‏2008-07-21T19:23:16Z |
Hello all,

I had the following code in a Java snippet within BPEL and was working fine in WID 6.1.1. However, after upgrading to WID 6.1.2 it stopped working.

HTMConnection connection = new HTMConnection();
connection.setJndiName("local:com/ibm/task/api/HumanTaskManagerHome");

htm = connection.getHumanTaskManagerService();
QueryResultSet apiResult = htm.query(". . . . ");

Exception is on the JNDI lookup. The exception message is
javax.naming.NameNotFoundException: Name com not found in context "local:".

Any suggestions on alternate ways to accomplish the same would be appreciated
Updated on 2008-07-23T14:31:07Z at 2008-07-23T14:31:07Z by SystemAdmin
  • Teto
    Teto
    9 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-22T01:04:02Z  
    Try to re-deploy --> remove/add the project --> then publish. Good luck!
  • kolban
    kolban
    518 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-22T02:57:28Z  
    I have never heard of HTMConnection() ... that sounds like a local class. The fact that it is getting an exception sounds like something is broken in local code.
  • SystemAdmin
    SystemAdmin
    6089 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-22T06:46:52Z  
    try another jndi name: local:ejb/com/ibm/task/api/HumanTaskManagerHome
  • SystemAdmin
    SystemAdmin
    6089 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-22T15:50:01Z  
    try another jndi name: local:ejb/com/ibm/task/api/HumanTaskManagerHome
    Thanks RAFAL. That solved the issue.

    However, I am still debating with myself on using "local:ejb/com/ibm/task/api/HumanTaskManagerHome".

    Is there a alternative using 'java:comp/env'

    Thanks for the reply.
  • kolban
    kolban
    518 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-22T23:59:56Z  
    try another jndi name: local:ejb/com/ibm/task/api/HumanTaskManagerHome
    This is interesting. I'm afraid I'm not where I want to be on J2EE, EJB and JNDI. What does "local:" mean in this context?
  • SystemAdmin
    SystemAdmin
    6089 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-23T06:08:02Z  
    Thanks RAFAL. That solved the issue.

    However, I am still debating with myself on using "local:ejb/com/ibm/task/api/HumanTaskManagerHome".

    Is there a alternative using 'java:comp/env'

    Thanks for the reply.
    Yes, but you have to provide mapping in ejb deployment descriptor.
    Perspective j2ee -> project your_project_nameEJB -> Deployment descriptor -> Referentces -> Module -> add
    However, project EJB is generated, so every build your changes in deployment descriptor disappear.
    You can also use remote reference, but you have to add to your project stub classes for human task manger. (installation directory\ProcessChoreographer\client\task137650.jar)
    In my project I use local interface, but I can not say pros and cons to this approach. Maybe someone with more j2ee experience could say whether it is right to use local interface or not.
  • SystemAdmin
    SystemAdmin
    6089 Posts

    Re: Querying Human Task Manager service

    ‏2008-07-23T14:31:07Z  
    The general rule I follow is if the app I'm writing will always be on the same server as the app hosting the interface I want, I use the local. If there's ever even a slight possibility that my app will be installed somewhere that doesn't host the interface I want, I use the remote.
  • orlando_gutierrez
    orlando_gutierrez
    1 Post

    Re: Querying Human Task Manager service

    ‏2013-10-02T22:09:48Z  

    try restartting or checking the bpm database instance.