jboss normal client/server communication

B

bigbinc

I have been using jboss for a short time and am pretty interested, but
how should I research using jboss on one machine and a non j2ee on
another machine.
The non-j2ee will communicate through a servlet, the jboss will
receive the messages with its bean protocol.

Could I use SOAP, normal socket communication?

Berlin Brown
(e-mail address removed) <- this used to be my email, until you
spam-bastards killed it.
 
J

Jon Martin Solaas

bigbinc said:
I have been using jboss for a short time and am pretty interested, but
how should I research using jboss on one machine and a non j2ee on
another machine.
The non-j2ee will communicate through a servlet, the jboss will
receive the messages with its bean protocol.

Could I use SOAP, normal socket communication?

You could use both soap or webservices to achieve this, but you'd need
some client side libraries for marshalling and setting up the
communications in both cases.

Setting up a servlet on the server and communicate directly with this
from your client should also work, for many purposes «inventing» a small
protocol on top of http works just fine. The servlet could even emit
xml. If your client talk TCP you should be able to get along with no
specific client libs.

Communicating thru sockets should also work, but I'm not sure how you
should configure your serverside component. EJB's can't use sockets. I
guess servlets can, but using servlets (or jsp), talking http would be a
much more natural choice. (Actually EJB's can use sockets, nobody checks
that, but it's in violation of the spec, and taking into account how
ejb's are implemented (on various servers) you'd end up getting some
quite unexpected results, I suppose ...)

It's pretty important to consider the needs of your app before settling
for a specific architecture. Exactly how is the client meant to be
implemented? Swing? Web-pages? Is it perhaps a Windows-program? Is it
going to run in the same local area network as the server, or are they
going to communicate over the Internet? The most usual way to do this
today is to have everything running on the server and let users access
the app with a browser.
 
B

bigbinc

Jon Martin Solaas said:
You could use both soap or webservices to achieve this, but you'd need
some client side libraries for marshalling and setting up the
communications in both cases.

Setting up a servlet on the server and communicate directly with this
from your client should also work, for many purposes «inventing» a small
protocol on top of http works just fine. The servlet could even emit
xml. If your client talk TCP you should be able to get along with no
specific client libs.

Communicating thru sockets should also work, but I'm not sure how you
should configure your serverside component. EJB's can't use sockets. I
guess servlets can, but using servlets (or jsp), talking http would be a
much more natural choice. (Actually EJB's can use sockets, nobody checks
that, but it's in violation of the spec, and taking into account how
ejb's are implemented (on various servers) you'd end up getting some
quite unexpected results, I suppose ...)

It's pretty important to consider the needs of your app before settling
for a specific architecture. Exactly how is the client meant to be
implemented? Swing? Web-pages? Is it perhaps a Windows-program? Is it
going to run in the same local area network as the server, or are they
going to communicate over the Internet? The most usual way to do this
today is to have everything running on the server and let users access
the app with a browser.

Let me ask another question? (I could ask on jboss forums, I know)
Can you make normal jdbc connections to a database from an ejb. I
pretty sure the answer is yes, but is this an awkward way of
interacting with a database. I havent quite understood all of the ejb
specs to develop a transaction system but I already have database
interaction code.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top