Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Using Prevayler to communicate from JSP to a Java Application (http://www.velocityreviews.com/forums/t147416-using-prevayler-to-communicate-from-jsp-to-a-java-application.html)

Snyke 11-01-2005 10:33 PM

Using Prevayler to communicate from JSP to a Java Application
 
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?


jon martin solaas 11-02-2005 09:59 PM

Re: Using Prevayler to communicate from JSP to a Java Application
 
Snyke wrote:

> 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?

--
jon martin solaas

Snyke 11-02-2005 10:54 PM

Re: Using Prevayler to communicate from JSP to a Java Application
 
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


jon martin solaas 11-02-2005 11:59 PM

Re: Using Prevayler to communicate from JSP to a Java Application
 
Snyke wrote:

> 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 ...

--
jon martin solaas

Snyke 11-03-2005 12:13 AM

Re: Using Prevayler to communicate from JSP to a Java Application
 
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



All times are GMT. The time now is 06:51 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.