views:

74

answers:

5

In a very popular ecommerce store, I'd imagine the actual processing of the credit card would be moved to some sort of dedicated application server, and made into more of a asynchronous process.

What sort of java application type would that be? i.e. a service that would take a message of the queue, and start processing the request and update some db table once finished.

In .net, I guess one would use a windows service. What would you use in the java world?

+1  A: 

In Java you already have great open source projects that do all this for you like Glassfish, Tomcat etc.

Suraj Chandran
+2  A: 

It is typically a J2EE application that uses a HTTP web service interface or a JMS messaging interface. HTTP interfaces are accessible via a URL, and JMS connects to a queue to pick up messages that are sent to it. The app can run on any one of the major commercial (WebSphere, Weblogic, Oracle) or free (Glassfish, JBoss) servers.

Kaleb Brasee
arent' web service or http requests not good since they have timeout issues?
mrblah
The client can set the timeout to anything they want it to be. It is just opening a connection to a port after all.
Kaleb Brasee
+1  A: 

For a mission critical system, you might want something like IBM MQ series as the middleware, and a straight Java application that uses the MQ interface to process the requests.

At a few banks that I know of, this is their architecture. Originally the application servers were written in C, as was the middleware. They were able to switch to java because the code that was actually doing the critical work (sending and receiving messages, assuring guaranteed delivery, protecting against interruptions if a component went down) were the IBM MQ's.

Larry Watanabe
A: 

In our case we use an application server from Sybase that can house Java components. They are pretty much standard Java classes that have public methods that are exposed for calling via CORBA. Components can also be scheduled to run constantly or on a schedule (like a service) to look for work to do (via items in a database table, an Oracle AQ queue, or a JMS queue). All of this is contained in the app server and the app server provides transaction management, resource management, and database connection pooling for us.

Dougman
A: 

Or use an OSGI environment.

zedoo