No experience with it, If you don't need fancy stuff like nested classes you can probably just write your java code into the groovy macro, most java code works in groovy. Otherwise you could write the java code, compile to a jar, put the jar in the WEB-INF/lib folder, then in groovy just: import your.fully.qualified.class.Name; instantiate it and use.
If you need it to be a singleton, you can make it an XWiki component, I found the best way is to copy one of the simple existing components such as this: http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-captcha/ I don't know much about JNI but I do know it's easy to add java code to XWiki. Caleb Mike Davis wrote: > This is sort of a random shot, just hoping someone has implemented something > similar before. There is a C++ API used to securely connect to and query a > database. The database is maintained by IT, so I need to go through this API > rather than directly accessing the database (in which case I would use JDBC > with groovy). > > I was wondering if there is a way to write groovy bindings for C++ functions. > I know this can be done with Java for C++ (JNI/Jace/etc), but does anyone > have any experience doing such a thing with groovy or in a wiki context? > > Thanks, > -Mike > > _________________________________________________________________ > Hotmail is redefining busy with tools for the New Busy. Get more from your > inbox. > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
