Archive

Author Archive

Commons Logging templates for Eclipse

No Gravatar

After my last article some folks at the company I work for asked for a Apache Commons Logging version of templates, so here it is.

Just as with the last article, import this templates: clogger-templates

The mappings are (in case you would like to use with SLF4J):

cloggercreate a logger instance with imports
cloginfocreate log entry of info level
clogerrorcreate log entry of error level
clogwarncreate log entry of warn level
clogtracecreate log entry of trace level
clogdebugcreate log entry of debug level
clogfatalcreate log entry of fatal level

Have fun.

Share

SLF4J Eclipse templates

No Gravatar

I’m sure lot of Eclipse developers are happy with Log4E, but for those who does not have Log4E or do not like to “pollute” Eclipse with plugins, I wrote few templates for SLF4J logging.

Just open Preferences and navigate to Java>Editor>Templates

Eclipse Preferences

Eclipse Preferences

…and press Import… button. And import: slf4j-eclipe-templates (download this file first)

Hit OK. Read more…

Share

A dream: Maven Site + DITA + Eclipse InfoCenter

No Gravatar

How nice it would be…

…to have DITA supported as a Doxia format, to be able to use DITA as a Maven site “language”.

…that Maven site could be rendered to eclipse help plug-in

…and deployed to Eclipse InfoCenter Server.

That would mean, that you could write single-source documentations that would be browse-able, indexed and search-able.

We use these technologies separately, and now I’m considering connecting them.

There are others with similar thoughts, but to be quite frank it looks like we’re alone…

Share

Please Wellcome Jaunty!

No Gravatar

Today is a great day! New release of Ubuntu is here!

Version 9.04 named Jaunty Jackalope is here. Go to getubuntu and fetch it while it’s hot. ;-)

This is a good moment to remember myself why I love Ubuntu:

  • No viruses, ad-ware, X-ware (you name it)
  • Stable, fast, pretty, neat, user-friendly, open, diversified, complete, easy, free, …
  • Great for office, music, photo, art, software development, Internet, collaboration, …
  • Great community, helpful people – support I’ve always dreamed about

I could go on… but this is more than enough.

Great job! Thanks to You, as we all made this happen! And of course special hug to Ubuntu Team!

p.s.: Yes, sometimes I criticize Ubuntu, but that is just because I believe it can be better, nicer, more user-friendly, etc.. In those cases please do not misunderstand me, I love Ubuntu, I love Linux, I love OpenSource!

Share
Categories: news Tags:

Farewell Vuze, wellcome Deluge

No Gravatar

Occasionally I use bittorent, and I really liked Azureus (or Vuze). But they switched attitude.

Azureus: A nice application, with lot a features. Built on Eclipse platform, – a model of how great is Eclipse RCP. I’ve been using it since about version 3.x, – about 2 yrs or more. It was one of my first torrent client. But things change. Licensing changed, interface changed, and now you could occasionally get an annoying pop-up calling for donation, – check Wikipedia on Vuze for details. I dislike this kind of attitude, and I started to search for a new client.

Under Ubuntu Transmssion would be a natural choice. But Transmission had a slow bootup, and freezed from time to time for a half minute or more. Then I decided to search for other free, featureful torrent client. I check wikipedia as usually, and after few hours of evaluations, I choose my new bittorent client: Deluge.

Deluge is really nice. Fancy, easy to use interface, with all the stuff I need: It has uPnP support, so no router hacking, has support for moving finished stuff to a new location, etc.. If you are also disappointed with Vuze consider Deluge!

There is only one thing I’m missing: the search. – Vuze/Azureus get that rigth, in my oppinion.

To be honest, I was hopping that Vuze will provide service-on-demand, pay-per-view (download), but that did not happened.

Share

New photo blog

No Gravatar

As this blog is a bit schizophrenic – a mixture of software development articles and photography related articles and content – I decided to move all the photography related writings and pictures to a new blog, which could be found at http://photols.com.

Existing articles won’t be moved. Already publish photos will be selectively copied.

So from now on, this site will be primary software development centric.

I hope this will produce a cleaner picture…

Share
Categories: news Tags:

Croatia 2008 part II: Pazin, Rovinj, Cres and around

No Gravatar

This is the second part about our holiday at Istria, Croatia.

While we were at Rabac, we made few excursion to the vicinity. We visited Pazin. An old town with lots of sightseeings. The town was nice, but you could sense the duality between the old town, old culture and a somewhat newer industrial city. You can still catch the smell of old Jugoslavia, the communist (or if you prefer socialist) one. As if the time stoped. This was not nearly what we saw at the seaside. Even people were different. Read more…

Share
Categories: news, photography, public photos, travel Tags:

Jackrabbit with Spring

No Gravatar

I was searching for a way to use Jackrabbit with Spring. There are articles about this topic, but each of them suggests using spring-modules. Now, my problem with spring-modules jcr implementation is, that they depend on non-released or obsolete 3rd party JARs, like apravez.* and jeceira. Just take a look at the pom file, and you’ll see.

On the other hand I do not feel a need for jcrTemplate, jcrCallback or any other ORM flavor helpers. I just need a nice, easy integration of Jackrabbit, where I can easily inject JCR Session into any class with spring.

The JNDI way would do, but I do not want to use JNDI, I want to configure Jackrabbit from my spring beans.

Now with those premises, I came out with a quite easy setup, that follows below.

Spring configuration:



  
    
    
  

  
    
      
    
  

  
  

The configuration of Jackrabbit is defined in repository.xml file, – I just took the default repository.xml, the one that is created when running TransientReposiotry for the first time. Of course for better integration and configuration define your own.

There is one more configuration point and that could be seen in the XML from above. Spring bean jcrConfiguration defines where the repository.xml configuration is and the path to repository resources, – the second argument. For test purpose I just used /tmp/repository but for production you might set it to something like: repository

Do not forget to set up spring RequestContextListener or you’ll be missing session (and request) scope in spring configurations. In web.xml just define a listener:



  org.springframework.web.context.request.RequestContextListener

From code we’ll just going to use the jcrSession. Here is a small example for usage:

@Service
public class TopicService implements BeanFactoryAware {

  private BeanFactory beanFactory;

  public Session getJcrSession() {
    Session jcrSession =
	  (Session) beanFactory.getBean("jcrSession");
    return jcrSession;
  }

  @Override
  public void setBeanFactory(BeanFactory beanFactory)
      throws BeansException
  {
    this.beanFactory = beanFactory;
  }

  public void myFucntion() {
    Session session = getJcrSession();

    // here you do what you would do with JCR...
  }
}

As my service is singleton I inject Spring Bean Factory with the help of org.springframework.beans.factory.BeanFactoryAware mixin, so each time I call getJcrSession() I get a JCR session bind to HTTP session.

Well, that’s it. A simple configuration, easy usage.

Share

Croatia 2008 part I: Labin

No Gravatar

This year we were spending our holiday in Croatia. It was a great and short holiday, as usually.

Croatia’s Adria is one of my favorite places for summer relax. The sea is clear, the beach is rocky, just as I like it. People are kind (yeap, they live from the tourist) and very professional. In any restaurant you could speak Croatian, English, German and on some parts near Italy even Italian. The food is high-class and you could just occasionally make a mistake by entering in any of their restaurants, – as almost all the restaurants are at same (high) level. – This is true for the seaside, for sure, for other parts I’m not sure.

I really like their old towns beside the sea. This year we were wondering around Istria.

We were at visiting Labin, Rabac, Pazin, Rovinj, just to mention few.

Today, I’m uploading pictures only from Labin, just few.

More to come soon.

Share

Hands on Bibble V!

No Gravatar

Today is D day! Or at least for Bibble 5.

Today at Photokina Bibble Labs is about to introducing Bibble 5, with lots of new features.

Stay tuned, because (I think) this is going to make a big blast.

Share
Categories: news Tags: ,