Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  How to establish connection with Jboss EJB via Filenet Code module

    Posted Mon April 05, 2021 05:40 AM

    We are working on a project where we need to connect to JBoss(JBoss EAP 7.3.0) via the Filenet code module. However while establishing a connection, the EJB connection fails giving the below error :

    Unable to find the InitialContextFactory org.wildfly.naming.client.WildFlyInitialContextFactory.

    To us it looks like it fails to load the class - WildFlyInitialContextFactory.

    We tried below different options/approaches to load the Jboss-client.jar(version 7.3) in order to avoid this issue :

    1.Loading the specific jars from the Websphere lib folder /opt/IBM/WebSphere/AppServer/lib – approach failed and we were also not able to access Websphere console because of the jboss-client.jar

    2. Creating shared lib and configuring it to FileNet ear. Approach failed and ACCE was also not accessible. The below error was thrown :

    FNRCA0032 The JNDI cannot be accessed. Message was: Some object reference in the name "FileNet/Engine" relative to the context "ECMDEVCell/nodes/CPENode01/servers/CPEServer01" is invalid. Some possible causes include a context binding in the name which refers to a destroyed context, or an object binding which contains an invalid EJBHome reference.

    3. Adding JVM argument -Djava.naming.factory.initial=org.wildfly.naming.client.WildFlyInitialContextFactory

    Approach failed and restarting the CPE server also failed post updating JVM argument

    4. Setting JBoss initial context factory using system property inside the code module – approach failed

    Note - the same connectivity code works well if the code is deployed as a web application in the WebSphere and the connection to Jboss ejb also works. However, same code does not work well when deployed as a code module in Filenet. Error thrown is : Unable to find the InitialContextFactory org.wildfly.naming.client.WildFlyInitialContextFactory.

    Could you please help us understand on how to make it work via the Filenet code module like how it works with Standalone application.

    Code snippet :

    Properties props = new Properties();

    props.put(Context.INITIAL_CONTEXT_FACTORY, org.wildfly.naming.client.WildFlyInitialContextFactory.class.getName());

    props.put(Context.PROVIDER_URL, "xxxxx");

    props.put(Context.SECURITY_PRINCIPAL, "xxxxx");

    props.put(Context.SECURITY_CREDENTIALS, "xxxxx");

    InitialContext ctx = new InitialContext(props);

    FileNetCommonServiceHome fnComServiceHome = null;

    String lookupName = "xxxxx";

    System.out.println("lookupName::"+ctx.lookup(lookupName));

    System.out.println("call to remote EJB worked");



    #FileNet
    #Support
    #SupportMigration


  • 2.  RE: How to establish connection with Jboss EJB via Filenet Code module

    Posted Mon April 05, 2021 08:52 AM

    I'm confused.

    Are you trying to run CPE on WildFly or are you trying to connect to CPE from a WildFly aplication?

    /Gerold



    #FileNet
    #Support
    #SupportMigration


  • 3.  RE: How to establish connection with Jboss EJB via Filenet Code module



  • 4.  RE: How to establish connection with Jboss EJB via Filenet Code module

    Posted Mon April 05, 2021 03:38 PM

    Ok.

    Why do you have to use EJB? It makes things much more difficult up to impossible.

    Did you try Web Services instead? You should have no problem here.

    As EJBs are VERY specific to an app server, and to the Java version and... and... there might be contradicting requirements that might make it impossible.

    The effect on performance is way overrated, but of course you get session replication.

    I also do not understand the approaches you were taking. If at all working, you need the WAS specific client JARs (used to be large, they are now packaged in a single, relatively small JAR) on the WildFly side in a way that they do not conflict with anything else.

    To reduce complexity as a first step write a Java rich client using EJB transport without any container - on a node where NO CPE is installed . When it works , take it from there...

    /gerold



    #FileNet
    #Support
    #SupportMigration