I forgot to attach the code that throws the exception:
| InitialContext ctx = new InitialContext();
| SessionFactory factory =
(SessionFactory)ctx.lookup("java:/hibernate/SessionFactory");
| Session session = factory.openSession();
|
| Cikk c = new Cikk("Ez az elsÃÂ
ÃÂ db cikk");
|
|
| Transaction tx=null;
| try {
| tx = session.beginTransaction();
| //do some work
| session.save(c);
| tx.commit();
| return true;
| } catch (Exception e) {
| if (tx!=null) tx.rollback();
| response.setRenderParameter("error",e.getMessage());
| throw e;
| } finally {
| if(session.isOpen()) session.close();
| }
|
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107878#4107878
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107878
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user