Older blog entries for waffel (starting at number 8)

Holiday in Usedom Koserow


And here comes the story (sorry only in german) about my holiday with friends in Koserow (Germany, Usedom).

Am 29.12.2007 angekommen haben wir natürlich erstmal unser tolles Feriendomiziel begutachtet und dann nach ca. 6h Fahrt unseren Schlüssel bekommen. Die Empfangsdame war etwas eigenartig und wir wurden unvorhergesehen gleich mal um 230,- EUR ärmer gemacht, da diverse Dinge im Voraus zu bezahlen waren, was nicht wirklich klar war. So richtig geschockt hatte uns dann aber der Schlafraum für 2 Personen, welcher von der Küche lediglich durch eine Glaswand! abgetrennt war. Dieser Raum ist auch gleichzeitig das Wohnzimmer und für ein Pärchen, wie man sich vorstellen kann, denkbar ungüstig. Also mal wieder nicht richtig in der Beschreibung angegeben und damit durchgefallen. Zum Glück hatten wir 2 Ferienwohnungen und haben dann intern ein wenig umdisponiert was die Sache aber auch für einige von uns etwas teurer machte. Aber besser so als anders.

Abends dachten wir uns dann, dass man an der Ostsee, wenn dann denn auch mal Fisch essen sollte. Also haben wir uns zum Glück schnell mal per Internet informiert und rumgesucht, was es denn in diesem feinen Ort alles so an Fischrestaurants gibt. Nachdem wir bei 3 Gaststätten angerufen hatten (entweder schon ausgebucht, oder die Nummer stimmte nicht -> man beachte dass diese Nummer von der offiziellen Internetpräsenz des Ortes stammt, also wir Bürger bezahlen fleißig für den Quatsch) haben wir uns entschieden, einfach per Fuß nach einem geeigneten Lokal Ausschau zu halten. Letzenendes haben wir dann auch einen Platz in einer sogenannten Fischgaststätte erhalten. Den Fisch den wir bestellt hatten, konnte man aber nicht essen. Total viel Fett und Butter dran und das an jedem der Essen, welches bei 6 Personen schon sehr unterschiedlich war. Sehr “nett” dann auch die Bediehnung, welche auf die Frage “Wieviel ist denn auf so einer Fischplatte für 2 Personen” antwortete “das werden Sie schon sehen” oder auf die Frage “Schmeckt die Knoblauchsuppe sehr nach Knoblauch” mit “das kommt drauf an” antwortete. Eigentlich müsste man dann aufstehen und gehen, aber da man ja hier kaum einen Platz in einer Gaststätte bekommt, haben wir uns das ganze für einen netten Preis dann doch angetan. Das Restaurant heisst übrigens “Hansel Kogge” und ist nicht zu empfehlen.

Am 30.12.2007 sind wir dann nach einem leckeren selbst gemachten Frühstück (danke Höhmi ;-)) raus in die Natur. Hier zeigte sich, dass auch eine ausfürhliche Internetrecherge nicht wirklich ausreicht, um sinnvolle Wanderwege zu finden. Aus jetztiger Sicht also die Empfehlung: Vorher ne Karte besorgen, sonst klappts nicht. Wir sind dann an der Steilküste entlang gewandert und wollten eigenlich eine kleine Tour nach Kölpinsee und dann über Loddin zum Achterwasser machen. Bis nach Kölpinsee sind wir gekommen. Dort gab es auch eine kleine leckere Fischräucherrei, gleich an dem gleichnahmigen See. Dann wollten wir den ausgeschilderten Naturrundweg bewandern, was sich aber nach einigen Kilometern als sinnlos herausstellte, da man keinerlei Beschilderung fand und am Ende an der viel befahrenen B111 entlang laufen musste. Also haben wir das ganze abgebrochen und sind in Kolpinsee in ein sehr eigenartiges Cafee am Strassenrand “Stadt Usedom” eingekehrt um eigentlich Kaffee und Kuchen zu uns zu nehmen. Hier war die Bediehnung mehr als prasslig, da sie weder unsere Bestellung aufnehmen konnte, noch ordentlich bedienen konnte. So kam z.B. eine Kellnerin mit einem Eis (ich hatte mit Schwarzwälder Kirsch bestellt) und meinte “hier habe ich was heisses mit Eis”. Ich meinte dann (da ich der einzige mit einem Eis war) “das müsste meins sein”. Daraufhin fragte Sven die Kellnerin “Sie wissen wohl nicht was das für ein Eis ist?” und diese meinte “Nein, das habe ich ja nicht selber gemacht. Da müssen Sie einfach mal probieren”. So toll kann das sein. Hinzu kam dann noch der Preis und das man sich (man halte sich fest) bei der Endabrechnung bei Höhmi gleich mal um 10 EUR verrechnet hat. Die sollten für 2 Kaffe und ein Stück Kuchen 20 EUR bezahlen! Und die verdummte Bedienung hat nichmal gemerkt dass da was faul ist, sondern reagierte erst auf Nachfragen.

Abends hatte uns dann Gee eingeladen. Hier ging es dann zum Fischessen in die Bernsteinhexe. Dem einzigen dem es nicht schmeckte, war meine Frau Madeleine.

31.12.2007 Da wir noch einkaufen mussten, sind wir ungewohnterweise sehr früh aufgestanden und nach einem leckeren Frühstück in den Nettomarkt dieses Ortes gefahren. Naja … wie man sich einen Netto am Silversterabend eben vorstellt: Total runtergekommen, alles ausverkauft und das ganze Ding mit Massen an Menschen überfüllt. Aber wir haben trotzdem fast alles bekommen, was wir haben wollten und sind dann ab in die Bernsteintherme. Hier fanden wir das Parken sehr interessant, da man 3,50 EUR bezahlen musste, wo man dann als Besucher der Therme 1,50 EUR als Essensgutschein hatte. Auch ne Idee Geld zu verdienen ;-) … die Therme selber hat mir und meiner Frau nicht so gefallen, da schon ziemlich alt und renovierungsbedürftig.

Abends war dann wir immer Spieleparty mit Feuerzangenbowle und was sonst noch so dazu gehört.

Das solls erstmal gewesen sein … iss ja nun auch schon ne Weile her ;-). Photos gibts unter http://photo.hora-obscura.de/main.php?g2_itemId=13651

Syndicated 2008-02-05 11:43:48 from waffel's Weblog

Fast stream copy using java.nio channels


Many times I was asked how to copy fast and simple an input stream to an output stream. I have found a nice solution on koders.com . A programmer named Mr. Hitchens has contributed this code.

Here are my utility method which makes the real fast copy stuff:


public final class ChannelTools {
  public static void fastChannelCopy(final ReadableByteChannel src, final WritableByteChannel dest) throws IOException {
    final ByteBuffer buffer = ByteBuffer.allocateDirect(16 * 1024);
    while (src.read(buffer) != -1) {
      // prepare the buffer to be drained
      buffer.flip();
      // write to the channel, may block
      dest.write(buffer);
      // If partial transfer, shift remainder down
      // If buffer is empty, same as doing clear()
      buffer.compact();
    }
    // EOF will leave buffer in fill state
    buffer.flip();
    // make sure the buffer is fully drained.
    while (buffer.hasRemaining()) {
      dest.write(buffer);
    }
  }
}

And how you can use this method to copy an input stream into an output stream? Here comes the answer:


// allocate the stream ... only for example
final InputStream input = new FileInputStream(inputFile);
final OutputStream output = new FileOutputStream(outputFile);
// get an channel from the stream
final ReadableByteChannel inputChannel = Channels.newChannel(input);
final WriteableByteChannel outputChannel = Channels.newChannel(output);
// copy the channels
ChannelTools.fastChannelCopy(inputChannel, outputChannel);
// closing the channels
inputChannel.close();
outputChannel.close()

Syndicated 2007-10-09 09:21:31 from waffel's Weblog

Replacing deprecated ValueBindung stuff from JSF with ELResolver


I have searched for a solution to replace the as deprecated marked ValutBinding stuff with a better solution.

For example if you have a method to retrieve a JSF Bean from the faces context:

public static Object accessBeanFromFacesContext(final String theBeanName, final FacesContext theFacesContext) {
final StringBuffer valueBinding = new StringBuffer();
valueBinding.append(’#');
valueBinding.append(’{');
valueBinding.append(theBeanName);
valueBinding.append(’}');
final Object returnObject = theFacesContext.getApplication().
createValueBinding(valueBinding.toString()).getValue(theFacesContext);
if (returnObject == null) {
LOG
.error(”Bean with name ” + theBeanName + ” was not found. Check the faces-config.xml file if the given bean name is ok.”); //$NON-NLS-1$ //$NON-NLS-2$
}
return returnObject;
}

You can replace this now with following code:

public static Object accessBeanFromFacesContext(final String theBeanName, final FacesContext theFacesContext) {
final Object returnObject = theFacesContext.getELContext().getELResolver().getValue(theFacesContext.getELContext(), null, theBeanName);
if (returnObject == null) {
LOG
.error(”Bean with name ” + theBeanName + ” was not found. Check the faces-config.xml file if the given bean name is ok.”); //$NON-NLS-1$ //$NON-NLS-2$
}
return returnObject;
}

This retrieves a bean from the faces context. You can use the method for example to retrieve a TestBean form the faces context like

TestBean testBean = (TestBean)JSFUtils.accessBeanFromFacesContext(”testBean”, FacesContext.getCurrentInstance());

The TestBean object have to be added to the faces-config.xml as a managed bean. If the bean was not created at the point where you ask for it, the default constructor is called and the bean is created for you from the JSF framework.

Syndicated 2007-09-27 09:21:22 from waffel's Weblog

log4cpp release 1.0


A little bit late but hopefully for your interest.

I have pushed out the 1.0 release of the nice log4cpp package.

This release contains many small bug fixes and some new features. Currently we have problems under some windows environments with the building. But hey … I don’t have any platform, we support in this project to test it. Because my main focus is on linux, I have only created and tested it under the cool gentoo environment.

Today my friend ahöhma has created his own blogg (in german only).

Syndicated 2007-09-24 13:11:45 from waffel's Weblog

Welcome


Hello anybody!

This is my first Blog on wordpress and I hope that I have enough time to blog anymore than yet.

Today I have recieved bad new from the columba project. Our maintainer leaves the project. You can read his blog here.

- waffel

Syndicated 2007-08-13 08:01:03 from waffel's Weblog

buzztard

Created the buildbot and buildmaster for buzztard (see Buildbot project page). The buildbot runs now every 6 hours. Currently it builds the application but the test cases fails. Will have a look today whats wrong there.

JSF

Got today the book "pro JSF and Ajax" from Jonas Jacobi and John R. Fallows. I will read it the next days and hope they can help me to develop some nice ajax enabled JSF components.

The communication problem with my big application is now solved and looks after the first test working.

JSF

Started to work with Java Server Faces. It is quite complicated to learn and the best documentation is currently the mailling list.

I have to create a big application where my small part is called from one struts application, and then I have to call inside the java server faces application another struts web application. Quite complicated but I hope I can reache this today.

Log4cpp

Two new developers are now on the project.

I have to check there commits and create a small release.

Currently there are many open bug and one security patch on the mailling list.

Getting gnome-vfs compiling from cvs.

Today I got gnome-vfs compiling on my gentoo box. With the help of jhbuild it was easy to compile gnome core stuff from cvs and then compiling gnome-vfs from my project folder.

With the help of the command jhbuild shell I can switch to the gnome-cvs environment and check out the newest stuff.

Now it's time to start working on the gnome-vfs zip module.

Wow. Today I had the time to update log4cpp and applying some patches I got from the maillinglist.

Now it's time for another minor release with some fixups and cleanups. Removed the debian directories and build dependencies because we have now a debian package manager.

But before I must fix the testchain.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!