Today I went about trying to implement quartz in my application. With spring the integration is very simple. Spring has implemented all that is required to get quartz up a running. Setting a Quartz Job is a 3 Step process. I will go through each process.
Archive for March, 2006
Drool's pretty Cool
Today I took a look at Drool. Since JBoss recently got together with Drool for their jBPM Module.
Upfront Drool looks pretty cool and I can see plenty of instances where I can use drool to sort of factor out the business logic.
One thing that comes to mind is the using drool to do tax computation since tax changes every year.
Initally I thought of having the tax module as a seperate jar which could be changed every year. But now with drool I think I will be changing drools metadat (xxxx.drl) file.
I will be posting a more detailed post with my discoveries and pains I had with drool.
Ciao.
Thomas
0
comments
My first Dig at JBoss
Yesterday and today I dug into JBoss and tried the tutorial which is put up at JBoss site.
I downloaded
JBoss AS 4.0.3
JBoss IDE 1.5.0.M3
And all the tutorials.
Initally I tried downloading the JBoss Plugin but that did not work with my version of Eclipse. So I decided to download the IDE provided JBoss incluse of Eclipse etc.
The bundled one worked for me.
Following the tutorial was a breeze. However when I deployed the application the first page came out fine. When I tried to run the servlet it threw a Servlet Exception. Dug in a found that the Servlet Exception was being caused by a ClassCastException at
home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);
Since I am new to JNDI I started poking around with the
Object ref = context.lookup(“java:/comp/env/ejb/Fibo”);
and the deployement discriptors.
Trying all permutations and combinations of one or the other. Then I got back to searching the net. I also lurked in IRC channels to get some hints. Thats when I hit the site.
http://www.jboss.org/?module=bb&op=viewtopic&t=59192
which lead me to sites
http://www.jbossgroup.com/index.html?module=bb&op=viewtopic&p=3887843
http://jira.jboss.com/jira/browse/JBAS-1775
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
http://jira.jboss.com/jira/browse/JBAS-1691
Finally like I mentioned in the forum
This is basically a classloading problem.
The new JBoss does not have a flat classloader like the old JBoss. So if you load a class in your EJB and you load a class in your servlet even though the bytecode is the same they are treated as diffrent classes.So for the tutorial to work you should remove the FiboEJB-client.jar from your FiboWEB.war file. Your servlet will reference the class FiboHome from the FiboEJB.jar file.
Hopefully the maintainers will fill in this part in the tutorial.
Till the next blog……
0
comments
Drupal Attachment Module Configuration Problems
Yesterday I had a terrible time with Drupal. It all started with some consern regarding overwriting files with the Drupal Upload Module later I found out that the upload renames the files even if we upload files with the same name. However they Have to be in diffrent pages.
Sombody on the Channel told me to try the Attachment module. Reading the docuementation it looked pretty straight forward. Install the fileManager Module. Install the Attachment Module and you are ready to go.
However it was not that easy. When I Installed the Attachment Module a UI to attach files did not appear in the pages. Only digging in deep into the documenation did I find that not only do you have to enable the module in access control but you will have to enable it in
Administrator – content – content types – xxx – configure and enable it to get it working.
That was not the end of my worries. When I attached my files the link that pointed to the files were all in a mess. I used to get a url http://mysite.com?p=http://mysite.com/files/active/0/xxx.yyy
Where it was supposed to be only
http://mysite.com/files/active/0/xxx.yyy
Looking deep into the forum I found that it was a bug and there was a patch written for it.
The problem has been discussed at Drupal Attachment Moduel URL problem
— attachment.module 2005-07-15 11:20:29.000000000 +0200
+++ attachment.module.new 2005-07-15 11:30:07.000000000 +0200
@@ -336,7 +336,7 @@$attrib = empty($attachment['description']) ? array() : array(‘title’ => $attachment['description']);
- $row[0]['data'] = l($text, module_invoke(‘filemanager’, ‘url’, $attachment['fid']), $attrib);
+ $row[0]['data'] = module_invoke(‘filemanager’, ‘l’, $text, $attachment['fid'], TRUE, $attrib, TRUE);
$row[0]['class'] = ‘filename’;
0
comments
How to use a dag repository
This post will help you to add other repositories to the current repositories when you try to install applications using yum.
First you import the keys for the RPM Keys. This can be done by the following command:
rpm –import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
alternatively you could also download the key to your local directory and execute the following command
rpm –import RPM-GPG-KEY.dag.txt
To get yum working you will have to tell yum where to look for the files. This can be done by adding the following section to /etc/yum.conf or, when available /etc/yum.repos.d/dag.repo
[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
Then all you need to do is give the yum command like
yum install xxx
yum update xxx
yum will look up dag.wieers.com repoistory too for the package
ciao.
0
comments
Php List Duplicate Messages
Recently I set up php list for sending birthday messages to people on the loyalty list. I was worried when I got 2 emails when I sent a test message. However I found out that it is a feature and not a bug because 2 mails are sent only when testing to show you what the text version and the html version will look like.
You can find a discussion about it here Duplicate Messages
0
comments
Creation of new event handler from a function in JavaScript
Creating a dyanmic event handler in the Javascript function is quite easy. JavaScript has an inbuilt function ‘addEventListener’ which creates a new event handler.
The syntax of the function is
element.addEventListener( type, listener, useCapture);
| type | : | Representing the type of event being handled. |
| listener | : | The listener is the method or function which is called when the event occurs. Preferably the function be an inline function. |
| useCapture | : | The value of this parameter is either true or false. When useCapture is assigned true the method/function is called after the creation of the event handler. Otherwise the event is called only at the time, when it is triggered. |
An example is given below
For more reference click here
0
comments
Migrating to Drupal CMS
Yesterday I nearly finished porting my web site to Drupal CMS (Content Management System). Everything works seamlessly however I will have to change the site header and keep it common among all the applications on the web site. The applications I currently have are Drupal for my web site, b2evolution for the Blog, phpGedView for the Family Tree.
The down side to all this is that I cannot get a common look and feel for the whole site and each application has its own look and feel.
What I’m really happy about is that my old home made php script works seamlessly with the new site so I did not have to leave out any content and adding content is a breeze.
Hopefully I will have a lot more content in the weeks to come.
0
comments
First Look at PHPList
We needed to implement an application that could send news letters to a list of subscribers. The first thing that came to my mind was to set up a mailing list because that was the usual way to go. However a friend suggested an application called PHPList.
As with most applications studying the UI is the most difficult part. However the features that PHPList offers is pretty cool. And would fit right in for our Newsletter applicaiton.
Since we are all lazy to implement the infrastructure to manage lists of users, their subscription, an option for them to unsubscribe, change their attributes, monitor views etc.
All these are implemented in PHPList. Our newsletter also needed to send customised letters to all the users. Ie the mail should contain the Users name.
PHPList has a feature where you can get the content of a message from a website. What we did was implement a JSP that took an attribute (ie. Name and added that attribute to the output) now PHPList could grab the page after passing the Name of the user. This fit right in to how we wanted our application.
I will let you know how it progresses.
0
comments
Linux Modem Worries
Today I ran into a funny problem. I tried to set up a moden on a FC4 Box. I went through the manuals and it suggested using a tool “wvdialconfig”. The configuration went on Fine but when I tried to dial out. The thing just would not dial. The OH LED did not come on. However it did dial when when I pulled out the Telephone line. Looks like it could be a AT Command problem. I will try again this week and post the results on this blog.
0
comments
