seam and webservice
来源:互联网 发布:单片机基础 编辑:程序博客网 时间:2024/06/03 22:15
I have a working solution ....
in my ContextualHttpRequest, I call the same code as in SeamPhaseListener for JSF.
before proceeding the request :
Quote:
at the end :
Quote:
void commitOrRollback()
{
try
{
if ( Transaction.instance().isActive() )
{
//log.debug("committing transaction after phase: " + phaseId);
Transaction.instance().commit();
}
else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
{
//log.debug("rolling back transaction after phase: " + phaseId);
Transaction.instance().rollback();
}
}
catch (Exception e)
{
throw new IllegalStateException("Could not commit transaction", e);
}
}
in my ContextualHttpRequest, I call the same code as in SeamPhaseListener for JSF.
before proceeding the request :
Quote:
void begin()
{
try
{
if ( !Transaction.instance().isActiveOrMarkedRollback() )
{
//log.debug("beginning transaction prior to phase: " + phaseId);
Transaction.instance().begin();
}
}
catch (Exception e)
{
throw new IllegalStateException("Could not start transaction", e);
}
}
at the end :
Quote:
void commitOrRollback()
{
try
{
if ( Transaction.instance().isActive() )
{
//log.debug("committing transaction after phase: " + phaseId);
Transaction.instance().commit();
}
else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
{
//log.debug("rolling back transaction after phase: " + phaseId);
Transaction.instance().rollback();
}
}
catch (Exception e)
{
throw new IllegalStateException("Could not commit transaction", e);
}
}
I'm sure there are issue with this solution but it works for the begining ...
((BindingProvider)auctionService).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
true);
- seam and webservice
- Seam
- Integrating Seam with Maven, Netbeans and GlassFish
- JBoss(R) Seam: Simplicity and Power Beyond Java(TM) EE
- Seam中使用selectItems and @Factory的三种方法
- oracle procedure and webservice
- DAY1:php and webservice
- DAY1:php and webservice
- httpservice and webservice
- webservice and soap ios
- WebService SOAP request and response
- WebService CXF and Spring2.5
- Seam Note
- 什么是Seam?
- JBoss Seam
- Seam是什么
- Seam Annotation
- Jboss seam
- 数据库读写以及一些SQL语句
- csc 用法
- 给datatable中添加新列并赋值的方法
- 2006年11月19日VI的主题安装、判断YYYY-MM-DD正则表达式考虑闰年
- Article Test
- seam and webservice
- 数据结构——红黑树
- 在.net中如何清除Cooike
- Java开发者需坚守的十大基本准则
- 2006年11月21日
- 用JS实现CheckBox的全选 修改 取消 查询 删除函数和图片实现添加 返回的链接
- 各种缓存的比较
- 遍历repeater中的CheckBox全选
- My First Java Program...