cancel
Showing results for 
Search instead for 
Did you mean: 

how to plug-in for hibernate netweaver

Former Member
0 Kudos

hi

please tell me the procedure for how to add hibernate to NetWeaver(plug-in).

Thanqqqqqqqqq

Guru

Accepted Solutions (1)

Accepted Solutions (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Guru ,

Detailed description available in this forum..

from this try to do the sample application..

let me know if u have any doubts.

If u r using Max DB as data base in your J2EE WAS , one default DataSource will be there ...

let me know if u want to create one t using the MaxDB .

Regards

Kishor Gopinathan

Former Member
0 Kudos

hi,

how to know default datasource(maxdb) and how to use it in my xml files

Thanqqqqqqqqq

Guru

kishorg
Advisor
Advisor
0 Kudos

HI Guru ,

from the Visual administrator itself u can find out the default DataSource for MaxDB.

1) Start and login in Visual Admin

http://help.sap.com/saphelp_nw04s/helpdata/en/23/fa1f1e5f6841cf92c64dc19d79f290/content.htm

here go to cluster -> JDBC COnnector service -> there u can find the default Data Source for MAx DB.

2) details of Default Datasource ..

http://help.sap.com/saphelp_nw04/helpdata/en/7f/d84b25d49846819d08e1c8ba03a9cd/frameset.htm

Regards

Kishor Gopinathan

Former Member
0 Kudos

Hi,

i am using MaxDb. how get the default datasouce of MaxDb and how to configur the xml files with the default datasource .

Thanqqqqqqqq

Guru

kishorg
Advisor
Advisor
0 Kudos

Hi Guru,

have you gone through the PDF that i have given in my last reply.

Guru ,

Degault data source , u can see in Visual Administrator .or even through Web Administrator

just follow these steps...(also refer the pdf )

-


1)just create a library project in NWDS , including the all all library files for hibernate. deploy this to WAS.

2)Create data source -. for this u have to login into visual administrator.(for login i have given link in my last reply).Here goto Cluster->JDBC Connector->

here if u can see the dta sources available. In a fresh system normally DS wr2 MaxDB only present.

(we can access this in programs by look up throuth their

alias names . for MaxDB default alias is SAPJ2EDB).

u can create new data sources here .

procedure for this is .

a)first u have to create one driver here. at this time it will ask for the driver jar files. u have to select those from local system.(if the default DS is not working,try to create ur own data source with MaxDB itself. lets see..)

b) then u have to create Data Source , here u have to select the driver u created. then also have to give the connection parameters for that data base.

c) Create a data source alias name ..

d) just right click on the data source u have created , and click Start..

3) Create your own Hibernate application.

the Details and code for that are in the pdf help.

one main think here is,

your hibernate.cfg.xml file will look like this..

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE hibernate-configuration PUBLIC

"-//Hibernate/Hibernate Configuration DTD 3.0//EN"

"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<!-- Generated by MyEclipse Hibernate Tools. -->

<hibernate-configuration>

<session-factory>

<!-- MaxDB:

<property name="connection.datasource">jdbc/SAPJ2EDB</property>

<property name="connection.url">jdbc:sapdb://<server Name>/<DataBase></property>

<property name="connection.username"><user name></property>

<property name="connection.password">r</property>

<property name="connection.driver_class">com.sap.dbtech.jdbc.DriverSapDB</property>

<property name="dialect">org.hibernate.dialect.SAPDBDialect</property>

<property name="show_sql">false</property>

<!-- mapping files -->

<mapping resource<b>="<Here u have to enter the Location of <class name>.hbm.xml>"</b> />

<- If ur class is in com.tect.Class then u have to enter com/test/Class.hbm.xml abouve->

</session-factory>

</hibernate-configuration>

so hibernate.cfg.xml is over. u have to keep this in the <b>WEB-INF/classes</b> folder of your web project.

main think do not forget to create <ClassName>.hbm.xml file in the same location of ur class file.

Regards

Kishor Gopinathan

Answers (1)

Answers (1)

Former Member
0 Kudos