Skip to main content

Posts

Recent posts

Creating a HTTP accessible subversion repository using apache

In this post I am trying to explain , how to create new repository for  HTTP accessible subversion  using apache (hope it helps ..) ----------------------------------------------------------------------------------------------------   1) sudo svnadmin create /path/to/repos 2) create dav_svn_<repo>.autz file and add below contents [groups] dev=<user1>,<user2> newdev=<user3> [/] @dev=rw @newdev=r 3) Modify /etc/apache2/mods-enabled/dav_ svn.conf <Location /svn/<repo>>   DAV svn   SVNPath /home/svn/<repo-name>   AuthType Basic   AuthName "Subversion Repository"   AuthUserFile /etc/apache2/dav_svn.passwd   # To enable authorization via mod_authz_svn   AuthzSVNAccessFile /etc/apache2/dav_svn_<repo>. authz   # The following three lines allow anonymous read, but make   # committers authenticate themselves.  It requires the 'aut...

Convert Clob to String in Java

import java.sql.Clob; private String clobToStringConversion(Clob clb) throws IOException, SQLException {         if (clb == null) {             return null;         }         StringBuffer str = new StringBuffer();         String data = null;         BufferedReader bufferRead = new BufferedReader(clb.getCharacterStream());         while ((data = bufferRead.readLine()) != null) {             str.append(data);         }         return str.toString();     }

Calling Oracle Stored Procedure using EclipseLink/Toplink JPA

Lets assume that the Stored Procedure is something like this MY_PROCEDURE (inputVal number, outputVal out varchar2) @ annotations approach ------------------------------------- ===>  Define annotations following way in the entity class @Entity  @NamedStoredProcedureQuery(name = " xxMethod Namexx ", procedureName = " MY_PROCEDURE ", parameters = {         @StoredProcedureParameter(name = " inputVal ", queryParameter = " inputVal ", direction = Direction.IN, type = Long.class),         @StoredProcedureParameter(name = " outputVal ", queryParameter = " outputVal ", direction = Direction.OUT, type = String.class) }) @Table(name = " XXXTABLENAMEXXX ") ==> Calling method of Interface should be as follows  String Method Name (@Param(" inputVal ")Long inputVal,@Param(" outputVal ")String outputVal ) @ declaring in orm.xml approach -------------------------------------   ...