|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 14
Messages: 14
Messages: 14
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Kohsuke Kawaguchi reports that he's able to run Glassfish V3 as an embeddable container, much as Jetty has been able to run for years: drop the container into your classpath, and run via code. There's no classloader isolation with this, but the ability to embed quickly and easily is hard to undersell....now you have the embeddable GFv3 API, which can be used like this:GlassFish glassfish = new GlassFish(); // create smallest possible HTTP set up listening on port 8080 glassfish.minimallyConfigure(8080);
GFApplication app = glassfish.deploy(new File("path/to/simple.war"));
...
app.undeploy(); glassfish.stop(); Imagine the possibilities...
Thanks to the extensibility of GFv3, when you embed GFv3 in your JVM, you can plug into any of its extensibility points and tweak the behaviors in ways that you can't do with externally launched GFv3. You could also pick any flavor of GFv3 you want; if you just need the barebone servlet container and get smaller footprint, you can do that. But if you also need EJB functionality or some of our scripting offerings, that's cool with us, too.
...
Oh, did I mention the start up time? One good thing about using a single classloader to load everything is that classloading overhead becomes much smaller. On my system, the server now starts in 300ms or so, complete with a deployment of a webapp. How many seconds does it take for your application server to start? This is separate from the OSGi deployment model mentioned earlier by Glassfish bloggers (and mentioned here on TSS) but, then again, this capability might serve OSGi deployers well in a pinch.
|
|
Message #251450
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Hm...thinking outside of the box here...throw togethere a Swing app with embedded Glassfish or Jetty, display an embedded JDIC browser as the only control in the main frame and deploy into it a web app written using JSeamless framework: http://jseamless.org
and what you have is...Adobe AIR, but in pure Java, without the Adobe part.
Cool :-)
|
|
Message #251451
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Why should I use Glassfish V3 embedable instead of Jetty? Jetty is a very light and fast embedable server. Where is the innovation?
|
|
Message #251452
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
I guess it would be that Glassfish is a full Java EE 5 container, so out of the box you get support for EJB 3.0, sessions beans, messaging beans, etc. Impressive set of functionality to have in an embedded app.
|
|
Message #251460
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Adobe AIR, but in pure Java
Hm...thinking outside of the box here...throw togethere a Swing app with embedded Glassfish or Jetty, display an embedded JDIC browser as the only control in the main frame and deploy into it a web app written using JSeamless framework: http://jseamless.org
and what you have is...Adobe AIR, but in pure Java, without the Adobe part.
Cool :-)
I like the idea. In the same way, you might find interesting my post Revisiting XHTML as a base (?) for XUL-like programming, trying to gather a "global" view of this idea. For example, why not using Flying Saucer instead of a JDIC browser !?
Looks like (X)HTML is not dead, just as some web frameworks, like Wicket, are using it as template langage.
|
|
Message #251468
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Why should I use Glassfish V3 embedable instead of Jetty? Jetty is a very light and fast embedable server. Where is the innovation? What the heck are you talking about?
Whoever you are - you're making the same stupid mistake made by every idiot "Java EE programmer" who hates Java EE because EJBs were the wrong solution to a problem, and couldn't figure out that Java EE isn't the same as EJB. Not every problem requires a hammer; not every problem is a nail.
Jetty is a servlet container. It's a good one. Use it if it's all you need.
Glassfish is a Java EE container. It's ALSO a good one. Use it if you need more than Jetty provides - i.e., EJB, JCA, JMS, etc. etc.
While "jetty is as good as glassfish" is a qualitative statement, and can't be verifiable because of it, the comparison relies on an apples-to-fenceposts comparison. Speaking of fenceposts, aren't you supposed to be losing an argument with one?
|
|
Message #251479
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
... or just use AjaxSwing and you don't need GlassFish/Flex ;-)
|
|
Message #251505
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Interesting!
Doubly interesting as we're busy porting Jetty as an alternative webtier for Glassfish V3 (we also did this for V2 but that work has fossilized a bit as we've looked more to the future with V3).
Jan http://www.webtide.com
|
|
Message #251510
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Quite popular
Why should I use Glassfish V3 embedable instead of Jetty? Jetty is a very light and fast embedable server. Where is the innovation?
Speaking from many years of experience, I can tell you that the interest for running embedded containers is huge.
Still, Glassfish footprint is not amongst the smallest, and I dare say that there is quite some way to go before it can compete with the vendors already in that market segment.
Either way, Its all very interesting and I am excited to see what it will lead to.
|
|
Message #251516
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Quite popular
Speaking from many years of experience, I can tell you that the interest for running embedded containers is huge.
Still, Glassfish footprint is not amongst the smallest, and I dare say that there is quite some way to go before it can compete with the vendors already in that market segment.
Either way, Its all very interesting and I am excited to see what it will lead to.
I agree. It is useful to run a web server embedded, I have already used jetty in this way some year ago: and the winning choice was due to its small memory footprint and its performance.
you get the problem: Glassfish is an AS, with a huge memory footprint and its performances are not so beautiful (I used an old version....I don't know if recently it became faster).
I heared that the V3 will be shipped with and without EJB... a glassfish embedded without EJB is similar to jetty, but a glassfish embedded with EJB could be too heavy.
|
|
Message #251533
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Quite popular
People are talking about huge memory footprint of Glassfish, since it's a full application server.
However, Glassfish is lazy - i.e. it uses lazy loading of containers, and only loads what the app needs at run time. So if you're running just a JSP/Servlet web app, only the web/servlet container part is loaded, and it's memory footprint should be roughly equivelent to Tomcat (doubt it would be as small as Jetty).
Then, if your app is using EJB, JMS, or JPA, Glassfish will load those containers/libraries, as needed.
And that gives it an advantage over plain old Tomcat or Jetty.
Add to that the fact that Glassfish is highly regarded as being very fast, easy to work with, and is fully JEE 5 compliant (it's the reference implementation), and you have a very compelling solution.
|
|
Message #251705
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Look a little like incomplete task.
Some questions: 1. Is this a replacement for JMX or it uses JMX internally? 2. Are you going to give me my datasources and my bound objects? 3. Is it going to launch a new server or connect to an existing server? 4. Why not provide an ANT task? 5. You want to deploy your programs using another program rather than a build tool that is meant for that?!?!
As of now, nothing but Marketing crap. Add an ANT task around it, and then tell me it is usable.
|
|
Message #251873
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Kohsuke Kawaguchi: GlassFish v3 just got embeddable
Pawan,
Can you please explain what you mean ? How can a java program since jdk 1.5 not be using JMX internally ? Or are you referring to the OSGi buzz ?
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources.
(May 19, Tech Talk)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|