Hello 
I work with JBoss + Eclispe + Firebird. I've written a ejbStore procedure like 
that: 

public void ejbStore() 
{ 
System.out.println("Project enter: ejbStore"); 
Connection connection = null; 
PreparedStatement ps = null; 

try 
{ 
connection = getConnection(); 

String select = "update PROJECT set FK_LECTURER_ID = ?,FK_SUBJECT_ID = ?,"+ 
" PROJECT_DAY = ?,PROJECT_HOUR = ?,CLASS_NUMBER = ?, STUDENTS_IN_GROUP = ?," + 
" NUMBER_OF_GROUPS = ? where PROJECT_ID = ?"; 

ps = connection.prepareStatement(select); 
ps.setInt(1,this.getFk_lecturer_id()); 
ps.setInt(2,this.getFk_subject_id()); 
ps.setString(3,this.getProject_day()); 
ps.setInt(4,this.getProject_hour()); 
ps.setInt(5,this.getClass_number()); 
ps.setInt(6,this.getStudents_in_group()); 
ps.setInt(7,this.getNumber_of_groups()); 
ps.setInt(8,this.getProject_id()); 
ps.executeUpdate(); 
}//try 
catch (Exception e) 
{ 
System.out.println("Project wyjatek: ejbStore"); 
e.printStackTrace(); 
} 
finally 
{ 
try 
{ 
if (ps != null ) ps.close(); 
} 
catch (Exception e) 
{} 

try 
{ 
if (connection != null) connection.close(); 
} 
catch (Exception e) 
{} 
}//finally 
System.out.println ("Project exit: ejbStore"); 
}//ejbStore 

During testing no exception appears and it seems to work. When I call a get* 
method after a set* method a new value seems to be stored in the data base. But 
when I execute a sql query there are no changes in the table. Does anybody know 
what can be wrong. I think that a problem is somewhere else but I am not sure. 
One more thing, ejbCreate and ejbRemove method works properly. 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912713#3912713

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912713


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to