hai,

           I am telling my problem in the below program in the bold letters
please some one tell me a solution for this....

Controller  class:-----------------------
 
@Jpf.Controller (
                 
    simpleActions = {
        @Jpf.SimpleAction(name = "begin", path =
"/com/ofs/jdbccontrol/beehive/pageflow/index.jsp")    
    },
    sharedFlowRefs = {
        @Jpf.SharedFlowRef(name = "shared" , type =
com.ofs.jdbccontrol.beehive.sharedflow.SharedFlow.class)
    }
)
public class Controller 
extends PageFlowController {
    
    @Control()
    private UserBOControl userControl;
    public UserDTO[] getUser;
    
    
    @Jpf.Action (
        forwards = {
            @Jpf.Forward(name = "success", path = "index.jsp"),
            @Jpf.Forward(name = "failure", path =
"/com/ofs/jdbccontrol/beehive/pageflow/error.jsp")
        }
    )
    
    public Forward addUserInfo(UserDTO userDTO) {
        
        try {
            userControl.addUserInfo(userDTO.getUserName(),
userDTO.getAge());
------> This statement is not executed i.e control is not returned back to
here ...my webpage idle but data is
        getting inserted into the DB...
------> at the same time i dont know whether connection is released or not
and also 
        don't know where to maintain the transaction and how?????????????? 
            return new Forward("success");
        } catch (Exception e) {
             e.printStackTrace(System.err);   
        }
        return new Forward("success");
    }
    
    @Jpf.Action (
         forwards = {
             @Jpf.Forward(name = "success", path =
"/com/ofs/jdbccontrol/beehive/pageflow/listUser.jsp"),
             @Jpf.Forward(name = "failure", path =
"/com/ofs/jdbccontrol/beehive/pageflow/error.jsp")
         }
    )
    public Forward getUserInfo() { 
        
        Forward fwd = new Forward("success");
        try {
            
            getUser = userControl.getUserInfo("sachin");
            fwd.addActionOutput("list", getUser);
        } catch (Exception e) {
            e.printStackTrace(System.err);
            return new Forward("failure");
        }
        return fwd;
    }
}
 

UserBOControl class  :----------
 
@org.apache.beehive.controls.api.bean.ControlExtension
@JdbcControl.ConnectionDriver(
    databaseDriverClass = "oracle.jdbc.driver.OracleDriver",
    databaseURL         = "jdbc:oracle:thin:@192.54.45.251:1521:ORCL", 
    userName            = "t01",    
    password            = "t012006"
)
 
public interface UserBOControl 
extends JdbcControl {
    
    @JdbcControl.SQL(statement = "INSERT into useraccess values({userName},
{age})")
    public void addUserInfo(String userName, int age)
    throws SQLException;
    
    @JdbcControl.SQL(statement = "SELECT * FROM userinfo WHERE userName =
{name}")
    public UserDTO[] getUserInfo(String name)
    throws SQLException;
}

thanks in advance

Regards,
sahuly
 
-- 
View this message in context: 
http://www.nabble.com/JDBC-Control-tf3025805.html#a8406106
Sent from the Beehive - User mailing list archive at Nabble.com.

Reply via email to