Friday Aug 20, 2010

GlassFish Server 3.1 builds integrated into NetBeans dev builds


Big 'Thank you' to Dmitry Lipin.

Thursday May 24, 2007

GlassFish Integration Features: NB 6.0

I noticed that planetnetbeans.org is pointing to this very idle feed for my blog, so many of my recent entries are not getting picked up. I figured I would provide an "index" entry here, until the planet folks get this worked out....

I recently started a new series of entries. You can follow this link to a search for all of my entries about new GlassFish integration features for NetBeans 6.0.

I also have some information about an experiment I am doing with web and enterprise projects related to keybindings. I looked at web application development in this first entry. I will post more results about enterprise project development sometime next week.

Insert a link to the news about the NetBeans 5.5.1 release here.

If you want to get the live feed of my NetBeans related entries, you will probably want to subscribe to: http://blogs.sun.com/vkraemer/feed/entries/rss?cat=%2FNetBeans

Saturday Feb 04, 2006

What will you find here

In this category, I document some of the things that I am doing to test the 'Ease of development' of Java EE 5.

For my tests, I develop Java EE 5 modules and application using NetBeans 5, which is quickly approaching release, instead of the bleeding edge NetBeans for Java EE 5 builds.

I will be using my Mac, which is running Mac OS X 10.4.3, Apple's JRE/JDK (build 1.5.0_05-72), recent NetBeans 5.0 builds and recent promoted GlassFish builds.

Since NetBeans 5 doesn't "support" Java EE 5 development, I figure this will really put the claims of the Java EE folks to the test.

So, ride along if you want. The trip may get bumpy, so be sure to hold on tight. I'll try to shout-out the bigger bumps so you can avoid them when you start doing you own development.

Tuesday Jan 10, 2006

Lazy people rejoice!

I have been making people work too hard in the notes I have been writing in entries about using NetBeans 5 to create Java EE 5 artifacts. If a Web or Enterprise project is targetted for GlassFish, the javaee.jar file is already a library for that project [Explore the project's library node to see it].

Folks will need to remember that javaee.jar needs to be added to General projects (Java Application and Java Class Library) that need to use Java EE 5 annotations.

Sunday Jan 08, 2006

Fastest Web Service Development in the West

Well, I read through this extensive article about creating Web Services and am ready to give you an alternative approach. After I show you how I approach doing Web Service development, I will compare the two approaches.

Get Ready

You need to install GlassFish and NetBeans 5. I am using GlassFish build 32 and a nightly build of NetBeans 5 (which will be an RC any day now). Once you install these, register the GlassFish instance with NetBeans.

Implement A Service

I will create a web-app based service, just like the other author did.

So, I create a web-app.

I create a class that will implement my service.

I add the service annotations.

    package services;
    
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    
    @WebService
    public class Greeting {
        @WebMethod public String sayHello(String name) {
            return "May I be of service, "+name+"?";
        }
    }
    
I change the web.xml file, so that the web app will be deployed as a Java EE 5 component, instead of a J2EE 1.4 component. To do this you just need to change the web-app element from
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
	 version="2.4">
to
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	 version="2.5">
I deploy the project.

Testing the Service

The GlassFish implementation of Java EE 5 includes the ability to test web services from within the Admin Console. Testing is just one of the features of the web service management capabilities in the Admin Console.

You can open the Admin console from within NetBeans, using the context menu of the target instance.

There are two sets of pages associated with web services. The first set provides general information about the services deployed on your instance. The other tab in the set allows you to create a catalog of registries.

The second set of pages/tabs allows you to manipulate individual services. The General tab provides all sorts of detailed information and has the Test button.

A new browser window opens when you press the Test button.

After you enter the arguments for the service, pressing the operation button provides the result and detailed informatiion about the SOAP messages exchanged between the service and the client.

Comparison of the two implementation methods

Both processes use JAX-WS 2.0 to implement a web service. Both methods deploy that service onto GlassFish. Both methods use NetBeans 5.0 as the development environment.

The method outlined in the other article stays within the boundries of what NetBeans 5.0 supports. My method goes outside that supported environment slightly, since changing the web-app element disables the web.xml multiview editor. If you need to do a lot of web.xml editing, change the web-app element LAST, so you can take advantage of the GUI editing capabilities.

The other method requires that you change the build.xml file for your web application. This is supported. The method that I outline in this entry pushes most of the "work" to the GlassFish deployment processing. This is also supported. It may be a bit less error-prone, since you won't need to remember to edit the build.xml for each SEI that is in the implementation WAR file.

Conclusion

At this point, you have a couple different strategies to implement JAX-WS 2.0 web services in NetBeans for deployment to GlassFish. Both are pretty easy to do.

You also have a couple different strategies for testing your web services.

You have seen some of the Web Service Management features exposed by the Admin Console.

Updates

Ludo pointed out a mistake in this note... If you register a project for deployment to a GlassFish domain, javaee.jar is ALREADY a library! To see it, explore the Libraries node of your web project. I have updated this note to account for that. I love it when things get easier!

Thursday Dec 29, 2005

Creating a Web Service and a Web Service Client

It looks like somebody beat me to the punch on this entry. There is an extensive article that covers this.

I may revisit this, soon, though.

I guess, I will need to take a look at this from the lazy man's perspective.

Tuesday Dec 27, 2005

What about Eclipse....

Though some of my co-workers may call me a traitor, I saw this article on developing EJB 3.0 using GlassFish with Eclipse.

As further evidence of Java EE 5's "ease of development", I don't think Filippo Diotalevi is using Eclipse's WTP.

About


Vince Kraemer writes the entries in this blog.

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
News
Blogroll

No bookmarks in folder

automarks