While I was looking for a desktop integration for google chrome i found the following to articles:
http://www.brighthub.com/computing/linux/articles/36842.aspx which describes how to use alltray and prism to integrate google tasks with you gnome panel.
and
http://www.makeuseof.com/tag/5-ways-to-access-your-google-tasks/ which describe how to use chrome’s feature to create a desktop shortcut to a web-application.
if you combine them both u can use the following command to create an integrated google task view in your gnome-panel:
alltray /opt/google/chrome/google-chrome --app="http://mail.google.com/tasks/ig?pli=1"
(alltray can be installed by using apt-get install alltray)
At my work we try to deploy locally on tomcat or glassfish and in production (and the other test environments) on webspere. For this we often need to overwrite a spring bean to implement it differently. For example we use jdni to loopup the datasource in the websphere environments, but we prefer to use a commons dbcp pool on tomcat. Also workloadmanager, shedulers, and MQ configurations tend to differ on the different locations.
Each application dealt with this in a different manner, so we wanted a general flexible solution to work with different configuration files in different locations. The solution present and the solution we choose where based on the on Joris Kuipers introduced in an older application, he blogged about this in http://blog.springsource.com/2007/06/25/code-samples-from-springone-beyond-the-obvious-talk/
We wanted to put our configuration files in a hierarchical structure as for example the following:
- context/
- context/env/{environment} ie context/env/l-tomcat context/env/p etc.
And configure the environment by using a system property.
The idea is that first all configuration files from the base directory and then the environment specific files are loaded. To make this work we extended the ContextLoader from spring the following way:
Continue reading Loading environment specific spring configurations.
When you have resticted internet access at work, dealing with eclipse plugins can be a pain.
A lot of plugins don’t make local-update archives anymore, so you have to look for other solutions. I had a look at epmt(http://code.google.com/p/epmt/) which is a nice, but not very stable application to mirror eclipse update sites. Unfortunately it uses apache httpClient to download source, while there is nothing wrong with this library, it doesn’t come with support for ntlm2 proxy authentication(java supports this from java 5 if i remember correctly so a bit strange it is not in there).
Continue reading Mirroring eclipse update sites
In my last 2 projects i generated some source code with jaxb. I used the maven plugin for jaxb and the source code was generated under src/main/generated-sources. This all worked quite well till i started to use some quality assurence plugins within maven. To exclude the generated sources i had to do quite some configuration and this got me thinking about why there is no annotation in java to indicate that a class or even method is generated.
Continue reading Generated source annotation
Yesterday i was profiling an application to test out the yourkit profiler. After firing a request on certain pages within the application i noticed that that there were 36 calls to get a connection from the datasource.
This asstonished me because a lot of those calls where made from methods where a caching mechanism was in place. After studying some more i noticed that there were far less then 36 SQL statements executed .
In this application we have all services annotated with sping’s @Transactional annotation. After some asking around and studying i found out that everytime a transaction was started the transaction manager would directly try to get a connection from the pool, even when no real database call was being made.
After some hints from a collegue and some research on the Internet i found spring’s LazyConnectionDataSourceProxy class. A class that can proxy a datasource and fetches a connection only when a statement is created. This class is verry simple to use, you just configure it around your normal datasource and pass this one in to the transactionmanager, hibernate etc.
Continue reading @Transactional and performance issues
At work we decided that we wanted all our validations on a page to happen within the validation phase of JSF.
On trying this we got a lot of trouble from fields that had such a relation to other fields that you could only validate them as a whole.
The problem here is that in JSF a validator is designed to validate just one component, so in general just one field. Unless you choose to write components for each serie of fields that are relative to each other. So for validating multiple fields the general trick would be to declare a hidden field component with a validator underneath. This would get the components by id and validate it’s value. The problem with this method is that you can’t re-use this validator. I’will try to explain the problem with an example: an adress validator.
Continue reading JSF: MultipleField Validations
Well today I re-tried to get JSF 1.2 and facelets to work on websphere 6.1 and after some struggling I finally got it to work.
The things I mentioned in my last post where instability and some problems with validators with arguments. The first part must have been a class-loader problem, or maybe a problem with myfaces 1.2 on websphere because today I tried the JSF-RI and it worked.
One example of a custom validator that did not work was:
<h:input value="#{bla}" id="bla" >
<ns:validator field1="test"/>
</h:input>
the problem was that in the validation phase the validator lost the field1 value. In fact this problem was caused by the default jsf version of websphere. It created a validator without implementing the StateHolder interface, and so I did not save and restore state in validators. Even on components the save and restore state were apparently not used like in jsf 1.2 (1 component also lost a value binding after putting jsf 1.2 in it). When you implement this interface in your validators and make sure you always have valid methods for saving and restoring state this problem is solved.
Continue reading Finally JSF 1.2 and Facelets on Websphere 6.1.
I finally got it to work see the next post.
Spent the last couple of days trying to get JSF 1.2 running on a websphere 6.1 installation with no luck so far.
We really need this because we have a lot of trouble with the default jsf bundled with websphere (JSF 1.1_02). Especially the datatable component in this release seems kind of buggy.
The problems of getting JSF 1.2 to work are the following:
- Websphere 6.1 comes with a bundled JSF in its classpath. And you can’t just remove that jar from the server as it is a custom jar with more than just JSF.
- Webspehere 6.1 is not a servlet 2.5 container, wich you would normally need for JSF 1.2.
For the first problem there seems to be a simple solution, or even 2.
Continue reading JSF 1.2, facelets and webspere: Can’t get it to work