views:

25

answers:

1

I want to construct a system which is responsible for updating my database columns.

It is similar to registration of memberships.We have users and they send a request form of their wishes.First of all , the system inserts all of these information in a table .One column specifies the state of the request.It contains the integer values which refers to some states.

In addition to this , (which I want to do ) When the user send the request form , the system has sent e-mail.I want to change the state according to e-mail which will contain the link with registration-key.When the user clicks the link , the specific column of user updates the information.

How can I do these flow with java.I have currently used the Spring framework and java enterprise edition.

Can anyone help me ?

A: 

If I got your question right you need to implement workflow like
1. User submits HTML-form with some data
2. System sends e-mail to user with link like http://xxx.com/JSRegistrationConfirmation?d=hn7arypmLs4m7CkKLu
3. User clicks the link and opens confirmation web-page
4. After confirmation page is opened system knows that user is registered.

It's not that clear what exactly is the problem for you. System creates some temporary record in database, after user submits the form. After user opens the link your system makes this record permanent by updating related row.

A link that user receives should contain his ID at least, so that system could define what user confirms his registration. When user clicks the URL from e-mail, dispatching servlet deployed on your servlet container calls some controller which is responsible for processing user confirmation requests, than this controller in its turn makes some calls to service method, service method invokes method of DAO object and finally DAO object updates table row.

I know I sound like Captain Obvious, but could you be more specific in your question? Do you use Spring MVC? What did you try to do to implement this workflow and where did you stuck?

wax
I'm using Spring MVC .The system is intranet application of my company.JGoodies library is used for the view of application.Do I write a web service or something like that ? I don't understand really what I will do..
And the exact problem is caused by the properties of Spring.Spring frameworks runs the web services when they need.For example<property name="serviceUrl"> <value>${serverAppPath}/ws/tryService</value> </property>Frameworks runs this service when its needed.But I want to one service (which will update the rows ) is always alive and listen to ports.How can I do ?
Correct me if I'm wrong, but JGoodies is a library for Swing framework. So you have not a thin web interface, but fat UI client. And therefore I'm not sure Spring MVC could be useful here anyhow. Most likely you need to use Spring remote services to implement the task you've described. I recommend you to read some information on remoting http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html remoting. Here is a example application on this topic - http://www.javaworld.com/community/node/1179
wax