- 浏览: 667951 次
- 性别:
- 来自: 长沙
文章分类
- 全部博客 (364)
- quick start (57)
- bboss aop (43)
- bboss mvc (48)
- bboss persistent (96)
- bboss taglib (30)
- bboss event (10)
- bbossgroups (52)
- bboss (32)
- bboss会话共享 (17)
- bboss rpc (7)
- bboss 国际化 (5)
- bboss 序列化 (9)
- bboss cxf webservice (8)
- bboss hessian (3)
- bboss 安全认证SSO (15)
- bboss 工作流 (6)
- 平台 (18)
- bboss quartz (3)
- 杂谈 (5)
- 大数据 (1)
- bboss elastic (24)
- bboss http (1)
- bboss kafka (1)
- Elasticsearch Scroll和Slice Scroll查询API使用案例 (1)
最新评论
-
qianhao123:
...
采用gradle构建和发布bboss方法介绍 -
qianhao123:
[img][/img]
采用gradle构建和发布bboss方法介绍 -
yin_bp:
欢迎大家参与working
高性能elasticsearch ORM开发库使用介绍 -
qq641879434:
万分感谢
bboss 持久层sql xml配置文件编写和加载方法介绍 -
yin_bp:
qq641879434 写道怎么设置配置文件 可以查看执行的S ...
bboss 持久层sql xml配置文件编写和加载方法介绍
bboss项目下载列表 在sourceforge访问地址为:
https://sourceforge.net/project/showfiles.php?group_id=238653
bboss aop框架中,可以为业务组件配置1到多个拦截器(Interceptor)。这些拦截器必须实现com.frameworkset.proxy.Interceptor接口。拦截器可以对执行方法的4个时间点进行拦截:
l 执行前
l 执行后
l 抛出异常时
l 方法finally块
这些点分别对应com.frameworkset.proxy.Interceptor接口提供的4个方法:
public void before(Method method,Object[] args) throws Throwable;
public void after(Method method,Object[] args) throws Throwable;
public void afterThrowing(Method method,Object[] args,Throwable throwable) throws Throwable;
public void afterFinally(Method method,Object[] args) throws Throwable;
通过实现上述4个方法,bboss aop框架就可以方便地实施对业务组件方法的拦截功能。目前系统缺省提供了一个数据库事务管理拦截器:
com.chinacreator.spi.interceptor.TransactionInterceptor
用来实现bboss persistent框架的声明式事务管理功能,参考博客文章《bboss persistent事务管理介绍》。
下面举例说明拦截器的定义、配置和使用。
定义业务组件和拦截器
l 定义拦截器如下:
**
* 方法拦截器
*
* <p>Title: Insterceptor.java</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>bboss workgroup</p>
* @Date Sep 5, 2008 4:43:47 PM
* @author biaoping.yin
* @version 1.0
*/
public class Insterceptor implements Interceptor {
public void after(Method method, Object[] args) throws Throwable {
System.out.println("Insterceptor.after(" + method.getName() + ", Object[] args)");
}
public void afterFinally(Method method, Object[] args) throws Throwable {
System.out.println("Insterceptor.afterFinally(" + method.getName() + ", Object[] args)");
}
public void afterThrowing(Method method, Object[] args, Throwable throwable)
throws Throwable {
System.out.println("Insterceptor.afterThrowing(" + method.getName() + ", Object[] args, Throwable throwable)");
}
public void before(Method method, Object[] args) throws Throwable {
System.out.println("Insterceptor.before(" + method.getName() + ", Object[] args)");
}
}
l 定义的业务组件接口如下:
package com.chinacreator.spi.interceptor;
import com.chinacreator.spi.constructor.ConstructorInf;
public interface AI {
public void testInterceptorsBeforeafterWithTX() throws Exception;
public void testInterceptorsBeforeAfter() throws Exception;
public void testInterceptorsBeforeThrowing() throws Exception;
public void testInterceptorsBeforeThrowingWithTX() throws Exception;
public void setConst(ConstructorInf inf)
;
}
l 业务组件实现如下:
public class A implements AI{
public void testInterceptorsBeforeAfter() throws Exception {
// System.out.println("testInterceptorsBeforeAfter()");
}
public void testInterceptorsBeforeThrowing() throws Exception {
// System.out.println("testInterceptorsBeforeThrowing()");
throw new Exception("testInterceptorsBeforeThrowing");
}
public void testInterceptorsBeforeThrowingWithTX() throws Exception {
// System.out.println("testInterceptorsBeforeThrowingWithTX()");
throw new Exception("testInterceptorsBeforeThrowingWithTX");
}
public void testInterceptorsBeforeafterWithTX() throws Exception {
// System.out.println("testInterceptorsBeforeafterWithTX()");
}
public void setConst(ConstructorInf inf) {
// TODO Auto-generated method stub
}
}
配置业务组件和拦截器:
在包com.chinacreator.spi.interceptor下建立文件
simplemanager-interceptor.xml
发表评论
-
bboss ioc快速入门教程
2017-08-13 11:28 1198bboss是一个非常不错的ioc框架,功能类似于spr ... -
bboss ioc配置文件中使用外部属性文件介绍
2016-09-20 11:35 1063bboss ioc配置文件中使用外部属性文件介绍 与spri ... -
bboss与spring中配置和引用bboss数据源和bboss dao组件方法说明
2016-08-10 16:04 862首先在项目中导入bboss 持久层包: maven坐标 & ... -
bboss ioc提供的组件初始化工具类介绍
2016-03-18 16:17 684bboss ioc提供的组件初始化工具类介绍 bboss i ... -
扩展bboss ioc语法实现自定义的ioc依赖注入功能
2015-01-20 23:08 1259bboss ioc配置语法简洁而严谨,提供了强大的依赖注入功能 ... -
bboss序列化cglib代理对象方法介绍
2014-06-22 15:14 1089本文介绍bboss序列化cglib代理对象方法。经过cglib ... -
bboss自定义类对象序列化机制介绍
2014-05-26 23:32 1388bboss自定义类对象序列 ... -
bboss将一个组件同时发布为webservice,hessian,http三种服务方法介绍
2014-04-12 14:31 1603bboss将一个组件同时发布为webservice,hessi ... -
bboss发布apache cxf 2.7.6服务和定义客户端服务实例可能产生冲突解决办法
2014-03-22 23:16 1029bboss发布apache cxf 2.7.6服务和定义客户端 ... -
bboss 发布和使用hessian服务方法介绍
2013-02-25 23:21 1992hessian是一款性能非常不错的RPC通讯组件,最近抽空将b ... -
bboss quartz组件全攻略
2013-01-27 13:31 2477bboss quartz组件全攻略 本 ... -
bboss aop拦截器使用简介
2012-11-29 23:20 1147bboss aop拦截器使用简介, ... -
bboss ioc容器之间组件引用方法简介
2012-08-04 15:09 1223bboss ioc容器之间组件引用方法简介。我们可以在ioc容 ... -
Rest协议框架-bboss rpc
2012-08-03 12:51 1260restful风格rpc服务协议rest,定义的语法如下: ... -
解决cxf+bboss发布的webservice缺少<wsdl:types>和<wsdl:message>标签的问题
2012-06-19 10:11 1673cxf+bboss发布webservice服务 ... -
开源工作流引擎activiti与bboss整合使用方法浅析
2012-05-01 11:35 5107本文介绍开源工作流引擎activiti与bboss ioc框架 ... -
bboss aop/ioc组件配置语法诠释
2012-03-01 18:38 2084这篇文章全面介绍bboss ioc 配置语法,希望对 ... -
bboss aop/ioc依赖注入功能介绍
2012-02-12 14:40 1669bboss aop 3.5及后续版本中改进的ioc依赖注入功能 ... -
Bboss和xstream序列化/反序列化性能对比
2011-10-13 00:18 1891Bboss和xstream序列化/反序列化性能对比 本报告分别 ... -
bboss 组件容器的使用方法浅析
2011-08-20 00:21 1568本文重点介绍bboss 中的4大组件容器的特点及使用方法 4 ...
相关推荐
官方版本,亲测可用
官方版本,亲测可用
Bboss国际化实践.ppt
bboss会话共享培训文档,学习bboss不可多得的资料,值得拥有。
bboss es特点请访问: https://www.oschina.net/p/bboss-elastic
NULL 博文链接:https://yin-bp.iteye.com/blog/1449900
NULL 博文链接:https://yin-bp.iteye.com/blog/926166
企业级 J2EE 开源框架:bboss
bboss+es基本操作示例,elasticsearch,bboss,java使用demo
springboot集成ElasticsearchBboss调用Elasticsearch的案例分享
资源目录: 项目源码(eshelloword.rar) bboss elasticsearch开发入门教程.wmv 搭建bboss elasticsearch开发环境.wmv 说明.txt
官方版本,亲测可用
Elasticsearch rest client bboss介绍-Elastic2018中国开发者大会演讲稿
bbossgroups 3.0 发布,这是国内首款集aop,mvc,persistent,jsp taglib,分布式rpc服务,分布式事件框架于一身的企业级j2ee开发框架 详细信息请看: http://www.javaeye.com/news/20177-bbossmvc-bbossaop
NULL 博文链接:https://yin-bp.iteye.com/blog/2174863
NULL 博文链接:https://yin-bp.iteye.com/blog/2177475
浙江移动BBOSS系统快速入门手册V0.1归类.pdf
NULL 博文链接:https://yin-bp.iteye.com/blog/1131637
bboss-datatran 由 bboss 开源的数据采集&流批一体化工具,提供数据采集、数据清洗转换处理和数据入库以及数据指标统计计算流批一体化处理功能。
在不断的实践过程中,越来越多的好东西被吸纳到bboss这个大家庭中,使得bboss能够更好地应用于企业应用项目中,能够更好地解决开发过程中碰到的实际问题。基于bboss,可以快速地开发构建稳定、高效、健壮、可扩展的...