Using Prevayler to communicate from JSP to a Java Application

S

Snyke

Ok the idea is simple:
I'd like to use Prevayler as the Storage method for a Web Application
that uses JSP. The Web Application is used to access and modify the
data in the storage. Then on the other side I have a workhorse that
does a simulation on the data that is fed in by the Web Interface.

So my question is: is it possible to access a running instance of
prevayler by both the workhorse and the web frontend? And if yes is
there a good tutorial on how to set up the whole system?
 
J

jon martin solaas

Snyke said:
Ok the idea is simple:
I'd like to use Prevayler as the Storage method for a Web Application
that uses JSP. The Web Application is used to access and modify the
data in the storage. Then on the other side I have a workhorse that
does a simulation on the data that is fed in by the Web Interface.

So my question is: is it possible to access a running instance of
prevayler by both the workhorse and the web frontend? And if yes is
there a good tutorial on how to set up the whole system?

Can't you just pass the input from the web-frontend to the workhorse and let
both data-access and horse-work run there, with only one instance of
prevayler running?
 
S

Snyke

Well that is the option I'm thinking about right now:
putting the workhorse and prevayler together in one application so not
to bother with communication between the two of them.
But still the problem remains: how to access the data from the
webfront?
I'm thinking about either OpenJMS, RMI or openSymphony, what would you
suggest?

Thanks,
Snyke
 
J

jon martin solaas

Snyke said:
Well that is the option I'm thinking about right now:
putting the workhorse and prevayler together in one application so not
to bother with communication between the two of them.
But still the problem remains: how to access the data from the
webfront?
I'm thinking about either OpenJMS, RMI or openSymphony, what would you
suggest?

I don't know openSymphony, it seems like a bunch of different projects. Did
you have one particular project in mind? Of the two others I'd use jms if
asyncronous calls were needed, otherwise rmi. How about stateful session
bean? I don't know of any ejb container that prohibits disk access even if
you're not supposed to ...
 
S

Snyke

Sorry but I'm completely new to Beans, do you know any good tutorial,
or some explanation on what they are and what they are used for?

What I'd like to do is have a system where I get a Base Object on the
Persister from which I may access all the other objects by using the
references in the Base Object. The tricky part of this is that I want
the method calls to be executed on the Persister rather than the
webfrontend.

To explain this a bit better I'll use an example:
Lets say the Base Object in the Persister has a Collection of Accounts.
Now I want to create a new account, so the first thing I do is get the
reference to the Base Object and then from there I get a reference to
the Collection of User Accounts, I then check if the account exists and
if not I add it.
The details are pretty difficult to see but its important that on the
webfront I have onyl references to the object in the persister and no
copies, or otherwise my changes to them will be lost (in other words
not saved in the persister)...

I'm playing around a bit with RMI which looks nice to me but it has
some limitations, since if I access a reference I get a new copy which
is executed client side (on the webfront) instead of serverside (on the
persister).

Any ideas on how to get that to work???

Thanks,
Snyke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top