views:

236

answers:

0

Hi, I am searching for a right way to use Hibernate in my web-service.

To begin I whant to describe, how it is working now. I have made a simple class with @WebMethod and @WebService annotations and stored it in axis2-"1.5.1/repository/servicejars" folder. This class invokes real service implementation using reflection. And all implementation classes are archieved in "jar" file and stored in "axis2-1.5.1/lib" folder. Also I am using Hibernate configuration and mapping files which are stored in "axis2-1.5.1/bin" (or any folder you are running axis from).

Project files if starting axis from "axis2-1.5.1/bin":

axis2-1.5.1/bin
    Hibernate.afg.xml
    map_1.hbm.xml
    ....
    map_n.hbm.xml
axis2-1.5.1/repository/servicejars
    webservice.jar - using reflection to invoke implementation
axis2-1.5.1/lib
    webserviceimpl.jar - holdding business logic files

To start axis:

axis2-1.5.1/bin# bash ./axis2server.sh

It works fine, but I whant it to be all-in-one. Please, help me with making it in a right way.