PUMA API from stand alone application - Websphere

This is a discussion on PUMA API from stand alone application - Websphere ; Hi all, is it possible to invoke the PUMA API from a stand alone application? if so how can i do? thanks in advance....

+ Reply to Thread
Results 1 to 6 of 6

Thread: PUMA API from stand alone application

  1. PUMA API from stand alone application

    Hi all,

    is it possible to invoke the PUMA API from a stand alone application?

    if so how can i do?



    thanks in advance.

  2. Re: PUMA API from stand alone application

    Do you mean like just a java client running somewhere? or do you mean another web app on the same appserver?



    1st one you would need to create a webservice that you run on the appserver, and that your stand alone client talks to



    2nd yes as long as it is on the same appserver



    Some considerations though is that the thread accessing puma is not authenticated so if you want to do anything, you need to give anon access to the virtual resources users and user groups





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: PUMA API from stand alone application

    In Portal 6.0 it is not possible to use PUMA from Remote application

  4. Re: PUMA API from stand alone application

    Hi jim,



    Thanks for your reply!

    My web app(Spring batch application) will reside on the same app server.

    From my spring batch application am going to access the PUMA API..



    But am unable to get the PUMA home from my application.



    code snippet



    Context ctx = new InitialContext();

    psh = (PortletServiceHome) ctx .lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome"); // JNDI lookup



    can u please say me what i have to do for this?

  5. Re: PUMA API from stand alone application

    Well fist you are accessing the wrong puma home

    Context ctx = new InitialContext();

    Name myjndiname = new CompositeName(PumaHome.JNDI_NAME);

    PumaHome myHome = (PumaHome) ctx.lookup(myjndiname);



    and this is the jndi name portal:service/usermanagement/Puma



    This needs to be on the same server As WebSphere_Portal and not server1





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  6. Re: PUMA API from stand alone application

    Hi Jim,



    I tried running your code. From a portlet am able to execute it but as a stand alone application its showing the following error


    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

    at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:645)

    at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:247)

    at javax.naming.InitialContext.getURLOrDefaultInitCtx (InitialContext.java:344)

    at javax.naming.InitialContext.lookup(InitialContext. java:355)


    Let me clearly explain wat am trying to do. using the PUMA API am trying to create a user Group. This is exported as jar file and placed in websphere lib path. From my spring batch application am trying to access the classes inside the jar. is it the right way of doing?


+ Reply to Thread