A
A
Alexey Lebedev2013-01-26 21:37:29
Java
Alexey Lebedev, 2013-01-26 21:37:29

jboss and tomcat. How it works?

My colleagues and I got a server with JBoss, unfortunately without instructions.

We are working with Java for the first time, so the question arose: how does it all interact?

I understand this:
The client application makes a request to the server.
Tomcat (something like Apache and IIS) processes the request.
The Java machine (something like the ASP.NET environment) processes servlets that are compiled by the JDK.
Further, these servlets interact with the database and files.

Most likely this scheme is fundamentally wrong. In it, I cannot understand why JBoss is needed when there is TomCat.

As far as I understand JBoss is something like a library?

And the last question, where can I find out the principle of processing a request by JBoss?

And also what to read? Is there good literature?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
iZENfire, 2013-01-27
@swanrnd

JBoss is an implementation of the JavaEE specification (container for EAR and WAR applications).
Tomcat is a partial implementation of JavaEE insofar as it includes Web applications (a container for WAR).
One complements the other. All of this requires JavaSE JDK - Oracle JDK or OpenJDK6 or 7 - depending on deployment requirements.
In WAR applications, servlets are compiled in advance by the Java compiler into *.class file bytecode and an archive with *.class files and resources (*.war) is created. JSP pages from *.war are compiled on the fly into servlets on the first request. During the first request from the users, the servlet container (Tomcat) converts the JSP pages (if present) into servlets by compiling with the Java compiler from the JDK to bytecode. The container JVM JIT-compiles the servlet bytecode into native code and caches the native code in RAM to process subsequent user requests.
In EAR applications, the container (JBoss) performs similar work in conjunction with the JVM in JIT compilation of beans (*.class files in *.ear) and caching native code in RAM for subsequent multiple execution.
Meta-information recorded in *.war and *.ear files is needed for proper deployment, "parameterization" of servlet and bean property values, partial application life cycle management.

M
mayorovp, 2013-01-26
@mayorovp

The analogy is incorrect in that the Java machine is an analogue of CLR.NET, and not ASP.NET
The analogue of ASP.NET in this bundle is just Tomcat.
JBoss is completely unnecessary in the base case. JBoss is a JavaEE implementation (yes, sort of like a library). The closest analogue from the .NET world is Castle (they have two things in common: they both love xml settings files and include so much functionality that no one in the world has ever used all of them at the same time).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question