Gen EDGE

 View Only
Expand all | Collapse all

CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

  • 1.  CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Broadcom Employee
    Posted Jul 30, 2014 07:14 PM

    These tips assume that the Gen 8.5 EJB has already been deployed to JBoss.

    Before generating and installing the proxy, edit the %GEN85%\Gen\commcfg.properties file to use the EJBRMI communications type required for the Java proxy to connect to the EJB.

    For JBoss the JNDI Naming Provider service normally uses org.jnp.interfaces.NamingContextFactory for the InitialContext factory and runs on port 1099, so for example the commcfg.properties entry should look like this:

    *=EJBRMI org.jnp.interfaces.NamingContextFactory <hostname>:1099

     

    Sample APP

    In folder “<path_to_model.ief> \proxy\java\deploy\<server>\samples\APP “ create a simple command file to set the CLASSPATH environment variable to include the following jar files and then run the sample application using the java executable:

    • - the sample proxy app jar file
    • - the dpy jar file from the EJB build
    • - the JBoss client jar file jbossall-client.jar
    • - setting CMIDEBUG from command line is optional
    1. e.g.

    @echo on

    set CMIDEBUG=0xffffffff

    set classpath=.\S1AppTest.JAR;<path_to_model.ief> \java\classes\ EJBPSTEP_dpy.jar;C:\jboss-5.1.0.GA\client\jbossall-client.jar

    java S1AppTest

     

     

    Sample JSP

    Deploying and using the JSP is much simpler as JBoss handles everything. The only step needed is to manually add the EJB dpy file (<path_to_model.ief> \java\classes) to the file:

    <path_to_model.ief> \proxy\java\deploy\<server>\samples\JSP\<server>.ear

     

    Inside the <server>.ear  the dpy jar file needs to be added to the <server>.war  file in its “WEB-INF/lib" folder  & this is best done using WinZip or similar utility of your choice

    • - Open the <server>.ear file with WinZip and then the <server>.war file inside it with WinZip.
    • - Drill down to WEB-INF/lib folder and add the dpy file.
    • - Accept all WinZip prompts to update both .war & .ear files.

    Then deploy the Proxy .ear file to JBoss and execute the jsp e.g.

    http://hostname:port/<server>/<PStep_name>.jsp



  • 2.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Posted Jan 05, 2017 04:03 AM

    Hi Lynn,

    Do we have similar steps for CA Gen 7.6 ?

     

    Thanks.

    #ca gen 7.6



  • 3.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Broadcom Employee
    Posted Jan 05, 2017 04:25 PM

    Hi Prashant,

    The steps should be identical for Gen 7.6 (the commcfg.properties file will be in the %IEFH% directory)

    NOTE: Gen 7.6 is nearly 5 years out of support and I would encourage you to upgrade to the latest Gen 8.6

    CA Gen Release and Support Lifecycle Dates - CA Technologies 

     

    Hope that helps

     

    Regards,

     

    Lynn



  • 4.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Posted Jan 28, 2017 02:19 AM

    Thanks Lynn.

    Any thoughts on the below error?

    I am getting this error while invoking the CAGen generated EJB.

     

    [[ACTIVE] EJBProcedureStepContext.execute(): Use Action Block of Procedure Step failed
    [[ACTIVE] java.lang.NullPointerException

    at com.ca.gen76.ejb.EJBProcedureStepContext.setGlobalData(Unknown Source)
    at com.ca.gen76.ejb.EJBProcedureStepContext.execute(Unknown Source)



  • 5.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Broadcom Employee
    Posted Jan 29, 2017 09:57 PM

    Hi Prashant,

    I cannot find any reference to that error being reported before on our problem database. It is difficult to give any specific guidance and normally we would request you submit a support case but as I said above Gen 7.6 is out of support which means self-service support only (unless you have an Extended Support agreement)

    It looks like it is failing before during initial loading of the EJB. Assuming you are using sample JSP you could try to set CMIDEBUG in the commcfg.properties file to see if it shows any more information in the JBoss log.

    Is this JBoss 5.1 or later? (Only 5.1 is supported even with latest Gen 8.6: Third-Party Software Version - CA Gen - 8.6 - CA Technologies Documentation )

     

    Hope that helps - sorry I cannot be more specific

     

    Regards,

     

    Lynn



  • 6.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Posted Jan 30, 2017 05:27 AM

    With regard to the version of JBOSS, the 8.0 technical requirements doc stated that Gen 8.0 was tested against JBOSS 5.1, but this was then qualified with the comment...

    "Application Servers other than those listed above which comply with Oracle’s Java EE 5 specifications may be used with CA Gen. Use the application server vendor supplied deployment."

    Why has this now been qualified that it must be 5.1. What is the reason?

    And yes, I know 8.0 is out of support but we do have extended support.



  • 7.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Posted Jan 30, 2017 07:39 AM

    Hi Andrew,

     

    the comment: “Application Servers other than those listed above which comply with Oracle’s Java EE 5 specifications may be used with CA Gen. Use the application server vendor supplied deployment.” hasn't been removed, it is contained in the Technical Requirements document for CA Gen 8.5 and 8.6 too.

     

    I assume your question was of general nature and hope to have answered it. 

    If your question is specific to an issue within an environment you are dealing with, I would like to ask you to create a case, so that we can work on it.

     

    Best regards

    Hillrich



  • 8.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Posted Jan 31, 2017 05:55 AM

    Lynn,

    I am on Weblogic 12C (12.1.3)

     

    For my information, what are the different forms of Java can be generated from CA-Gen? (E.g. Spring MVC, Core Java, etc). I know, one of them it is EJB.

     

    Also, is there any video or tutorials that gives a step-by-step detail of this process and its invocation?



  • 9.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Broadcom Employee
    Posted Jan 31, 2017 06:17 PM

    Hi Prashant,

    The same concepts for java proxy calling EJB with the <Server Procedure Step>_dpy.jar file should work for Weblogic but it would have a different JNDI Naming Provider service

    Construction and Deployment in EJB - CA Gen - 8.6 - CA Technologies Documentation 

    Weblogic 12c was never tested with Gen 7.6 so it is possible it may cause a problem, although I would not expect so if it still supports the J2EE 1.4 required by Gen EJBs.

     

    For your general Java question please create a new question so it has separate visibility to the specific subject of this thread.

     

    Thanks

     

    Lynn



  • 10.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Posted Jan 30, 2017 09:26 AM

    No, we don't currently have an issue. It is confusing though.

    I wanted clarity on the statement above by Lynn Williams that "Only 5.1 is supported even with latest Gen 8.6". We are looking at potentially re-platforming some Gen services into JBOSS, but 5.1 is pretty old and I was looking to deploy into a later version because that later version will still "...comply with Oracle’s Java EE 5 specifications ".

    If I use a later version of JBOSS other that 5.1, will it be deemed to be an unsupported platform by CA.



  • 11.  Re: CA Tuesday Tips: CA Gen Sample APP and JSP Java Proxies targeting an EJB deployed to JBoss

    Broadcom Employee
    Posted Jan 30, 2017 04:31 PM

    Hi Andy,

    The limitation to use JBoss 5.1 is related to the EJB JNDI bindings i.e. there is a JNDI change in JBoss versions later than 5.1 which is incompatible with the Gen generated code - see this related thread:Jboss 7 

     

    Hope that helps

     

    Regards,

     

    Lynn