Sponsored Content
Full Discussion: Edit hibernate config file
Top Forums Shell Programming and Scripting Edit hibernate config file Post 302213936 by mc1392 on Friday 11th of July 2008 11:54:58 AM
Old 07-11-2008
Edit hibernate config file

I'd like to use a shell script to edit the params in my hibernate.cfg.xml file.
I need to substitute the database info(user name, password,url)

Here is a look at it:

Code:
<hibernate-configuration>
 <session-factory name="">
  <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  <property name="hibernate.connection.password">password</property>
  
<property name="hibernate.connection.url">jdbc:mysql://server.company.com:3306/brokerage</property>
  <property name="hibernate.connection.username">user</property>
  <property name="hibernate.current_session_context_class">thread</property>
  <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
  <property name="hibernate.ignorecheck">true</property>
  <property name="hibernate.lib">hibernate3.jar</property>
  <property name="hibernate.name">Hibernate core</property>
  <property name="hibernate.version">3.0</property>
  <property name="hibernate.when">runtime, required</property>
  <property name="hibernate.jdbc.batch_size">20</property>
  <property name="hibernate.cache.use_second_level_cache">false</property>
  <mapping resource="mybeans/Position.hbm.xml"/>
  <mapping resource="mybeans/SecuMaster.hbm.xml"/>
  <mapping resource="mybeans/Trx.hbm.xml"/>
  <mapping resource="mybeans/FinancialAccount.hbm.xml"/>
 </session-factory>
</hibernate-configuration>

I'm new to unix, what should I use or how to approach?
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl CGI to access / edit "root" owned config files

I am trying to write a CGI program which accesses UNIX configuration files and changes them as required. The thing is, I don't want the CGI program to be "root" owned - it's Perl based! Is there any way that the Perl CGI program can request a username and password - and then use this to... (1 Reply)
Discussion started by: WIntellect
1 Replies

2. AIX

AIX, Hibernate, Java 1.5 website problem

We have an AIX machine running Tomcat 5.0.28 along with Java 1.5. There are two web application on there however when we start Tomcat and unpack the WAR files only one of the sites work. Then if we remove the working site then the other site starts to work. So it appears that one is taking... (0 Replies)
Discussion started by: coaxis
0 Replies

3. Linux

How to enable Hibernate

Hi, I want to enable hibernate in my machine. when i click hibernate option, it is throwing message that hibernate is not enabled in kernel. earlier, i was hibernating in the same machine with windows os. any idea ? Thx in advance. Siva (0 Replies)
Discussion started by: Sivaswami
0 Replies

4. Red Hat

Hibernate in Linux

1) How to enable Hibernate in Linux ? 2) Does compiling kernel from source code alters the current setup of the kernel after implementation Thx in advance, siva. (3 Replies)
Discussion started by: Sivaswami
3 Replies

5. Shell Programming and Scripting

Edit a config file using shell script

I need to edit a config file using shell script. i.e., Search with the 'key' string and edit the 'value'. For eg: below is what I have in the config file "configfile.cfg". Key1=OldValue1 Key2=OldValue2 I want to search for "Key1" and change "OldValue1" to "NewValue1" Thanks for your... (7 Replies)
Discussion started by: rajeshomallur
7 Replies

6. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

7. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

8. UNIX for Advanced & Expert Users

Hibernate and Suspend

I have a C++ program which ends up getting run on every conceivable distro. What I can't do in C++, I can do by shelling out to the O/S. I am trying to find a portable way to send the system into hibernate and suspend modes. For users who have pm-utils, of course, I can use that, but I am trying... (4 Replies)
Discussion started by: BrandonShw
4 Replies
asadmin-delete-jdbc-connection-pool(1AS)			   User Commands			  asadmin-delete-jdbc-connection-pool(1AS)

NAME
delete-jdbc-connection-pool - removes the JDBC connection pool SYNOPSIS
delete-jdbc-connection-pool --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive] [--cascade=false] connection_pool_ID Removes the JDBC connection pool. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. --echo setting to true will echo the command line statement on the standard output. --interactive prompts you for the required options that are not already specified. --cascade If set to true, deletes all the connector resources associated with the pool, apart from the pool itself. If set to false (default), the deletion of the pool fails if there are any resources associated with the pool. Either the resource has to be deleted explicitly, or set the option to true. OPERANDS
connection_pool_id name of the JDBC connection pool to be deleted. Example 1: Using the delete-jdbc-connection-pool command asadmin> delete-jdbc-connection-pool --user admin --password adminadmin --host fuyako port 7070 XA_connection_pool Deleted the JDBC connection pool resource with id = XA_connection_pool Where: the XA_connection_pool resource is deleted. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-jdbc-connection-pool(1AS), asadmin-list-jdbc-connection-pools(1AS) J2EE 1.4 SDK March 2004 asadmin-delete-jdbc-connection-pool(1AS)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy