Welcome to

Confessions of a build breaker

A blog on Java, JEE and Spring by Jelmer Kuperus

Decrease the double click speed for Java Applications on Ubuntu Linux

October 13th, 2008 by site admin

When running any Java swing application (like intellij idea) on Ubuntu the double click speed is by default set to 200ms. If like me you find this anoying you can decrease the double click speed by taking the following steps

In your home directory create a file called .Xresources and add the following line

*multiClickTime: 400

Then from the commandline execute

xrdb ~/.Xresources

to make the changes take effect

Posted in General | 1 Comment »

Disabling URL rewriting for the Googlebot

September 8th, 2008 by site admin

Http is a stateless protocol. To work around the problems caused by this, web applications have the concept of a session. When a user requests a webpage for the first time the user is assigned a unique 32 character string. This string can be send along in subsequent requests to indicate that these requests are in fact originating from the same user. The most common way to pass along this string, or session identifier, is by sending it in a cookie. But what if a user chooses to disable cookies ? In that case a servlet container will fall back on url rewriting, the session identifier is appended at the end of any links in your application. So a link to your homepage might look like this after rewriting

/index.html;jsessionid=AA922A8B781AC4F95E68F88B0AF8CCB3

When you click this link the container will parse the jsessionid value and will determine that you are the same user that made the previous request. This way even privacy conscious users may continue to use your web site. This is something that all just works as long as you use something like the jstl url tag. When it detects that the user has disabled cookies it will automatically start rewriting all the URLs in your application.

Most of the time this is what you want. However there is an unfortunate side affect to this strategy. The Google bot that constantly spiders the internet for new content does not support cookies. This means that it will see, and index, the rewritten URLs. a quick search suggests that this is a fairly common problem. The rewritten URLs will hurt your google rating because less of the URL will match a users search query. So how do you solve it ? It turned out to be fairly trivial.

I created a ServletResponseWrapper that modifies the encodeURL and encodeRedirectURL methods so it does not append the session identifier. The wrapper is created in a servlet filter that only applies the wrapper when it determines that the request originates from the Google bot. You can check this fairy easily by inspecting the user agent header send along with every request. I included the source below

SeoResponseWrapper.java
SeoFilter.java

Posted in General | 2 Comments »

Too many open files

January 4th, 2008 by site admin

Today I was asked to review a piece of code that a coworker of mine suspected was causing “Too many open files“ exceptions in a production environment The code looked innocuous enough. He was using ProcessBuilder to create and run an external application. Regardless I booted into Linux and ran some tests. Now on Linux its fairly easy to find out if a program is leaking file handles. Once a program is started you can look up the process in the /proc file system. The /proc filesystem is a virtual filesystem that resides in the kernels memory it provides you with an easy way to change the behavior of the linux kernel and allows you to view information about currently running processes.

To find out what filehandles a java process is holding onto you simply navigate to /proc/[PROCESSID]/fd There’s a file there for every open file handle.

To count all open file handles you can execute ls /proc/[PROCESSID]/fd | wc -w

Using these simple tools I quickly found out that every time the suspect code was run. 3 filehandles where created that were not being released
As it turns out you need to explicitly close the file handles allocated by Process (eg. Close inputstream, outputstream and errorstream) Process does not release them after the invoked program terminates!

This seems to be a little known fact about Process. Its not mentioned in the javadoc for the process class and just about all the authorative resources get this wrong. Eg.


http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html


http://www.ibm.com/developerworks/java/library/j-tiger09304.html

Etc

At least sun accepted a bug report for improving the documentation. However its been open since 2006..
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6462165

Now I must admit I still am kind of curious about the application my colleague is developing because i believe the max number of filehandles is 65536 on most modern linux systems :)

Update: you can also use lsof -p PID for this. The added benefit is that for sockets it will also cross reference the from - > to for socket connections

Posted in java | 1 Comment »

Spring 2.5 and Maven problems

December 1st, 2007 by site admin

It looks like the spring 2.5 jars that where uploaded to the official maven repository are broken. The full spring jar is 321 kb large and only contains the spring aop classes.

Anyway I added springs own repository to my pom and then i got the correct jar and sources

<repository>
  <id>spring</id>
  <name>Spring Portfolio Repository</name>   <url>https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo</url>
</repository>

Posted in java, spring | 3 Comments »

Extensibility jBPM style

October 8th, 2007 by site admin

Currently I am involved in a project that is moving away from a proprietary workflow solution to a JBPM based workflow solution. One of the first things I attempted to do was try and make jBPM integrate with the identity management solution used in the project. I knew that jBPM comes packaged with some sort of identity component so I started reading up on it in the userguide.

“Management of users, groups and permissions is commonly known as identity management. jBPM includes an optional identity component that can be easily replaced by a company’s own identity data store.”

Sounds good. But then I kept on reading

When you want to use your own datasource for organisational information such as your company’s user database or ldap system, you can just rip out the jBPM identity component. The only thing you need to do is make sure that you delete the line …
<mapping resource="org/jbpm/identity/User.hbm.xml"/>
<mapping resource="org/jbpm/identity/Group.hbm.xml"/>
<mapping resource="org/jbpm/identity/Membership.hbm.xml"/>

from the hibernate.cfg.xml
The ExpressionAssignmentHandler is dependent on the identity component so you will not be able to use it as is. In case you want to reuse the ExpressionAssignmentHandler and bind it to your user data store, you can extend from the ExpressionAssignmentHandler and override the method getExpressionSession.
protected ExpressionSession getExpressionSession(AssignmentContext assignmentContext);

Yikes! What more, the reference to ExpressionAssignmentHandler class is actually hardcoded. So you cannot use a class that simply extends from ExpressionAssignmentHandler. It looks like you have to physically break open the jbpm-identity jar and replace the ExpressionAssignmentHandler contained within by a modified version

This must be some new kind of easy

update: Someone already submitted a Jira issue for this

Posted in java | 5 Comments »

What to do with an Interruptedexception

October 5th, 2007 by site admin

Many java methods, such as Thread.sleep and Process.waitFor can throw an Interruptedexception. InterruptedException is a checked exception and as such requires you to explicitly catch it. Up until recently I’ve always simply swallowed this exception. I was fairly confident that this was the proper way to deal with this exception because this is how I’d seen others handle it many times over. As it turns out I was wrong and this is the worst possible way to handle an interrupted exception

Brian Goetz of java concurrency in practice fame has written an article on the subject that is definitely worth a read

If there is anything you should take away from reading this article it is this :

“At the very least, whenever you catch InterruptedException and don’t rethrow it, reinterrupt the current thread before returning.”

Its interesting to see that even the spring guys initially got this wrong It was fixed in spring 1.2.8

Posted in java | 1 Comment »

On character set encodings: part 1

August 12th, 2007 by site admin

Have you ever encountered the problem that special characters such as the Euro symbol or acute accent would not display correctly and did you not know how to solve it? Don’t worry, you’re not alone. Character set encodings seem to be a little understood topic among Java software developers. And even after having done a lot of research on the subject myself I cannot attest to fully understanding everything there is to know about them. However what I have learned I would like to share with others on my blog.

Given that there is a lot of ground to cover I’m going to split this post up into a number of smaller posts. In this first post I will primarily discuss the history of, and theory behind, character set encodings. Later posts will focus more on common pitfalls and introducing Unicode into your java EE application.

So without further ado let’s take a look at the problem at hand

In the beginning there was ASCII

ASCII tableConceptually what a character set encoding is, is extremely simple. It’s just a formalized agreement on how to store characters as numbers. We might for instance agree on that the lowercase letter a is stored as the number 1, the letter b stored as number 2 and so on. If we get enough people to agree with our means of representing letters we will have created our own encoding.

When the earliest 8bit computers came about, the most popular encoding was the ASCII encoding. ASCII mapped 95 printable and 33 non printable characters to numbers. You really need not concern yourself with what those non printable characters are for, as it is irrelevant to what I am trying to convey. To the left of this text you find a 4 column table with to the left of the column a number and to the right of the column the character it represents. If I wanted to encode the word Java in ASCII, it would become

74, 97, 118, 97.



Example 1 the method testEncodeJava illustrates this

Extended ASCII

For the sake of simplicity you can think of computer memory and disk space as very large lists of numbers, for 8 bit computers the largest possible number you can store in such a list is 255.
You can see in the table that ASCII defined mappings for only 128 numbers (0 – 127). Initially everyone was free to create their own mappings for the remaining 128 numbers. Some companies used them to represent mathematical symbols or music notes. IBM mostly used this “extended range” to encode characters that weren’t part of the western alphabet, and therefore not included in ASCII, such as Greek and Hebrew characters. For instance the computers IBM sold in Israel interpreted 130 as the Hebrew letter Gimel (ג). Computers sold in America would render it as an e with an acute accent (é) and Greek computers would render it as the Greek capital letter Gamma (Γ) IBM referred these different uses of the 128-255 range as code pages and created and documented a great number of them.

ISO-8859

You can imagine that having all these different incompatible character encodings made it extremely difficult to transport text between systems. If someone used an American IBM pc to write his résumé and send it to Israel, it would arrive as rגsumג. The é is not included in ASCII and the default codepage for Israeli computers would be different.

Example 2 the method testEncodeResume() illustrates this

If the recipient would have known what codepage was used to author the résumé he might have been able to switch to that codepage to display the document correctly but that would mean that the program used to display the document would have had to be able to display text from all known codepages. With tens if not hundreds of different codepages already out there and with new codepages popping up every few weeks this just wasn’t an option.

To remedy this, the International Standards Organization (ISO) created the ISO 8859 standard that defined a number of standardized code pages. The standard was widely adopted and the ISO 8859-1 (also known as Latin-1) character encoding is probably the most frequently used character encoding on the internet today.

As an aside microsoft windows never used used ISO-8859-1 internally instead it used a superset of ISO-8859-1 called Windows-1252. This has long been seen as an example of Microsoft’s embrace, extend and extinguish strategy

More fundamental problems with codepages

However even with the ISO 8859 standard in place there are a number of fundamental problems with codepages.

• It’s impossible to combine, for instance, Greek and Hebrew characters in one file because the Hebrew and Greek characters live in different code pages and only one codepage can be active at any given time.

• Some languages such as Chinese actually have thousands if not tens of thousands of letters. You can never fit all of these characters in a 256 number character encoding let alone in a 128 number extended range on top of ASCII.

Unicode

To solve the above problems Unicode was created. Unicode is a continuing effort to create a single character set that includes every possible character on the planet. Eg. Greek, Hebrew Chinese and Latin are all included in a single huge set.

Unicode is not all that different from from the encodings we previously discussed. Matter of factly the first 128 numbers in the unicode specification correspond with US-ASCII The major way in which Unicode differs from codepage solutions is the way characters mapped to numbers will eventually be stored to some medium.

I already mentioned that you can think of memory and disk space as large lists of numbers that can hold numbers from 0 up to 255. Unicode specifies mappings for many more characters. How can you store these large numbers? The initial approach people took was to store each character as a combination of 2 numbers. This gave room for 256 * 256 = 65536 characters. Effectively this meant that Unicode documents would take up twice as much diskspace as their iso-8859 counterparts. This was seen as a huge drawback and held back the adoption of Unicode for a long time

The following sequence of bytes illustrates what the UCS-2 encoded string “Java” would look like

254, 255, 0, 74, 0, 97, 0, 118, 0, 97

The two-byte sequence 254, 255 at the beginning of the encoded string is known as the byte order mark or BOM. It indicates that the encoded characters that follow it use big-endian byte order. 255, 254 indicates little-endian order.

Example 3 the method testEndians() illustrates endianness and the byte order mark

A more recent solution is UTF-8. In most cases UTF-8 will use up considerably less space than UCS-2. It stores the 128 most frequently used (ASCII) characters in a single byte. Other characters will be stored as 2 or more bytes. The last bit of a byte indicates if it and the next byte should be seen as a single entity. If that next byte also has its last bit set the next byte will also be included and so on. This means you can store numbers of arbitrary size (as opposed to the 65536 limit imposed by UCS-2) An additional benefit is that because the first 128 unicode codepoints correspond to the ASCII encoding, any valid ASCII file is also a valid UTF-8 file. While UTF-8 does not have byte order issues, a BOM encoded in UTF-8 may be used to mark text as UTF-8. It only identifies a file as UTF-8 and does not state anything about byte order

If you live in a country that does not use a western alphabet UTF-8 might not be the best possible encoding. Because text written in such countries will not use the 1 byte ASCII characters very often.

Example 4 the method testCompareByteSizes() shows how much space is used for various encodings

Conclusion

So what have we established ? Codepage based character encodings such as ISO-8859-1 have a number of fundamental limitations that Unicode elegantly solves. If you live in a western country, encoding your Unicode text using UTF-8 will probably be the most efficient for you

In my next post on this subject I will explain how you can introduce unicode into your java EE application.

You can download the sample code from this blog post

Posted in General | 1 Comment »

Maven wastes more time than it saves. Cast your vote

July 31st, 2007 by site admin

I just finished added a pole to this blog and the first question I would like to ask my audience (all 3 of you ;) ) is. Does maven waste more time than it saves compared to say an ant or make based build. In my experience this statement holds true however I am curious what other people found.

Posted in General | 9 Comments »

JPA missing non-exotic features

July 14th, 2007 by site admin

Ever since the Java Persistence API was announced there has been a lot of talk, both good and bad, about this specification. Many people have pointed out that a criteria API and something like hibernate filters are currently missing. However these features might be considered “exotic” and I can largely live without them. However a few weeks back I started working on my first JPA project and quickly encountered some missing features that where not exotic at all.

First of all Lists do not preserve ordering. Next time you retrieve your ordered list it will be returned in an unspecified order. This means that if you have to implement an application in which a user can move items up or down in a list, you will have to manage indexing yourself. How’s that for “transparent persistence”. Persisting the order of the List is something that is being considered for inclusion in a subsequent version of the specification.

JPA does not support unidirectional OneToMany relations well
Say you have an Order that contains a collection of OrderLineItems’s and you do not want the OrderLineItem to hold a reference to your Order. In JPA You cannot accomplish this without introducing a jointable.

For both these issues there are vendor specific extensions that help you work around these limitations. But I can’t help but feel flabbergasted that this isn’t supported.

Does anyone know of any more glaring omissions in this spec ?

Posted in General | 4 Comments »

JavaFX released

May 9th, 2007 by site admin

It seems JavaFX was released today. There are some pretty good looking demo’s over at http://blogs.sun.com/chrisoliver/category/F3 and https://openjfx.dev.java.net/

Worth a look.

Posted in General | No Comments »

Guice versus Spring

March 20th, 2007 by site admin

Craig Walls, author of spring in action just blogged on the subject of Spring and Guice. Pitting the two inversion of control containers against each other he concludes :

“I’m glad that I spent the time to learn a little about Guice, but I’m not all that “juiced” about using Guice. In addition to all of the reasons given above, I’d much rather build my application against a well-established container like Spring that has a wealth of integration points with other frameworks and APIs”

Anyway it makes for an interesting read and for me it confirmed the initial impression I got from Guice.

Posted in General | No Comments »

Password protecting web applications in tomcat.

January 22nd, 2007 by site admin

A few days back I wanted to take an existing application, deploy it to a staging environment and password protect it without having to change the application code. How hard can it be right? As it turns out it’s not that hard but way, way harder than it should be. There doesn’t seem to be any support for this build into tomcat. So I ended up implementing my own valve that does this. Valves are components that enable Tomcat to intercept a request and pre-process it. They are similar to the filter mechanism of the Servlet specifications, but are specific to Tomcat They have a broader scope than Servlet filters and can be applied to the entire engine, to all applications for a host or a single web application. With this jar in my /server/lib, password protecting an application becomes as simple as

<Context docBase=”../app” debug=”0″ privileged=”true”>
<Valve className=”nl.jteam.tomcat.valves.PasswordValve”
password=”s3cr3t” exclude=”/test.html ” />
</Context>

Posted in General | 3 Comments »

Javapolis 2006 run down

December 17th, 2006 by site admin

Well it’s been an interesting (and tiring) week. Last week all the developers at JTeam attended the Javapolis conference in Antwerp, Belgium. The entire conference lasts for 5 days but we where there only for the 1 hour talks on Wednesday and Thursday. So unfortunately I didn’t get to see Alef and Arjen’s university session on spring 2. (Both used to work for JTeam) JTeam was represented by Uri and Bram who did 15 minute presentation (quicky) on facetsearch (facetsearch.org). Which seemed to draw in a small but very enthusiastic audience.

Anyway here is quick run down of the talks I found most interesting:

Pragmantic Clustering Guide - Mike Cannon Brooks

Mike is one of the founders of Atlassian, the company that among other things created Jira and Confluence. He talked about how the confluence team over the period of 4 or was 6? Months added clustering capabilities to Confluence. He concluded that there is very little to be found about the subject on the web, and that they where for the most part forced to invent the wheel themselves. He identified a number of problem areas, from the top of my head there where the quartz jobs, the Lucene indexes, the object caches, filesystem, and discussed how they solved the problems. For the largest part they basically use the database for a lot of things and assume it is infinitely scalable.
Mike is a good speaker (great aussie accent ?) and the presentation was definitely interesting. I would really like to see more of these “from the trenches” style presentations at conferences.

Web Continuations – Geert Bevin

I only went to this presentation because there was nothing that really stood out in this block. I had briefly looked at rife before and had been quick to dismiss it as yet another MVC framework that arrived 4 years too late. I still believe there is no room for rife in the framework arena, but continuations are definitely an interesting and novel idea that I would love to see implemented in more mainstream frameworks. Geert actually mentioned that Webwork now has alpha quality support for continuations, which I think is great. And he’s even working on a JSR to create a standardized API for doing continuations. Continuations are all about pausing the execution of a program and then being able to resume it at a later point, (using fancy classloading tricks) It seems to me that this is a great technique to programmatically create wizard style interfaces. (far easier than webflow!) All in all I was pleasantly surprised. Unlike most of the speakers at Javapolis, Geert isn’t a native English speaker but in his case it didn’t really bother me. He spoke slow but fluently Bonus points for playing doom on a 8 by 5 screen ;)

Spring OSGi – Costin Leau

Costin Leau is an interface 21 consultant from Romania who has been working on the SpringOSGi integration, I have to confess that (like many other developers) I knew little to nothing about OSGi prior to this presentation. It turns out that OSGi has been around for many years and among other things serves as the foundation for the eclipse plugin system. From what I understand you basically have this server that holds all or some of your jars. These jars should be OSGi enabled. OSGi enabled seems like a complicated term but it essentially just means that you need to add some entries to your jar’s manifest file eg. specifying the name and version of this jar. In this same manifest file you can also specify what other libraries this jar depends on (transitive dependencies). OSGi then makes sure that this jar only sees those libraries. This is very powerful because say component X depends on library Z 1.0 and library Y depends on library Z 2.0 which is not backwards compatible. You can still use library X and Y in your application. (Nice!) It also allows you to hot swap components / libraries at runtime without bringing the server down and run multiple versions of a component. Spring 2.1 will be OSGi enabled and will come with namespaces for OSGi lookups. All in all an interesting and enlightening talk. Clearly Costin speaks in public a lot. He is an articulate and interesting speaker

Posted in General | No Comments »

Disabling the Firefox DNS cache

November 4th, 2006 by site admin

If you, like me, make frequent changes to your host file, for instance because your staging and production environment both listen to the same vhost. You will have probably noticed that it takes Firefox a while to pick up on the alterations you made. This is because in order to improve performance by default Firefox caches DNS lookups for up to 60 seconds. If you do not feel like waiting, restarting the browser is your only option. Fortunately you can disable DNS caching. This is what you do :

Enter about:config in the adress bar.

Right click on the list of properties, select new > integer in the context menu

enter network.dnsCacheExpiration as the preference name and 0 as the integer value

Add another integer preference, this time use network.dnsCacheEntries as the preference name and again 0 as the value

Posted in General | 5 Comments »

JIRA firefox plugin

September 30th, 2006 by site admin

For all the JIRA users out there. I just created a very simple JIRA plugin that allows you to add your JIRA instance as a search site in the Search Bar in the upper-right corner of Firefox. Who knows you may find it useful. You can find out more about it here

Posted in General | 1 Comment »

XGL and java

August 20th, 2006 by site admin

A couple of months back I tried out a very nice opengl based x server called XGL. I followed the instructions outlined at http://www.ubuntuforums.org/showthread.php?t=131267 and had it working in record time. However there was one catch. Java applications would not render properly. For instance when I would start intelliJ Idea all the dialogs , menu items etc would display properly but the main screen would remain gray. I tried playing around with some vm switches for a while but eventually gave up and dismissed XGL for the time beeing. Last week a coworker brought up xgl again and it triggered me to take another look. As it turns out there is a bug in the sun jvm that causes this behaviour. The issue is described in this post and one of the developers was kind enough to provide a workaround. So I applied the patch, rebuild the deb file and it worked. In case anyone is interested i uploaded the patched deb here or if you feel like building it yourself these are the basic steps

sudo apt-get install dpkg-dev build-essential
sudo apt-get source xserver-xgl
sudo apt-get build-dep xserver-xgl
cd xserver-xgl-7.0.0
patch -p0 < ~/xgl-java-wmhack.bin
dpkg-buildpackage -b -uc
cd..
dpkg -i xserver-xgl_7.0.0-0ubuntu4_i386.deb

Posted in General | 3 Comments »

Crashing notepad

July 23rd, 2006 by site admin

Even though it’s kind of cheap to point and laugh at Microsoft’s “industrial strength” products I didn’t want to deny anyone this screenshot. I created a shortcut that automatically opens my hostfile using notepad by specifying the following target : %windir%\system32\notepad.exe %windir%/system32/drivers/etc/hosts and then tried to save my hostfile under a different name using save as
notepad

Posted in General | No Comments »

Making Putty and Tortoise CVS remember your password.

July 16th, 2006 by site admin

Every time I do a fresh install of my pc I spend at least 30 minutes figuring out how how to set this up because neither of these programs come with password caching and the workaround is neither obvious nor simple. So I decided to document the process on my blog

1) Downloading the tools

Navigate to http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and download putty.exe, puttygen.exe and pageant.exe, and place them in some folder “c:\program files\putty” would do just nicely

2) Generating the public / private key pair

Fire up puttygen and press generate now generate some randomness by moving the mouse over the blank area. Press save private key, and store the private key to some location on your diskCopy the generated public key to the clipboard located in the text field at the top.

3) installing the public key

Log on to your shell account on the cvs server and create a directory called .ssh if it does not exist allready. In this folder create a file called authorized_keys open it with your favourite text editor (vi, pico, nano). Paste the key puttygen generated into the file. Finally change the permissions of this file to read/write for the owner and no one else by issueing chmod 600 authorized_keys

4) Setting up pageant
Pageant is an SSH authentication agent. It holds your private keys in memory. To have it start automatically at computer startup go to

C:Documents and Settings\\Start MenuPrograms\\Startup

Create a new shortcut to

"C:Program Files\\putty\\pageant.exe" "path to key"

5) Check if it works

Double click the created shortcut, an icon should apear in the system tray. Now fire up putty.exe and connect to the remote host using the username you installed the key for. If all went well putty should log you in without asking you for a password.
I usually choose not to protect my private keys with passphrases mostly out of lazyness. However if you require additional security be sure to protect those.
As an aside did you know that you can specify an auto-login username in putty? You can set it at connection > data > Auto-login username.

Posted in General | 1 Comment »

JSF Security video

June 12th, 2006 by site admin

Today while looking around on google video I found a recording of a presentation by Duncan Mills on JSF Security. Am I the only person who thinks it’s crazy that such a simple and more importantly, very common requirement is so hard to implement in jsf ?

Posted in java | 1 Comment »

Integrating spring and GWT

June 4th, 2006 by site admin

I just completed my first shot at integrating Spring with GWT. You can check it out here

Here’s what you do to expose a simple service.

1) Write the remote service, note that the service no longer extends RemoteServiceServlet however HelloService should still implement RemoteService


public class HelloServiceImpl implements HelloService {
public String sayHello(String name) {
return "hello " + name;
}
}

2) Define this service in your application context

<bean id=”helloService” class=”nl.jteam.hello.server.HelloServiceImpl”/>

3) expose the bean as a gwt service

<bean id=”defaultHandlerMapping” class=”org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping”/>

<bean name=”/helloService” class=”nl.jteam.gwt.exporter.GwtInvokerServiceExporter”>
<property name=”service” ref=”helloService”/>
<property name=”serviceInterface” value=”nl.jteam.hello.client.HelloService”/>
</bean>

4) Change the clientcode to point to your Spring service. be sure to use an absolute url while running in hosted mode or it will complain


helloService = (HelloServiceAsync) GWT.create(HelloService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) helloService;
endpoint.setServiceEntryPoint("http://localhost:8080/helloservice");

Feedback is appreciated

Posted in java, spring | 14 Comments »

« Previous Entries

copyright © 2oo6 by Confessions of a build breaker | Powered by Wordpress

Ported by ThemePorter - template by Design4 | Sponsored by 47channel