Search This Blog

Friday, May 30, 2008

Integrating BIRT with hibernate and struts (deploy in server tomcat)

Download WebViewer Example inside birt-runtime-2_2_2.zip from eclipse web site.
if you are using jdbc driver in hibernate copy that driver into WebViewerExample\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.2.2.r22x_v20071206\drivers
then merge your application's web.xml with the webviewerExample's web.xml. Then Copy
\article\sources\sources\src\org\eclipse\birt\samples\scripted\hibernate\CustomerList to your class. use your own hibernate factory and Abstractclass inside your application.
Also you should add mail.jar to the lib

Now design your report with scripted data source,
and write following script at its open

importPackage(Packages.org.eclipse.birt.samples.scripted.hibernate);
(if you have out the customerList in yourpackage then write
importPackage(Packages.yourpackage)
cul = CustomerList();
customers = cul.listCustomers("from Customer");
iterator = customers.iterator();


The Customers should be updated to your Abstract Class


write following script at its fetch

if(iterator.hasNext() == false ){
return false;
}

var customer = iterator.next( );

row["CUSTOMERNUMBER"] = customer.getCustomerNumber();
row["COUNTRY"] = customer.getCountry();
row["CONTACTLASTNAME"] = customer.getContactLastName();
row["CONTACTFIRSTNAME"] = customer.getContactFirstName();
row["PHONE"] = customer.getPhone();
row["SALESREPEMPLOYEENUMBER"] = customer.getSalesRepEmployeeNumber();
row["CUSTOMERNAME"] = customer.getCustomerName();

return true;

write following script at its closecul = null;
customers = null;
iterator = null;



You should update (BIRT Report Tool from Eclipse Site)
Help»Find and Install»Find new»Castillo-&amp»Editor and Report»Birt

If you are connected through proxy
Go to Windows»preferences»Find and Install
Set up the proxy settings and enable it.

you should do it each time(Dont know why aand how to over come it)


The Report Designer comes with Birt is of great help. You can create a simple report.
Add columns to datasource for scripted data set.

Following Attachments will be of great help.

article.rar

This attatchment contains a good tutorial and a sample file , ie, enough for a starting with WebViewerExample from eclipse website


Technorati Tags:

Saturday, May 17, 2008

Basic procedure/activities when an application calls a libray procedure

when an user application calls a libray procedure it puts some value according to the system service required into a register and int 30 will be executed.
When this is executed Operating systm system service will be called and sytem changes to kernel mode also, so that system service can call privileged instruction set.

In linux system service is exectued by a s/s interrupt which transfers the call to the architecture specific entry.s where a method system_entry is there and according to the number in the register this will executes the needed System service

Also every systm call is specified using a number in linux the relation can be seen in the asm/unistd.h file

Also the error returned status will be stored in the globakl variable errnoh which is stored in the errno.h file
Error constants can also be seen here.

Process Related
For each process that is maintained by the system a double linked list of struct task_struct(which is stored in <sched.h>) is stored

Inorder to spped the search a hash list is also kept in fork.c which names #pdhash

J2EE jboss-jvm_bind problem

J2EE

jboss-jvm_bind problem

go to windows console ie, comman prompt type:- netstat -ao you can see all the process ids that bind to every port of the system. Select the pid that binds to port that need to be used by jboss usually(1097 for jndi lookup...) go to windows task manager(ctrl+alt+delete) then go to process tab From the view menu select columns check out PID check box Find the process that matches the process id from netstat -ao kill or close that application