Good Java application server for ORM [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I just had a chat with a far more experienced and qualified colleague about JPA and application servers.
Right now, I am using JPA with Glassfish, which he says is a bad application server due to the amount of overhead. He also mentioned that he's using Tomcat, which is a standard, which also has a downside of not supporting heavy-weights like JPA in the Java EE. Then a few names are thrown around, like Hibernate and Spring, which I've heard of but not dealt with.
So my question here would be: What are some good choices for an application server that supports Java EE and JPA that's also popular and fast?
Note: I asked a similar question in the past and it was, somehow, closed as non-constructive. If you find this to be a non-constructive post, please write a response detailing why before closing this.

What are some good choices for an application server that supports
Java EE and JPA that's also popular and fast?
What server you choose depends on your needs. If you don't need in your application any of the EE features (EJB, transactions etc) then using a heavy-weight server doesn't make much sense and you could opt for Tomcat which is compliant (partially to the specs) lighter (doesn't have all these dependencies that you would not be using anyway) and gets the job done.
If you want specific reviews about all application servers then may be you should do some research and see ask which server suits you better for your requirements. But this is just my opinion...

I'm using Jetty with JPA Hibernate implementation, and it works really well. Out of the box, it is only a subset of JavaEE specs, but it is lightweight and can be extended with external libraries to add missing JavaEE parts.
(My standalone jetty-based application runs with 160MB available RAM on an embedded system)

As per me : The JBoss is the most popular and stable open source application server.
A good discussion available at Stack Trace

I would recommend you to first understand your application needs, and understand why you need JPA.
I have nothing against JPA, but in some scenarios it may introduce a performance issue, that you don't want you application to have.
Having said that, I would recommend you to work with a server that supports EJB-Lite.
You can use for example JBoss as suggested above.
Another interesting option is to use TomEE , which provides a full stack of web-profile over tomcat.

You can use JPA outside of a full Java EE server, but it has to be properly bootstrapped. I believe Spring has ways to do this, and would allow you to use JPA in tomcat, jetty, etc...

You have many options to choose Java EE application servers. Here is the comparison of popular Java EE servers from Wiki. They all are good application servers. But the most important thing is not server.Using a server that is more convenient for your developing environment is more important. Choose a server that is more convenient for you.

Related

Tutorial on how to set up a very simple J2EE web application from scratch? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I was wondering where I can find a web tutorial or book to show me how to set up a Java web App J2EE from scratch? Which starts from showing you what you need to install and how, To getting a server up and a Hello world on the browser?
I would rather not to use a framework such as spring or grails because I want to understand how it actually works at a Java level.
I have been using RoR for the last 2 years and I got a job as a trainee Java developer and would just like to get a better idea of how everything works, the architecture etc.
Many thanks.
You are trying to understand at Java Level? Well you need to know many things before:
If you want to learn J2EE specification try the JavaEE Sun (Nows Oracle) Tutorial.
It is a large one, but it is perfect if you want to know the JavaEE specification. You don't want to learn Spring yet, but Spring is just a framework to replace the normal JavaEE provided by Oracle.
But like JB Nizet said. There are a lot of APIs.
JSP - Java Server Pages for the web layer.
EJB - A solution for the business layer.
JNDI - A directory tree to put and search for objects.
JDBC - This is an important one, With JDBC you can interact with database.
JMS - You can send messages to other java applications in a async way. This is a really good designed API.
JTA - An api to manage transactions.
JPA - It is an ORM, Hibernate follows this API.
Try to learn design patterns to. They are very useful and important.
The best thing to do is to get Maven installed in your development machine, get the m2e Maven plugin installed in your eclipse, create a new Maven project, search for a jboss javaEE 6 archetype (one that deploys to a jboss as) or an appfuse archetype (they have ready made archetypes that deploy well to many application servers or servlet containers using Cargo plugin).
This will see you through for a long time.

What development stack should I learn to move from ASP.NET development to Java? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
So here's the story: I currently work as a C# developer doing ASP.NET. While I like C# I don't like the overall quality of the .NET community; most of my past experiences have been that many .NET developers are totally ignorant of actual software engineering (e.g. design patterns, code separation, etc.). The Java area seems a lot better in this regard even if you do have to put up with the occasional "architecture astronaut".
My actual question is this: I can pick up the Java syntax easy enough since I already know C#. However, I've only worked with the full Microsoft stack for web development (WebForms, although I've looked a bit at MVC and I've done some Ruby on Rails demo stuff so I know MVC fairly well). If I want to learn enough marketable skills to be able to apply for junior-level Java development positions at companies, what stack should I look at? There are dozens of Java web frameworks out there; what would be the most common one used in companies? It seems that Hibernate is the default standard for persistence (I've done a little bit with NHibernate) so I'm okay with that. I've also seen several new Java web frameworks that seem interesting, but learning them won't give me a leg up in applying for a job at a company because I'm bettering they're untested in the corporate world and aimed at startups and similar like most new frameworks.
Which framework would be the most likely to be used at a typical company that I should start to learn in order to begin a transition to a better quality community?
I'd actually recommend that you start by learning straight JDBC for database access and servlets+JSP for the web front end, and using those to implement a (very) simple web app. JDBC is the API on which basically all other Java database libraries are built, and likewise for servlets. These will require the least configuration necessary to get your app running. Once you've done that, you'll have a better foundational understanding and can take a look at:
Hibernate with JPA for persistence
Spring for dependency injection
One of the many web frameworks - Spring MVC, Struts 2, JSF or Seam are all viable
Java EE components such as EJBs.
If you're looking to do this on a full-blown Java EE container, I'd recommend using Glassfish as your server. But Tomcat is simpler (just a servlet container), and might be better for starting out with the first project.
Get familiar with Apache and JSP stuffs would also be helpful in addition to the answer above.

Should I go for Spring or stick with Java EE 6? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I will be finishing the core Java course and now I have to move on to Java EE side.
I am so much confused that I should simply go with Java EE 6 because I have the books which easily teach from start to end and everything is there.
Or should I start with Spring only?
Because as I have to start from scratch it is good I follow the trend which is good and more job oriented.
Or even if I do Java EE only and then if I need to move on to Spring it will be fast or vice versa.
Also where does Hibernate stand between them? I mean if I use Java EE 6, do I still need Hibernate or in Java EE 6, I don't need it.
Will I be at a disadvantage if I don't use Spring or Spring can make my building web application any way easier than the core Java EE/ JSF framework.
Though your question suggests that Spring and Java EE are two different things, in reality they are not. You can use many Java EE components like
servlets and JSP for Spring MVC,
JPA for Spring DAO.
JTA for Spring security
The only major thing Spring replaces in the Java EE stack is the EJB. Unless you insist on using EJBs, Spring should be the way to go. Also Spring provides inbuilt support for webservices and other things as well.
Also checkout the Groovy and Grails that use Spring as the base.
Finally I would say, functionality wise both does the same. It's code (Java EE) vs configuration (Spring), a matter of preference really.
All my comments should be taken with a grain of salt. I've been a Spring user since version 1.0; I've never used any version of EJB in production - from 1.0 to the present.
Spring has served me well: any technique that I would want to apply from Java EE is available to me in Spring. I've used the web services, LDAP, messaging, and portlet modules along with the usual suspects from persistence, remoting, and web MVC. The code is excellent. I find that emphasis on layering, coding to interfaces, dependency injection and aspect-oriented programming benefits my designs.
The truth is that you can choose either and make it work. There's little advantage or disadvantage at this point, because EJB 3 took so much from Spring that they're supposed to be similar. I can't say that from personal experience, because I haven't used EJB 3.
None of my employers or clients are clamoring for EJB 3. People in my market are using Spring or .NET to talk to web services over HTTP.
EJBs require that you use RMI or CORBA as your network protocol. I believe that HTTP based protocols - be it RPC-XML, SOAP, or REST - are winning, because simple and open usually does.
No one can foretell the future, so job prospect advice is worthless. Your local market conditions might not be the same as mine. You can hedge your bets and learn both. Whichever you choose, it's almost certain that you'll have to learn something new in the future that won't be either EJB or Spring. So pick one and be ready to change.
From my personal experience from learning Java EE/Web programming from the just standard Java, I tried to jump right into some of the frameworks without a clear understanding of how the Java EE/Web stuff worked. While not all of Java EE is relevant if you are using a framework like Spring, I think it is a good idea to have a good grasp of some of the underlying technologies. You don't have to go overboard, but understanding some of the basics is a good idea.
When something is not configured correctly in the libraries (like Spring) sometimes they assume a certain level of knowledge on their user's part. After struggling with a few basic issues, I spent some time and went back to the basics. After that I was better able to deal with the frameworks.
I would just forgo the EJB route though.
First please understand that Java EE is not a single specification, but a set of specifications. While Spring is a framework.
Spring has a neat integration with many Java EE specifications including EJBs.
The idea of using the specifications is to make your application portable between different implementations of this specification. Unfortunately this doesn't work very well in real life.
Now regarding Hibernate. Again: it's a framework. Java EE includes a specification called JPA. Hibernate implements JPA. You may find other implementations. So if you are using another implementation, you don't need Hibernate.
Now, you are probably want to know the bottom line. I don't really have it. If you are studying Java, the more you know, the better it will be.
If you are looking for technologies to start a new web application, I believe it's better to use Spring with a servlet container (servlet container is part of Java EE!) like Jetty or Tomcat + to use JPA (Hibernate implementation) for persistency.
Spring and Java EE 6 is in some sense similiar. They goes their way in parallel. I think it will be better if you learn Java EE 6 and then (if want/need) learn Spring.
In Java EE there is Java persistence that works very well for different database query purposes.
There is really no reason to go with Spring on a new project. There are a lot of applications out there that still use it though. You should definitely learn Java EE before Spring. Spring used to make development easier. At this point though Java EE is easier to work with and you can get rid of the Spring dependency as well.

Are there any new/updated Java web development frameworks to watch for? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I know recently Spring 3.0 was released which brought about a nice new set of features and ease of web development with their MVC package. However are there any new frameworks on the horizon and/or new versions of other frameworks that a web developer should have their eyes on?
I heard about the Stripes framework, but it seems as though development has stopped. It also seems grails has a new release coming out as well which that looks like it is just an update to support the new features in the latest groovy release.
Apache Wicket - light-weight component-based web application framework with strong separation of presentation and business logic.
Look also at the Spring Roo and Play framework and I almost forgot about the Vaadin. There are often enough new/upgraded java web frameworks:)
Have a look at JSF with JSR-299 in the Java EE 6 standard. You can do quite a bit, and it is standardized.
Version 2.0 of the Google Web Toolkit was released back in December. Some of the new stuff:
Development Mode: Previously you needed to use a "hosted mode" pseudo browser to quickly test your code (i.e. avoid a compile/deploy step). In 2.0, development mode allows on-the-fly running and debugging in any browser. This give big wins in speed and tooling (you can use Firebug etc.)
Speed Tracer: A plugin for Chrome that gives you highly detailed performance profiling for your GWT (or any) client AJAX code.
Compiler Optimizations: One of the great things about GWT is that the compiler is improved almost with every release meaning that you get a performance boost just by recompiling your code.
Code Splitting: You put 'splits' in your code, allowing the browser to download just the code it needs to get started and download the rest when it's needed (great for apps with very large amounts of client code).
Declarative User Interfaces: Define UIs in XML. Much less boilerplate code. XML<->Java integration via annotations.
Layout Panels: Improved, standards-compliant, base panels.
Bundled Resources: Image bundling from previous resources has been generified to allow any type of resource to be "bundled", reducing the number of requests the browser makes and allowing your app to load more quickly.
GWT works especially well with a good IDE (Eclipse or IntelliJ) since the IDE can take advantage of compile-time information from GWT, validating, on the fly your client code (since it's Java) and also things like CSS class name references and references between XML UI definitions and backing code.
I thought it was worth noting this as I just heard about the new release on java lobby. The
lift framework. It is written in scala, which is java per say.
Appfuse - Not really a framework, but it might be worth a look if you're looking for something to ease the initial ramp up effort on a Java EE project. It provides a bunch of Maven 2 archetypes that will create a "ready to run" application based on any of:
Struts 2
JSF
Tapestry 5
Spring MVC
Struts 2 is also very much worth a look. Totally different animal to Struts.

Which is the best Open source application server? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We are looking for a open source J2EE Application server for log budget deployments. We are considering JBoss and Glassfish. Which is the best open source application server? Any comparative study available?
JBoss has been used in production environment for over 6 years now.
Glassfish's codebase is over 10 years BUT most of the code is recent. Glassfish v3 (still in beta) has a microkernel (so is Jboss 5) architecture.
Glassfish has command line tools and a nice console. Since Glassfish is from sun, usually it will work well with the latest version of JDK/J2EE -- currently JDK 6/J2EE 5.
Glassfish should work well in windows, solaris and linux. Jboss(from redhat) should work just fine on linux, windows for sure.
community : a much much bigger community around Jboss. Glassfish still forming its community. Books and other 3rd party products are available for JBoss but not for Glassfish.
If something is mission critical and you need to get it up and running right now, you will NOT go wrong going with JBoss. However, if you have some time, in the long run Glassfish will NOT hurt you. Especially, if you're targeting Solaris.
After using JBoss from the very beginning and then switching to Glassfish in the last 6 months, I can honestly say that Glassfish is fast, reliable and full-featured. I would never consider going back. Im not talking "PetStore" here, my experience with these servers is in the high-transaction online stock-trading arena.
I'm sure the answer depends on your specific needs. You won't go wrong with either Glassfish or Jboss. I tend to prefer Glassfish because of the nice admin console. My advice to you is that you draw you requirements and test both app servers. Most benchmarks I find on the net tend to be a little biased.
A comparison table between JBoss, Geronimo and Tomcat for latter 2007.
This article has many interesting points to aid your decision and is worth reading:
Geronimo 2 is the clear choice if your
Java application needs are
particularly extensive or if you just
want to leverage total Java EE 5
compliance. Although JBoss 4.2 is not
completely compatible with Sun's Java
EE 5 standard, the JBoss 4.2 team is
responsible for many of the
cutting-edge technologies used by all
of the servers and added to the
standard Java EE 5 capabilities.
Tomcat 6 by itself is a lightweight
solution. It does not come with all
the Java EE features and additional
packages found in JBoss and Geronimo,
but also doesn't require much memory
and runs fast even on smaller servers.
In conclusion the author says:
Bottom line: JBoss, Geronimo, and
Tomcat are reliable, fast, and
definitely able to handle the traffic
on large-scale enterprise
applications. Furthermore, many of the
high-demand Java server technologies
presented in the features comparison
originate from the open source world,
not the commercial one.
I would consider any bells and whistles you might be interested in. JBoss has a lot of nice integration points with frameworks, such as Hibernate, but has a history of not playing well with Spring. Both very useful frameworks, both code change your decision on how you might proceed.
Websphere CE is also worth looking at, but over all my vote would be for glassfish. The v3 version is looking very promising.
Karl
I've had great experiences with JBoss 4.x, but unfortunately they seem to have gone off the tracks with their Java EE 5 implementation effort. The fact that JBoss 5 is so late getting to market is extremely disappointing.
The most impressive to me right now is Glassfish. It has a great pace of development, and appears poised to dominate once Java EE 6 hits the wire.

Categories