Announcement Announcement Module
Collapse
No announcement yet.
SimpleJdbcDaoSupport oracle procedure Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SimpleJdbcDaoSupport oracle procedure

    Hi,
    I want to execute an oracle procedure and i don't found solution
    my code now is :
    Code:
    package org.xxxxx.repo;
    
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.List;
    
    import javax.portlet.RenderRequest;
    
    import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
    import org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    
    import com.liferay.portal.service.UserLocalServiceUtil;
    
    
    public class JdbcLogDao extends SimpleJdbcDaoSupport implements LogDao{
    	
    	protected final Log logger = LogFactory.getLog(getClass());
    	
    	public void insertLog(String num, String nature, RenderRequest request)
    	{
    		try
    		{
    			
    			String mail = UserLocalServiceUtil.getUserById(
    					Long.parseLong(request.getRemoteUser())).getEmailAddress();
    			String ip= UserLocalServiceUtil.getUserById(
    					Long.parseLong(request.getRemoteUser())).getLoginIP();
    			
    
    			logger.info("request  faire : execute PMT_LOG_INSERT_01('216"+num+"',"+nature+",'"+mail+"',182,'"+ip+"')");
    			
            getSimpleJdbcTemplate().update("execute PMT_LOG_INSERT_01('"+num+"',"+nature+",'"+mail+"',182,'"+ip+"') ",
                new Object[] {}); 
            }
    		catch (Exception ex)
    		{
    			logger.info("problem : "+ex.toString()+"!!!");
    		}
    	}
    
    
    	
    
    }

    request generate work very well on on oracle SQL * Plus



    looking for your help
    thanks
    Last edited by nihed; Apr 23rd, 2008, 03:37 AM.
Working...
X