cancel
Showing results for 
Search instead for 
Did you mean: 

Calling BRM from UDF using JNDI lookup with @EJB annotation

Former Member
0 Kudos

Hi Experts

I am trying to implement a UDF to invoke my BRM Rules set via JNDI Lookup instead of a SOAP Channel lookup.

I have had a look at the following links/docs:

  1. http://www.gleanster.com/system/resources/W1siZiIsIjIwMTIvMDgvMDcvMjAvNDcvNTAvNDMvVGhpbmdzX1lvdV9TaG...

For item 1 above, the example looks really good, but it doesnt explain how I get access to the following required imports from my UDF:

import com.sap.brms.qrules.ejb.*;

import com.sap.brms.qrules.engine.AbstractProject;

import com.sap.brms.qrules.engine.RuleEngine;

import com.sap.brms.qrules.engine.RulesetContext;

import javax.ejb.EJB;

The second document is really good as well, but I could not figure out how to get it to work from my UDF.

So, can anyone help me to understand specifically what is required to get this to work?

  1. Is is possible to invoke the rule set from my UDF?
  2. How do I give my UDF access to all the required jars/imports?

I have manage to create a new DC (Development Component) with a public part and this enables me to get my code to compile on my local PC but I am not able to activate it due to the server not having access to the same java packages as my local copy.

Any help would be greatly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You resolve the dependency by importing the required jars with using the dependency tab for the mapping program.

As stipulated before, I have managed to resolve the dependency issue but I have now getting the same error as in the forum:

The specific error is:

com.sap.engine.services.cross.PortableRemoteObjectContainer.narrow(PortableRemoteObjectContainer.java:238)

Has anyome manage to get invoke a BRM Ruleset using JNDI?

Former Member
0 Kudos

I have actually now figured out how to resolve the dependency and my UDF is now being compiled and activated!!

engswee
Active Contributor
0 Kudos

Good to hear that, Yackeen.

Perhaps you can share how you resolve it for the benefit of others who might come across the same issue in the future?