Hey John,
You can also create a CFC like this:
CFMLEngine engine = CFMLEngineFactory.getInstance();
Creation creationUtil = engine.getCreationUtil();
PageContext pageContext = engine.getThreadPageContext();
Component cfc = creationUtil.createComponentFromName(pageContext,
“package.ComponentName”);
See
for more.
Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 9/23/2016 2:39 PM, JP wrote:
To anyone looking to build a java class that uses the CFCProxy, here’s
what I figured out:Add the lucee.jar to your classpath when compiling your class (for me
it’s C:/lucee/lib/lucee.jar)In your yourclass.java, add:
|
importcoldfusion.cfc.CFCProxy;
|Create an instance of your CFC:
|
cfcConnector =newCFCProxy(cfcPath,true);//cfcPath needs to be absolute
|Then to call the onMessage() method in your CFC:
|
Objectargs ={“my message”};
cfcConnector.invoke(“onMessage”,args);// call the method “onMessage”
defined in your CFC
|On Thursday, September 22, 2016 at 4:49:56 PM UTC-6, JP wrote:
I want to use CFCProxy to make calls into CF from a Java class. In the examples I've seen I need import the CFCProxy class into my java class as follows: | importcoldfusion.cfc.CFCProxy; | First question... is CFCProxy implemented? If so, how do I tell my Java compiler where it is?–
Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/71e7fe7b-705e-4a96-a0d0-3f4182f2cb0b%40googlegroups.com
https://groups.google.com/d/msgid/lucee/71e7fe7b-705e-4a96-a0d0-3f4182f2cb0b%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.