Tomcat vs Pivotal tc Server - java

Could anyone advise as to the pros and cons of using Pivotal tc Server as opposed to just vanilla Tomcat for a Spring-MVC Java web application? Could find very little about Pivotal other than on their website and the fact it's packaged as part of the Spring Tool Suite. This lack of info is making me a bit wary about being dependent on it...
Background: Am preparing the development environment for a Spring-MVC project and currently evaluating whether to use the packaged Spring Tool Suite (STS) or just start with the latest Eclipse (possibly combined with the Eclipse STS plugin). Came across Pivotal tc Server as one of the optional components in this plugin.

Pivotal tc Server contains all of vanilla Tomcat, and has a few optional extensions designed to make it easier to deploy and maintain. Broken out into three groups, the diff looks like this:
Configuration extensions (No altered code, just config changes we implement)
Multi-Instance using shared binaries
Trivial to change Tomcat versions while preserving app and configuration
Variable Substitution in config files
Async Logging
Mild Security Tuning (ports, mgmt apps, JMX)
Code Extensions
Patch version releases – fix flaws in current release [e.g. tomcat-7.0.32.B.RELEASE]
Extended JMX interface
Additional Metrics
Application Deployment
Diagnostics Valve - good troubleshooting info when there's a slowdown
Config Templates – including custom-created
Change log level on the fly
Advanced Session replication (Gemfire)
Oracle DB Connection Proxy
Add-Ons
Windows Service Wrapper
RPM / Apt-Get / Debian installers (linux)
Startup scripts (linux)
Chef Recipes
Puppet Scripts
Password Encryption
Spring Insight for performance tuning
FYI on the tag thing, there's still the old "springsource-tc-server" tag. SpringSource is now Pivotal. (Can/should we update the tag or add a new one?)
Hope this helps.

SpringSource tc Server is an enterprise version of Apache Tomcat, the widely used Web application server. SpringSource tc Server is hardened for enterprise use and is coupled with key operational capabilities, advanced diagnostics, and is backed by mission-critical support.
SpringSource tc Server is designed to be a drop in replacement for Apache Tomcat, ensuring a seamless upgrade path for existing custom-built and commercial software applications already certified for Tomcat. Maintaining this level of compatibility enables our customers to add the business-critical functionality they need to more effectively run and manage their applications with the least amount of effort.
find more information at http://static.springsource.com/projects/tc-server/6.0/getstart/cgsdiffs.html

This doesn't answer your question about the pros and cons, but I found this site really helpful in getting tc server up and running in STS. http://sosiouxme.wordpress.com/2012/04/06/the-missing-guide-to-creating-and-modifying-tc-server-instances-for-sts/

To me it seems a high price for just getting a servlet container.
Specifically, it (the tc server) seems to try to mimmic a production quality application server (servlet engine) with the added features.
For development it seems overkill. You could just as well use Tomcat stand-alone or Glassfish or Jetty.
I would choose the tc server if my target was some cloud implementation of Cloud Foundary that was ultimately my target production deployment environment.
Finally, I just noticed that the tc server is a commercial offering. So, the licensing implications should the features become integral to your delivery, might have a cost that your project would not bear:
https://www.cdw.com/shop/products/SpringSource-tc-Server-Spring-Edition-license/2156278.aspx

Related

Is it possible to make a Spring MVC web app run as a "standalone executable" with Java and Tomcat embedded?

I have a web app built with Java, Spring MVC, and JDBC. The result is a WAR file.
To run it, the user has to install Java 8 JDK and Tomcat, and deploy the WAR file to the Tomcat server.
It would be great if they could just download the one file run it as a standalone application.
That is, run "the WAR file" and just browse to http://localhost:8080/myapp
Also, on Windows it would be great it was setup as a Server (like Tomcat is when installed with the installer).
Is there any way to do this? Maybe with Spring Boot or something new like that?
Yep, Spring boot is the way to go.
It allows you to build an executable Jar with all dependencies and a Tomcat (by default, can be changed) embedded.
But users will still need to download a JRE to execute the Jar, and a database if it's required, but you can use en embedded database like H2, HSQLDB..., depends what is your needs.
Yes . you can use spring boot to achieve your results. Kindly refer the below link for sample code
https://mkyong.com/spring-boot/spring-boot-hello-world-example-jsp/
You can use embedded jetty server using maven but that would require you to setup few things your app and may have align your existing app, please check this article for more information.
Jetty is similar to tomcat server in terms of running spring application, there are not much difference in terms of development. Tomcat is just more famous.
Other option as others said, is to migrate your app to spring boot which would be easy if you already have app written in spring (But that depends how much code you have and how much time you have)

Differences between jsf with and without jboss

It has been almost a month since i started working with jsf and jboss. I've worked with jsf before. But i didn't use jboss, just apache with it.
I've done a bit of search and i found that JBOSS is:
WildFly, formerly known as JavaBeans Open Source Software Application Server is an application server that implements the Java Platform, Enterprise Edition. JBoss is written in Java and as such is cross-platform: usable on any operating system that supports Java.
And instead of managed beans, there are Action classes. As far as i know, the concept is the same, but some annotations are different.
Are these the only differences between jsf with and without jboss? What good does it do in a jsf application? Is jboss really required?
No, you don't need specifically JBoss AS (now Wildfly, the name has been recently changed) but you obviously need some web container (de facto web server) which run JSF applications (for instance Tomcat, Jetty, Resin or Wildfly).
Difference between plain web container (Tomcat, Jetty) and application server (Wildfly, Glassfish) is that in AS you can use Java EE technologies like EJB or JMS. For JSF the difference is that JSF libraries are usually bundled with application server so you don't have to put them into your WAR file (or have scope provided in Maven).

How to activate JMX on my JROCKIT JVM for access with jconsole?

How to activate JMX on my JROCKIT JVM for access with jconsole?
(somewhat a follow up question to How to activate JMX on my JVM for access with jconsole?)
The main reason I ask is, because I get strange errors if I try to run jboss (6.0.0.Final) with activated JMX, and jboss doesn't start correctly. So maybe it is a jboss problem.
The easiest way to do this, and at the same time support a variety of potential networking configuration challenges, as well as work with any JVM (most ?) is to install a JMXConnectorServer in the JBoss App Server. Now you're using standard J2SE connectivity.
Older builds of JBoss 6 had this support built in and I'm not sure why jboss removed it but here's how you can recreate it.
Find the jar jboss-as-jbossas-jmx-remoting.jar which has a maven signature of org.jboss.jbossas / jboss-as-jbossas-jmx-remoting. Copy it to the [jboss-home]/server/[your-server]/lib directory.
Create a file like jmx-connector-service.xml as outlined below and drop it into your [jboss-home]/server/[your-server]/deploy directory.
(Sorry, was having trouble formatting XML for stackoverflow).
When the server starts, you will see a log statement like this, pretty early on:
INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://10.213.14.95/jndi/rmi://10.213.14.95:1090/jmxconnector
You can tweak the bindings, the use of a registry, the ports etc, but now you can open JConsole and connect to service:jmx:rmi://10.213.14.95/jndi/rmi://10.213.14.95:1090/jmxconnector.
You can find more information on the service here.

How do I slim down JBOSS?

We're using Jboss, but we are really only using its JMS stuff. So, is there a way that I can trim down what's loaded when Jboss starts?
You can go for a servlet container (Tomcat) + a JMS provider (ex. ActiveMQ), without using an application server at all.
From 6 years ago, here's a blog entry about configuring JBoss with "just the right stuff."
I haven't used JBoss in a few years, but in v4.0, you could just drop the desired jar files into the deployment directory, and JBoss would load... only those jars.
The correct way to do this, is making a separate profile on your JBoss server that contains only the things needed to use JMS. JBoss v5 comes standard with several profiles: minimal, default, standard, all and web. Each of those starts other services. If you do not specify any profile, you're using the "default" profile.
You can create your own profile starting from a copy of the minimal profile and adding services as needed for JMS support.
The JBoss documentation contains a bit of information on what the files in those profile directories are used for. See Jboss server configurations.
You didn't specify which version of JBoss that you are using. Keep in mind that there are some changes in the configuration between JBoss v4 and JBoss v5/6. The referenced documentation in the answer from Cheeso points to JBoss v4.

How do I push an update to a war file to clients?

Assuming my clients are running my J2EE WAR application on their intranet, and I have an update for them... how do I push the updated war file to them?
I'd like it to be automatic and require no human interaction on the client's side.
Can this be done?
Any help would be appreciated.
Tomcat (if this is your target container...) offers a manager interface that will allow you to deploy/start/stop applications.
I have used both ant and maven tasks to great effect in deploying wars remotely all while being built-in to the build process.
Depending on your deployment process, this may not work for you, but for dev & qa: highly recommended.
Edit: of course apache has to be configured for this type of access to be allowed.
See: Deployer how-to
Glassfish has documentation on deployment here.
Ant tasks are also available here.
Glassfish uses Tomcat internally, but the Tomcat Manager is not available as it is a separate application.
If the glassfish admin console can be accessed, it can be used to upload and deploy war files.
I'm not sure if you're comfortable giving them access to your source code repository...even in read-only mode.
If you are, then you could script up something in ANT to check out the latest version of the source code (using CVS task) and then build the .war file (using WAR task).
The only trick would be automatically deploying it once the war has been built. Tomcat will automatically deploy applications copied into a certain directory. For Websphere, see this question and this question.
For other J2EE servers I don't know how it would be done.

Categories

Resources