Monday Jan 07, 2008

GlassFish/JRuby and NetBeans/Ruby Q&A - San Francisco

Pramod and I presented on GlassFish/JRuby and NetBeans/Ruby to a partner in San Francisco a few days ago. Here are the questions asked during the session:
  1. How does running the Ruby tests show the green/red status bar ?

    The status bar is shown if the test is run as a test, not as a file. (for example, using Ctrl+F6, not Shift+F6). Ctrl+F6 can also be invoked on the tested class and it will run the associated tests for the class. This is the same behavior when rake "test" target is invoked.
  2. How fast is it to find Ruby arbitrary types in particularly large projects ?

    It's almost instantaneous and can be achieved using Ctrl+O. It looks at project's classes, all the Ruby classes for the built-in libraries, all of Ruby-on-Rails, RSpec and all other gems.
  3. Is it possible to navigate between Ruby class and tests ?

    Yes, this can be achieved by using Ctrl+Shift+T keyboard shortcut.
  4. Is it possible to fix shadowing of variables inside a block of code ?

    Ruby shadows block variables by default.  If you have the following code:
     
    foo = 5
    [1,2,3].each { |foo|  puts foo }
    puts foo
     
    Then the block variable "foo" shadows the outer local variable and after running this code the local variable foo is equal to 3.

    If you enter this code in NetBeans it will pinpoint this problem and offer a quickfix to resolve it as shown below:

    NetBeans 6 Ruby Shadow Variable
  5. Are comments added on a new class seen in the context-sensitive help option ?

    Yes, new methods and comments are all shown in the popup rdocs.
  6. How easy is it rename method across main, test and other referring classes ?

    Method rename, just like variable rename, can be invoked by selecting the method name and invoking Ctrl+R or right-clicking and selecting "Rename" as shown below.

    Ruby Method rename
  7. Can Ruby code templates be loaded from an external file on the file system ?

    Install NetBeans Plugin Portal Update Center first and then install Code Template Tools Module. This module allows to import templates from an XML-based configuration file.   
  8. Would NB pick up dynamic code that is being generated during project execution ?

    Yes and No.  This problem cannot be solved in general as is an NP hard problem and reduces to the Halting problem.  However, since Rails follows many conventions, we can solve it for those typical conventions. Thus, lots of dynamic classes created by Rails, such as active record classes, are included in code completion - see for example Ruby Screenshot of Week 20. The finder  methods included in completion (find_by_price etc.) shown in the blog entry are examples of these dynamic things.

    Support for has_many and other similar attributes can be easily added as well. Please file an RFE.
  9. What are the plans for JRuby based debugger in NB ?

    The Ruby debugger currently only works well with C Ruby.   It does work with JRuby as well, but it's extremely slow (because there isn't a "fast debugger hooks" implementation available yet), so it's not practical for debugging large apps like Rails - but it's fine for smaller Ruby script> etc. With C Ruby it's blazingly fast.

    Work is underway to make the fast hooks work with JRuby as well and it's available with some duct tape.
  10. How can concurrency across multiple machines be achieved ?

    GlassFish can be front-ended with a Load Balancer to achieve concurrent applications. Read more details here.
  11. Can GlassFish support multiple Rails versions ?

    Yes, JRuby module on GlassFish Update Center allows to create stand-alone or shared WAR. A stand-alone WAR is self-contained and has all the libraries, gems & plugins required by the application. A shared WAR has only application specific libraries and all other classes are loaded from the classpath of GlassFish Application Server instance.

    Mutiple stand-alone WARs can be deployed on the same instance of GlassFsh. Alternatively, multiple GlassFish instances, each configured with a different Rails version, can be configured on one/multiple machines. These instances can be front-ended by a Load Balancer.
  12. In the GlassFish case, will the threads supporting the Rails instances share the variables or is it standalone ?

    Every request would happen inside its own Rails instance, and there would be no sharing during requests. The deployment model is largely the same as with mongrels, but without the mongrels.
  13. During record migration the associated Active Records need to be refreshed. How is this done as part of the hot deployment cycle ?

    A shim can be written that run the migrations upon deploy of the WAR file. There's a precedence for this sort of thing, with products like JIRA that do a database scan at startup to make sure you're running the correct version of the tables. It's not going to be for everybody, but if you have full control of your deployment it's a nice convenience.
  14. What advantages does JRuby-on-GlassFish offer to smaller enterprises ?

    GlassFish offers several advantages to enterprises:
    • Allows RoR and Java EE applications to co-exist on the same container.
    • Simpler/Similar development/deployment model
    • Database connection pooling
    • Hot deployment of WAR (no need to restart the container)

    And then of course, all the advantages of Load Balancing, Clustering, High Availability are available for further scalability as well.
  15. What are the benchmark numbers on JRuby ?

    Here are some of the pointers:

    http://blog.nicksieger.com/articles/2007/10/25/jruby-on-rails-fast-enough
    http://blog.nicksieger.com/articles/2007/10/25/jruby-performance-tweaks
    http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&lang=jruby
    http://antoniocangiano.com/2007/12/03/the-great-ruby-shootout/

    And around 1.1 there will be consolidated numbers for all the benchmarks. Performance has improved again since all these sets were published.
  16. When would 1.8.6 support be introduced in JRuby ?

    There are plans to update stdlib in JRuby 1.1 - that's really all is meant by 1.8.5 support, since largely that's all that's changed.
  17. How is load balancing configured in GlassFish ?

    A cluster of GlassFish instances can be load-balanced using any of the following approaches:


    Read more about how to setup/configure load balancer with GlasFish v2.
  18. How does GlassFish deal with caching of pages ?

    The file cache in Grizzly provides caching where static pages are served without talking to the Web server. 
  19. What is the state of Rubinius support in JRuby ?

    The state of Rubinius (and other Ruby implementations) is described at http://headius.blogspot.com/2007/11/top-five-questions-i-get-asked.html. Also read a more recent update here.

    There are no further updates on Rubinius bytecode support since Rubinius bytecode seems to be still changing. We've also managed to improve normal interpreted performance, so we're happy enough that installing a new bytecode engine hasn't been a priority.

    The JRuby team occasionally plays with getting Rubinius's implementations of various core classes to run in JRuby, and they usually work well but with about a 2x performance hit.
  20. Are there any benchmarks on the speed of static pages between GlassFish (Grizzly) and Apache httpd ?

    Yes, the benchmarks are available here.
Thanks to Tor, Sandip, Charles, Nick, Jean-Francois and Jan for helping with the answers. And Pramod to help me with noting the questions.

Technorati: conf glassfish ruby jruby netbeans rubyonrails q&a

Thursday Dec 13, 2007

GlassFish @ Delhi University

I presented on GlassFish and related technologies (Metro, JRuby-on-GlassFish and jMaki) at the Department of Computer Science, Delhi University last week. The slides are available here.

The talk was very well attended with approximately 120 students and 4 faculty members. The students were pretty excited and had great a interactive session.

 

Being an alumni of the school (many years ago ;), it was great seeing the new building of the department, meeting the faculty and interacting with the students. I reached there an hour earlier so that I can mingle with the staff and students and it was a lot of fun.

The department faculty proposed to use GlassFish instead of Tomcat for their next semester assignment. I believe this is a great move as it will allow the students to understand the simplicity and power of a great open-source and Java EE 5 compliant Application server.

I initiated the process of recruiting a Campus Ambassador from Delhi University and this will help establish a better relationship between this University and Sun Microsystems.

Here are the questions and answers that were asked during the session:

  1. Amongst the different Java training courses, how do I decide which one to pick ?

    Sun Learning defines several Learning Paths for different Java technologies (EE, SE, ME, Web Services and Web 2.0). Pick an appropriate learning path depending upon your interest. In addition, Sun Training Catalogue (click on your country) shows different events conducted by Sun Learning in the local geogrpahy.
  2. How does Sun make money with GlassFish being open sourced ?

    That's true, GlassFish is 100% open-source and totally free to use. The business model for Sun is that of selling support and services:
  3. What are the dis-advantages of GlassFish ?

    GlassFish provides an open source, production-quality and Java EE 5 compatible application server. It has world class performance ([1], [2]), .NET interoperable Web services stack, out-of-the-box clustering, load balancing and high availability support. However instead of identifying dis-advantages, here are some areas for improvement:
     
    • Feature-wise: The footprint for GlassFish v2 is higher than some non-full JavaEE containers (like Tomcat). This problem will disappear with GlassFish v3 which is small (< 100 kb), fast (starts up < 1 sec) and modular (load only required containers).
    • Ecosystem-wise
      • Community is not as well developed as Tomcat or JBoss because we have not been around as long. However the adoption is continuously increasing.
      • We are not yet as transparent as Tomcat, but we are more transparent than anybody else (including JBoss). Transparency will continue to improve in the future.
      • Our governance is still in transition.
  4. Any comparison between NetBeans and Eclipse ?

    Why NetBeans ? explains the top reasons to use the NetBeans IDE. Some specific points are:
    • Consistent UI across all platforms where as Eclipse runs best on Windows
    • A friendlier environment for people who are new with links to sample apps and docs accessible from within the IDE.
    • An easy to use website with tons of quality docs and screencasts.

    Here are couple of more links that provide a comparison between the IDEs:

  5. What are the main features of Ruby as compared to Java ?

    A comparison of Ruby and Java is explained in this blog.
  6. Why Ruby when there are many other languages ?
    • Ruby is getting popular due to Rails.
    • Ruby-on-Rails very popular among web developers.
    • JRuby is a pretty mature implementation of Ruby in Java, running on JVM and able to use existing Java libraries.
    • Complete deployment story on Solaris -- customer can chose native RoR or JRuby on Rails on GlassFish.
  7. What is the difference between Tomcat and GlassFish ?

    Tomcat is a Servlet container that can host JSP and Servlets. GlassFish is a Java EE 5 compliant application server that includes implementation for a Web services stack (Metro), EJBs, Java Persistence and many others incuded in the Java EE 5 specification. In addition to this, GlassFish also provides out-of-the-box clustering, high availability and load balancing capabilities that are required for enterprise applications. Read more about Why use GlassFish ?
  8. What does Sun offer to students ?

    The offerings are described in detail here.
  9. What is java.net ?

    java.net is a premier web-based, open community created to facilitate Java™ technology collaboration in applied areas of technology and industry solutions. java.net is a central gathering place for Java technology enthusiasts and existing communities across industries, platforms, and interest groups. Read more about java.net in the FAQ.
  10. How do I create a brand new jMaki widget ?

    This is explained in TOTD #20.
  11. What are the main differences between GPL and CDDL ?

    A detailed difference between EULA, GPL, CDDL and BSD in terms of copyright and patent rights is explained here.
  12. What are the different options of doing a collaborative research in association with Sun Microsystems ?

    The Collaborative Research program is explained here.
  13. What is the difference between GlassFish v2 and Sun Java System Application Server 9.1 ?

    There are three key differences:

    The detailed differences are highlighted here.

  14. What are the different ways GlassFish can be configured in NetBeans ?

    Two ways:
    • If you download a full version of NetBeans IDE then GlassFish comes pre-bundled and is installed for you.
    • You can configure an existing GlassFish installation on your machine in the Services tab. If the Services tab is not visible, then select "Windows" menu item and then "Services". Right-click on "Servers", select "Add Server...", select "GlassFish V2" in the "Choose Server" dialog box. Click on "Next" and follow the instructions.

The complete album is here:

Technorati: conf glassfish webservices metro ruby jruby jmaki web2.0 delhiuniversity delhi netbeans q&a

Wednesday Dec 12, 2007

GlassFish @ Bangalore, Chennai and Pune - Metro, jMaki & JRuby

I presented on GlassFish and other related technologies (Metro, jMaki and JRuby) in Bangalore, Chennai and Pune last week. The slides used during the preso are here. And here is the list of questions (along with answers) for you:

  1. What does WSIT offer ?

    WSIT stands for Web Services Interoperability Technology. It is a component of Metro - the Web services stack in GlassFish. WSIT specifically provides support for Security, Reliability, Transactions and interoperability with .NET 3.0. A number of screencasts are available to get you started with Metro and enable all the enterprise features mentioned using NetBeans IDE.
  2. Is Metro plugin available for NetBeans version < 6.0 ?

    Yes, Metro plugin is available for NetBeans 5.5.1. This is clearly explained in screencast #ws4. NetBeans 6.0 is now released and is the recommended version of the IDE.

  3. How do I use LDAP for authentication while using Metro based web service (with Security Token Service) interoperating with .NET web service?

    Security Token Service (STS) can be configured for LDAP authentication. STS service end can be protected with Sun Java System Access Manager web service agent (JSR 196 plugin). It can validate and authenticate the incoming user name token (username / password) against configured LDAP store at STS service side (when Access Manager is hosted as STS) and then issue the corresponding SAML token. You could also write AuthenticationValidator plugin to STS service, that can access and validate incoming username / password against Access Manager LDAP store using Access Manager Client SDK.
  4. Do Metro support Kerberos?

    Metro 1.0 does not support Kerberos. However the latest nightly builds of Metro provide Kerberos support.
  5. I want to contribute to GlassFish. Which areas can I contribute?

    Yes, GlassFish is 100% open source and encourage committers. Some of the ideas are available here. Please feel free to suggest any contributions at dev@glassfish.dev.java.net.
  6. What Ruby features are getting into Java language?

    If Java closures proposal is accepted then that will be a Ruby feature.
  7. Does jMaki take care of browsing history ?

    jMaki does not support browser history yet but this feature will be made available as an extension in the near future.
  8. Is jMaki extensible ?

    Yes, read how jMaki framework can be extended as explained here.
  9. What is the performance impact of using jMaki ?

    jMaki.js is the initialization script (18kb) for jMaki that is loaded when the web application is loaded. This script provides multiple features, included but not limited to:
    • support for common event model between widgets from multiple toolkits (using publish/subscribe)
    • Dynamic Container at component level - allows to resize the component within <div> and iframe
    • doAjax call (allows to asynchronously invoke services from back end)
    • JSON.serialize (serializes JavaScript objects to JSON)
    • inspect (2-level deep inspection of object)
    • logger & debugging (log all publish/subscribe events and other messages to enable debugging)
    • namespace API  (allows to namespace all the widgets for clean separation)

    The jMaki wrapper is a minimal code that needs to be written anyway to invoke the code anyway so there is no additional overhead there.

  10. Is Comet supported in GlassFish/jMaki?

    Yes, read about Comet support in GlassFish The Grizzly Comet and Writing a Comet application using GlassFish. Also try a simple sample that demonstrates how jMaki and Comet (read the explanation) work nicely with each other.

  11. Can GlassFish deploy EJB 2.0 apps ?

    GlassFish is Java EE 5 compliant which maintains backwards compatibility with J2EE 1.4 and so EJB 2.0 applications can be deployed.

  12. Do GlassFish support Active and Passive cluster ?

    In GlassFish the cluster instances talk to each other for health monitoring through GMS (of Shoal). The buddy instances talk to each other for replication of the session state. When a failure is detected the LoadBalancer can failover the request to any instance in the cluster. The session in question will be fetched from a replica to this instance in order to continue the conversational state of the session. In this sense, we have an active cluster.

    GlassFish does not have a concept of a standby or passive cluster which will take over when an active cluster fails altogether. That is usually considered a high cost approach for redundancy and not advisable. 

    Read more discussion here.

  13. Can we add a Metro Web service wrapper be created around EJB 2.0 ?

    Nope, Metro Web service wrapper can be created around EJB 3.0 only.

  14. How can an application deployed on WebLogic be migrated to GlassFish ?

    Migrate2GlassFish helps automate the migration of J2EE/Java EE applications to GlassFish.

  15. Can Entity beans be configured only as read-only beans - caching server for these beans ?

    Yes, read about the characteristics, good practices, how to deploy and refresh read-only beans.

  16. How can jMaki applications run behind the firewall ?

    Add the following Servlet parameters to web.xml:

    <context-param>
      <param-name>proxyHost</param-name>
      <param-value>PROXY_HOST</param-value>
    </context-param>
    <context-param>
      <param-name>proxyPort</param-name>
      <param-value>PROXY_PORT</param-value>
    </context-param>


    This is described in detail at https://ajax.dev.java.net/xmlhttpproxy.html.

Technorati: conf webservices web2.0 ruby jruby projecmetro glassfish netbeans q&a

Tuesday Nov 27, 2007

Metro, jMaki & JRuby/GlassFish Q&A from a Preso - Toronto & Montreal

I presented on Metro, jMaki and JRuby-on-GlassFish at a partner meeting on Nov 21 in Toronto and Montreal (yeah, both cities in the same day). That makes it 3 cities (the first one being Seattle) total for now!

I've given multiple talks all over the world to different types of audience but this was my first experience in terms of talking for 3 hours in the morning, flying to another city and then repeating the sessions. GlassFish (both v2 and v3), NetBeans IDE and Windows Vista behaved properly through all the demos. And my talks are typically demo intensive so it was fun! I enjoyed the overall experience (talking, demos, flying) :)

As always, the fun part was interaction with the audience and I always learn something new every time. And, in order to share the knowledge with you, here is the consolidated list of questions from both the cities:

  1. How much Ajax/jMaki support is available in Portal ?

    The Portal Pack plugin for NetBeans can support JMaki 1.0 for building JSR 168 or JSR 286 portlets that use jMaki widgets. There is no other explicit support on the Portal server for JMaki.

    The portlets using jMaki widgets can be deployed on the Sun Portal Server and they should work without any issues. The only catch is that a slight configuration is required to get these portlets to work with the Portal's Ajax container. This is to work around the cross-domain Ajax restrictions of the browser.
  2. What is the frequency of adding wrappers of newer version of toolkits, specifically Dojo toolkit ? Can I add/create the wrappers myself ?

    Frequency depends on the toolkits. Dojo revs about every 6 months with the first major rev just last month. Anyone can create and add wrappers to the palette in NetBeans as explained here. Adding to Eclipse is on a per-web app basis and it will be enabled on palette-basis in the near future.
  3. What level of browser support is available for jMaki, especially for the ones that are not mainstream ?

    Here is the list of supported browsers from jMaki's website:
    • IE 6 and 7 on Windows XP and Vista
    • Firefox 1.5 and 2.x on Solaris, Linux, Windows XP/Vista
    • Safari 2.x and Firefox 1.5 on Mac OS

    Unofficially jMaki runs on:
    • iPhone
    • Opera 9.2+
    • Opera Mobile
    • Older versions of Netscape

    Although the jmaki framework will work on these browsers some widgets may not work (such as those that use SVG) depending on the browser.

  4. When will a .NET version of jMaki be available ?

    If the demand is great we will be more than happy to work to make a version available. The greater the demand the sooner we could do this. If there is interest in the developer community on starting work on a .NET version we could accelerate this process. Please file an RFE if you are interested.
  5. Can the jMaki widgets be rendered to Flash ?

    Absolutely. We previously used some Flash Yahoo Maps and we use Flash for Sound. We are looking at having more media based widgets and it's only a matter of hours in the day that are slowing us down.
  6. Does jMaki work with Ajax4J and DWR ?
     
    jMaki works fine with DWR find a sample app here:
      https://ajax.dev.java.net/servlets/ProjectDocumentList?folderID=6977&expandFolder=6977&folderID=0

    As for Ajax4JSF (Ajax4J seems to not be active) we should work fine as jMaki widgets can be exposed as fully qualified JSF 1.1 or dynamic faces components. We also work with Facelets (see the jMaki samples for more).

And now for the Metro session:

  1. Is there any tooling for adding Security, Reliability and Transactions for Contract-First development ?

    Yes, this is explained here.
  2. Can the apps using JDK 1.4 as the deployment environment use any of the Metro capabilities ?

    Yes and No :) No because Metro programming model uses annotations heavily and that feature is available in Java SE 5 onwards. Yes because once the production environment is upgraded to Java SE 5 (it should work because of backwards compatibility, always good to check though ;) then you can develop your applications using the JDK 1.4 and deploy them on the upgraded production environment.
  3. How the Web service messages generated by Metro be logged ?

    The different options to log Web service messages in Metro are explained here.
     

And finally for the JRuby-on-GlassFish session:

  1. Other than simplicity and productivity, why should I use JRuby or Ruby at all ?

    Rails is the main reason for Ruby to gain popularity. And JRuby provides the simplicity of Ruby along with power of Java libraries.
  2. Can the number of JRuby instances created by GlassFish be configured ?

    Yes, it can be configured as defined here.
  3. With JRuby 1.0.2, there are significant performance differences between Ruby, Java and JRuby. What is being done to address that ?

    The recent releases of JRuby are much more better performing so it's recommended to use a more recent release. And with some JRuby Performance Tweaks the performance is at par with C Ruby (MRI). Also see JRuby on Rails Fast Enough for performance benchmark results.

 

Feel free to ask any other questions in Metro Forum and jMaki Forum or GlassFish forum or JRuby user list.

Technorati: conf webservices metro jmaki glassfish jrubyonglassfish ruby jruby netbeans web2.0 q&a

Monday Nov 19, 2007

Metro and jMaki Q&A from a Preso

I presented on Metro and jMaki in a invitation-only gathering on Nov 15. The audience in both the sessions was pretty interactive. Even though the sessions were invitation-only, I'm posting some of the questions asked during the sessions along with their answers.

  1. How to build support for jMaki in other languages such as Perl ?

    The best option is to check out jMaki workspace and look at Jmaki.php and XmlHttpProxy.php.

    The basics are relatively easy but not always obvious. There is no runtime spec so it's hard to get all the little details right: Theming, API keys, and the Proxy behavior are pretty specific. Please feel free to ask a question on jMaki Forums. It would be helpful if you can help us create such a document while adding support for Perl.
  2. Is it possible to point a DataTable widget to a Database table, introspect the database table and auto-generate the rows/columns ?

    Java Persistence API (in Java) and ActiveRecord (in Rails) already serve this purpose. There are detailed instructions for jMaki/JPA and jMaki/ActiveRecord. At this time there are no plans to tie closely to the database. Please file an RFE if you like this feature.
  3. Do we have any comparisons between jMaki and Open Laszlo ?
     
    We need to understand Open Laszlo better to prepare a comparison. At this time no comparison is available.
  4. How are topics implemented ? What is the data structure that implements them ?
     
    The topic name is a String / Regular expression Object. The topic names can also include wildcards (start, include, end with a \*). The payload must be an object (strings are objects). https://ajax.dev.java.net/publishsubscribe.html provides some more details.
  5. Do we have any performance data on large data sets - e.g. 15,000 rows in a Data Table widget ?

    Carla has a good sample that explains how pagination can be achieved for large data sets. The real question is "how much can you realistically cache on the client?". There are lots of algorithms and that can be more application logic. If you are going to deal with sets like this then the Dojo Grid is supposed to be good as it handles client-side caching and paging. We'll be adding it as a widget for the dojo 1.0 push.
  6. Are there any widgets that support streaming video ?

    Not yet but it would be very easy to wrap a widget like that. For example, please look at Sound extension that is available as wrapper over Flash.
  7. How to prevent scripting attack on jMaki-wrapped widgets ?

    jMaki wrappers are very trivial. The data from an external domain is not processed in any manner and instead passed on to the underlying toolkits. We make sure the wrappers are well tested and rely on the underlying toolkits to test their widgets.

And now for the Metro session:

  1. How more recent Metro jars be installed on GlassFish ?

    A stand-alone build of Metro can be downloaded from metro.dev.java.net. This build comes with wsit-on-glassfish.xml script and can be used to override the jars in an existing GlassFish v2 installation.
  2. Why Reliable Messaging is required if TCP/IP already provides reliability ?

    TCP/IP provides reliability at the network level. The Reliable Messaging support in Metro implements a transport-independent messaging protocol (defined by the WS-Reliable Messaging spec) with a SOAP Binding. This allows the SOAP message to be used in alternate transports such as JMS or SMTP. It also enables Reliability between a Client and Endpoint with multiple intermediaries in-between which is not possible with TCP/IP.
  3. Is the "Test Web service" feature available outside NetBeans ?

    The "Test Web service" feature in NetBeans makes use of Tester application in GlassFish. It is a web application that dynamically generates the JSP pages by introspecting the WSDL. Currently it only works only for methods that have primitive types in the signature.
  4. What would it take to run Metro on Embedded Jetty ?

    Servlet-based endpoints can be easily deployed on Jetty as explained here. The different variants of Endpoint.publish() currently runs only on Light-weight HTTP server bundled along with Java SE 6. An RFE has already been filed for this functionality and it will be fixed in a future release of Metro.
  5. Does Metro Security integrate with Active Directory ?

    Even though Metro Security cannot be directly integrated with ActiveDirectory, Authentication can be plugged through the integration of Metro with OpenSSO.
  6. What specific performance improvements have we made in Metro ?

    Here are some of the key performance improvements:
    • Revisited some of the key abstractions. The physical data representation was hidden from the user and yet backed by different implementations such as InputStream, JAXB objects, DOM node, Source, etc.
    • Faster, type-safe read access to commonly used properties such as Target Endpoint Address and SOAPAction. Also lazy reading.
    • Headers are made randomly accessible.
    • Filtering of data was enabled by creating an additional wrapper instead and delaying the actual filtering
    • Mostly JAXB is used to write the JAX-WS payload. There were numerous improvements made in JAXB such as:
      • Collapsing the layers and write directly to OutputStream instead of using StAX.
      • Pre-encode tag names to UTF-8
      • Numbers are converted straight to byte stream
      • Namespace prefixes encoded just once and reused
      • Lazy reading and writing of attachments (for example image is encoded in to JPEG byte stream)

    Metro team also presented a BoF 2526 on these improvements at JavaOne 2006.

  7. How much traffic is bloated because of enabling Reliability or Security ?

    There is a definite bloating of messages that happen when either Reliability or Security or Transactions are enabled. I'll provide the exact numbers in a later blog but all the messages are clearly defined by the existing specifications.

Feel free to ask any other questions in Metro Forum and jMaki Forum.

Technorati: conf webservices jmaki glassfish netbeans web2.0 q&a

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today