• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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
46
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.
 
Run away! Run away! Here, take this tiny ad with you:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic