• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Jess 7.0 and J2EE

Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently, I have Jess 6.x deployed within a servletContextListener in Weblogic. We can't use Jess inside an EJB because it is a multi-threaded application. Will Jess 7.0 be deployable within an EJB? The JBossRules folks are planning on having thier rules engine accessable as a web-service in thier next iteration. Is a similar feature planned with Jess?

In a perfect world, I'd like a fast way to communicate with Jess from my EJB's. Currently, I accomplish this with JMS or RMI/IIOP. However, both of those methods have too much overhead for what I'm doing. Any suggestions?
author and iconoclast
Posts: 24207
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No version of Jess is a "multithreaded application;" Jess doesn't create any threads of its own.

What Jess is, is heavily synchronized. There's no way to implement a Rete network that can be used from multiple threads without synchronization, so anybody who tells you otherwise is not telling you the whole story.

This issue has been hashed over more than once on the jess-users mailing list; search there for more info. The bottom line is that there's no free lunch. If you want contention-free data, then it has to be local to a single call, so use a pool, and check out a rule engine from the pool for each call, use it, and check it back in. Under these circumstances, the synchronization is irrelevant.
Screaming fools! It's nothing more than a tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic