hibernate

using camel jpa component for polling a database table instead of quartz and sql

Have been using camel quartz timer and sql component together to poll a database table and ran into thread issues. Though used a threadpool executor for the splitter after fetching records, the quartz component also had to be thread safe and which was bit asking more. For example

 

<camel:endpoint id="something"

            uri="quartz://sometimer?cron=${polling.cron.expression}" />

<camel:endpoint id="retrieveSql"

            uri="sql:${sql.query}?dataSourceRef=dataSource" />

Posted in Submitted by rizwan on Fri, 2011-03-11 04:38.

Famous IT Quotes

------------------------------------------------------------------------

UNIX is simple.

WebSphere portlet factory

Recently having the chance of working with websphere portlet factory, which was called bowstreet portlet factory before, to develop and deploy portlets on websphere portal server.

Its kind of amusing, as i have been grown up doing the portlet (j2ee) development doing the maven, spring, hibernate and jsf way and the idea of builders and RAD tools overwhelm me and my question was how to use the standard mvc patterns and hibernate into the portlet factory.

Let me see how it goes as this is the tool i have to use it with my current employer and let see    

Posted in Submitted by rizwan on Mon, 2008-12-29 09:00.

Configuring GlassFish App Server with Apache httpd

Here are the step by step instructions to configure GlassFish App server with apache web server.

Install & configure mod_jk:

Install apache web server and install the corresponding mod_jk. For instance if you have installed apache web server 2.2.4, go to the connectors web site of apache and download from the binaries mod_jk of the corresponding version of your installed web server. Then simply remove the version and place it in the modules directory according to your OS (I use windows OS and place it in C:/apacheroot/modules/ )

Create Workers File:

Create workers properties file inside the conf directory. If there is no sample then create it.Here is one sample you can put

Posted in Submitted by rizwan on Sat, 2007-10-20 16:37.

resources

Posted in Submitted by rizwan on Sun, 2007-07-22 08:23.

xplanner

xplanner is the one if you have java hosting, it needs bit of hibernate knowledge to install, its not as easy as xpweb though, but once you do a proper hibernate configuration then xplanner installs smoothly. Xplanner is simple to use, has simple interface and does the basic stuff like iterations and stories and tasks very well.

 

Posted in Submitted by rizwan on Sun, 2007-07-22 08:17.

hibernate with iSeries and myEclipse IDE

I was using myEclipse and reverse engineering a file on iSeries for hibernate and was using myEclipse hibernate jars. An application which was tested and working with 'identity' generator was not working now and I was digging hard to fix it. I tried the unstable 'increment' and sequence generators. For some reason I was not able to make sequence generators to work although iSeries supports it.

It kept on giving me that the driver (jt400) is not supporting this function (identity generator) .After long struggle I downloaded the hibernate latest 3.2.4 and replaced the hibernate.jar and yep that fixed the problem. So if you are using myEclipse IDE and using iSeries (especially hibernate reverse engineering) then better to replace the hibernate.jar from myeclipse jars with the latest. Also in the .hbm mapping file make sure that you are not specifying the schema attribute as well as full schema in the table attribute in class element.

Posted in Submitted by rizwan on Sat, 2007-07-21 17:44.

hibernate issues with as400

Was using increment as id generator in the hibernate mapping in table in iSeries (AS400). Using native does not increment the id so I had to use the 'increment'. The file was generated from AS400 source file (unique to as400 for creating tables from PDM). As always I was not able to use 'UNIQUE' in key and as expected was creating duplicate records when 2 applications accessed the file at the same time. More over I was forced to use one data source for both applications and these are the serious implications of using 'increment' as id generator. As advocated dont use increment in production at all.

Posted in Submitted by rizwan on Tue, 2007-04-24 19:24.

hibernate iseries updates

Finally I was able to configure a CRUD using hibernate for iSeries. The problem I was getting is I was not able to insert/delete to the files in the iSeries.

Hibernate was throwing this sql exception error:

java.sql.SQLException: [SQL7008] table_name in database_name not valid for operation.

It turned out to be a journalling issue of the file in the iSeries. The file to which you are inserting/updating should be under a journal.

here is the how you do the journalling for files in iSeries

So now I have CRUD application using hibernate on iSeries and now need to go fast path

Posted in Submitted by rizwan on Sat, 2007-01-13 15:58.
Syndicate content