I would like to receive javaspace events in an entity ejb. This doesn't fit into the ejb framework, and I'm looking for design pattens to get around this. Is this beyond the scope of ebj2.0? Or am I reading into the spec too much.
As far as I know, you can't do it. You can't register a call back from an EJB. The best you could do is to create an adapter that runs on another JVM to receive the JavaSpace event and then lookup and call a method on your EJB.
Your EJB can read and take from a Javaspace, but you can't register a callback.
I also played with the idea of creating a JCA adapter to do this, it's technically possible, but never got around to it.
Don't know much about JavaSpaces. Take a look at EJB Connector(Resource Adapter implementation). But EJB Connector 1.0 spec architecture only handles synchronous communication.
If you can push the events to a JMS Queue, then a Message Driven Bean could handle the rest.
GigaSpaces provide JCA that allow you to call JavaSpaces from EJB components.