riftsaw SVN: r1050 - branches/RiftSaw-2.1.x/distribution/src/main/release/install.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-10-21 00:30:59 -0400 (Thu, 21 Oct 2010)
New Revision: 1050
Modified:
branches/RiftSaw-2.1.x/distribution/src/main/release/install/build.xml
Log:
* RIFTSAW-300.
Modified: branches/RiftSaw-2.1.x/distribution/src/main/release/install/build.xml
===================================================================
--- branches/RiftSaw-2.1.x/distribution/src/main/release/install/build.xml 2010-10-21 04:25:49 UTC (rev 1049)
+++ branches/RiftSaw-2.1.x/distribution/src/main/release/install/build.xml 2010-10-21 04:30:59 UTC (rev 1050)
@@ -260,6 +260,8 @@
value="bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration"/>
<!-- juddi-client, should be removed once esb catches up to 3.0.4-->
+ <!-- now deletes the 3.0.3 version, and then copy the 3.0.4 into the esb.deployer/lib-->
+ <delete file="${deployers.dir}/esb.deployer/lib/juddi-client-3.0.3.jar" />
<copy todir="${deployers.dir}/esb.deployer/lib" overwrite="true">
<fileset dir="../db/juddi">
<include name="juddi-client-*.jar"/>
14 years, 11 months
riftsaw SVN: r1049 - trunk/distribution/src/main/release/install.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-10-21 00:25:49 -0400 (Thu, 21 Oct 2010)
New Revision: 1049
Modified:
trunk/distribution/src/main/release/install/build.xml
Log:
* RIFTSAW-300, remove the 3.0.3 version from esb.
Modified: trunk/distribution/src/main/release/install/build.xml
===================================================================
--- trunk/distribution/src/main/release/install/build.xml 2010-10-21 03:35:56 UTC (rev 1048)
+++ trunk/distribution/src/main/release/install/build.xml 2010-10-21 04:25:49 UTC (rev 1049)
@@ -285,6 +285,8 @@
value="bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration"/>
<!-- juddi-client, should be removed once esb catches up to 3.0.4-->
+ <!-- now deletes the 3.0.3 version, and then copy the 3.0.4 into the esb.deployer/lib-->
+ <delete file="${deployers.dir}/esb.deployer/lib/juddi-client-3.0.3.jar" />
<copy todir="${deployers.dir}/esb.deployer/lib" overwrite="true">
<fileset dir="../db/juddi">
<include name="juddi-client-*.jar"/>
14 years, 11 months
riftsaw SVN: r1048 - in trunk: runtime/engine-assembly/src/main/resources/bpel-sql and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-10-20 23:35:56 -0400 (Wed, 20 Oct 2010)
New Revision: 1048
Modified:
trunk/distribution/src/main/release/db/bpel.properties
trunk/runtime/engine-assembly/src/main/resources/bpel-sql/db2.sql
trunk/runtime/engine-assembly/src/main/resources/bpel-sql/hsql.sql
trunk/runtime/engine-assembly/src/main/resources/bpel-sql/mysql.sql
trunk/runtime/engine-assembly/src/main/resources/bpel-sql/oracle.sql
trunk/runtime/engine-assembly/src/main/resources/bpel-sql/postgres.sql
trunk/runtime/engine-assembly/src/main/resources/bpel-sql/sqlserver.sql
Log:
* RIFTSAW-291, RIFTSAW-292, update ODE_JOB's schema a bit.
* using JPA based simple scheduler by default.
Modified: trunk/distribution/src/main/release/db/bpel.properties
===================================================================
--- trunk/distribution/src/main/release/db/bpel.properties 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/distribution/src/main/release/db/bpel.properties 2010-10-21 03:35:56 UTC (rev 1048)
@@ -56,7 +56,7 @@
bpel.dao.factory=org.apache.ode.dao.jpa.hibernate.BpelDAOConnectionFactoryImpl
bpel.dao.factory.store=org.apache.ode.dao.jpa.hibernate.ConfStoreDAOConnectionFactoryImpl
-bpel.dao.factory.scheduler=org.apache.ode.scheduler.simple.jdbc.SchedulerDAOConnectionFactoryImpl
+bpel.dao.factory.scheduler=org.apache.ode.dao.jpa.hibernate.SchedulerDAOConnectionFactoryImpl
## Transaction Factory
## default is org.apache.ode.il.EmbeddedGeronimoFactory
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel-sql/db2.sql
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel-sql/db2.sql 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel-sql/db2.sql 2010-10-21 03:35:56 UTC (rev 1048)
@@ -1,13 +1,13 @@
create table ODE_SCHEMA_VERSION(VERSION integer);
-insert into ODE_SCHEMA_VERSION values (6);
+insert into ODE_SCHEMA_VERSION values (220);
CREATE TABLE ODE_JOB (
- jobid CHAR(64) NOT NULL DEFAULT '',
- ts BIGINT NOT NULL DEFAULT 0,
- nodeid char(64),
- scheduled int NOT NULL DEFAULT 0,
- transacted int NOT NULL DEFAULT 0,
+ jobid varchar(64) NOT NULL,
+ ts BIGINT NOT NULL,
+ nodeid varchar(64),
+ scheduled smallint NOT NULL,
+ transacted smallint NOT NULL,
instanceId BIGINT,
mexId varchar(255),
@@ -16,8 +16,8 @@
channel varchar(255),
correlatorId varchar(255),
correlationKeySet varchar(255),
- retryCount int,
- inMem int,
+ retryCount integer,
+ inMem smallint,
detailsExt blob(4096),
PRIMARY KEY(jobid));
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel-sql/hsql.sql
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel-sql/hsql.sql 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel-sql/hsql.sql 2010-10-21 03:35:56 UTC (rev 1048)
@@ -1,12 +1,12 @@
create table ODE_SCHEMA_VERSION(VERSION integer);
-insert into ODE_SCHEMA_VERSION values (6);
+insert into ODE_SCHEMA_VERSION values (220);
CREATE TABLE ODE_JOB (
- jobid CHAR(64) NOT NULL DEFAULT '',
- ts BIGINT NOT NULL DEFAULT 0,
- nodeid char(64),
- scheduled int NOT NULL DEFAULT 0,
- transacted int NOT NULL DEFAULT 0,
+ jobid varchar(64) not null,
+ ts BIGINT NOT NULL,
+ nodeid varchar(64),
+ scheduled boolean NOT NULL DEFAULT 0,
+ transacted boolean NOT NULL DEFAULT 0,
instanceId BIGINT,
mexId varchar(255),
@@ -15,8 +15,8 @@
channel varchar(255),
correlatorId varchar(255),
correlationKeySet varchar(255),
- retryCount int,
- inMem int,
+ retryCount integer,
+ inMem boolean,
detailsExt varbinary,
PRIMARY KEY(jobid));
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel-sql/mysql.sql
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel-sql/mysql.sql 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel-sql/mysql.sql 2010-10-21 03:35:56 UTC (rev 1048)
@@ -1,14 +1,14 @@
create table ODE_SCHEMA_VERSION(VERSION integer);
-insert into ODE_SCHEMA_VERSION values (6);
+insert into ODE_SCHEMA_VERSION values (220);
DROP TABLE IF EXISTS ODE_JOB;
CREATE TABLE ODE_JOB (
jobid CHAR(64) NOT NULL DEFAULT '',
ts BIGINT NOT NULL DEFAULT 0,
- nodeid char(64) NULL,
- scheduled int NOT NULL DEFAULT 0,
- transacted int NOT NULL DEFAULT 0,
+ nodeid varchar(64),
+ scheduled bit NOT NULL,
+ transacted bit NOT NULL,
instanceId BIGINT,
mexId varchar(255),
@@ -17,9 +17,9 @@
channel varchar(255),
correlatorId varchar(255),
correlationKeySet varchar(255),
- retryCount int,
- inMem int,
- detailsExt blob(4096),
+ retryCount integer,
+ inMem bit,
+ detailsExt blob,
PRIMARY KEY(jobid),
INDEX IDX_ODE_JOB_TS(ts),
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel-sql/oracle.sql
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel-sql/oracle.sql 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel-sql/oracle.sql 2010-10-21 03:35:56 UTC (rev 1048)
@@ -1,23 +1,23 @@
create table ODE_SCHEMA_VERSION(VERSION integer);
-insert into ODE_SCHEMA_VERSION values (6);
+insert into ODE_SCHEMA_VERSION values (220);
CREATE TABLE ODE_JOB (
- jobid VARCHAR(64) NOT NULL,
- ts number(37) NOT NULL,
- nodeid varchar(64),
- scheduled int NOT NULL,
- transacted int NOT NULL,
+ jobid VARCHAR2(64) NOT NULL,
+ ts number(19,0) NOT NULL,
+ nodeid varchar2(64),
+ scheduled number(1,0) NOT NULL,
+ transacted number(1,0) NOT NULL,
instanceId number(37),
mexId varchar(255),
- processId varchar(255),
- type varchar(255),
- channel varchar(255),
- correlatorId varchar(255),
- correlationKeySet varchar(255),
- retryCount int,
- inMem int,
+ processId varchar2(255),
+ type varchar2(255),
+ channel varchar2(255),
+ correlatorId varchar2(255),
+ correlationKeySet varchar2(255),
+ retryCount number(10,0),
+ inMem number(1,0),
detailsExt blob,
PRIMARY KEY(jobid));
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel-sql/postgres.sql
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel-sql/postgres.sql 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel-sql/postgres.sql 2010-10-21 03:35:56 UTC (rev 1048)
@@ -1,27 +1,27 @@
create table ODE_SCHEMA_VERSION(VERSION integer);
-insert into ODE_SCHEMA_VERSION values (6);
+insert into ODE_SCHEMA_VERSION values (220);
-CREATE TABLE ODE_JOB (
- jobid CHAR(64) NOT NULL DEFAULT '',
- ts BIGINT NOT NULL DEFAULT 0,
- nodeid char(64),
- scheduled int NOT NULL DEFAULT 0,
- transacted int NOT NULL DEFAULT 0,
+ create table ODE_JOB (
+ jobid varchar(64) not null,
+ ts int8 not null,
+ nodeid varchar(64),
+ scheduled bool not null,
+ transacted bool not null,
+ instanceId int8,
+ mexId varchar(255),
+ processId varchar(255),
+ type varchar(255),
+ channel varchar(255),
+ correlatorId varchar(255),
+ correlationKeySet varchar(255),
+ retryCount int4,
+ inMem bool,
+ detailsExt oid,
- instanceId BIGINT,
- mexId varchar(255),
- processId varchar(255),
- type varchar(255),
- channel varchar(255),
- correlatorId varchar(255),
- correlationKeySet varchar(255),
- retryCount int,
- inMem int,
- detailsExt bytea,
+ primary key (jobid)
+ );
- PRIMARY KEY(jobid));
-
CREATE INDEX IDX_ODE_JOB_TS ON ODE_JOB(ts);
CREATE INDEX IDX_ODE_JOB_NODEID ON ODE_JOB(nodeid);
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel-sql/sqlserver.sql
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel-sql/sqlserver.sql 2010-10-21 03:29:59 UTC (rev 1047)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel-sql/sqlserver.sql 2010-10-21 03:35:56 UTC (rev 1048)
@@ -1,23 +1,23 @@
create table ODE_SCHEMA_VERSION(VERSION integer);
-insert into ODE_SCHEMA_VERSION values (6);
+insert into ODE_SCHEMA_VERSION values (220);
CREATE TABLE ODE_JOB (
- jobid CHAR(64) NOT NULL DEFAULT '',
- ts BIGINT NOT NULL DEFAULT 0,
- nodeid char(64),
- scheduled int NOT NULL DEFAULT 0,
- transacted int NOT NULL DEFAULT 0,
+ jobid varchar(64) NOT NULL,
+ ts numeric(19,0) NOT NULL,
+ nodeid varchar(64) null,
+ scheduled tinyint NOT NULL,
+ transacted tinyint NOT NULL,
- instanceId BIGINT,
- mexId varchar(255),
- processId varchar(255),
- type varchar(255),
- channel varchar(255),
- correlatorId varchar(255),
- correlationKeySet varchar(255),
- retryCount int,
- inMem int,
+ instanceId numeric(19,0) null,
+ mexId varchar(255) null,
+ processId varchar(255) null,
+ type varchar(255) null,
+ channel varchar(255) null,
+ correlatorId varchar(255) null,
+ correlationKeySet varchar(255) null,
+ retryCount int null,
+ inMem tinyint null,
detailsExt image null,
PRIMARY KEY(jobid));
14 years, 11 months
riftsaw SVN: r1047 - in branches/ODE/RiftSaw-ODE-trunk: dao-jpa/src/main/java/org/apache/ode/dao/jpa/scheduler and 2 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-10-20 23:29:59 -0400 (Wed, 20 Oct 2010)
New Revision: 1047
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java
branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/build.xml
branches/ODE/RiftSaw-ODE-trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/scheduler/JobDAOImpl.java
branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java
Log:
* RIFTSAW-291, RIFTSAW-292. using boolean data type for Java's boolean, instead of int.
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java 2010-10-20 11:35:01 UTC (rev 1046)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java 2010-10-21 03:29:59 UTC (rev 1047)
@@ -90,7 +90,9 @@
public void cancelProcessCronJobs(QName pid, boolean undeployed) {
assert pid != null;
- if( __log.isInfoEnabled() ) __log.info("Cancelling PROCESS CRON jobs for: " + pid);
+ if( __log.isDebugEnabled() ) {
+ __log.debug("Cancelling PROCESS CRON jobs for: " + pid);
+ }
Collection<TerminationListener> listenersToTerminate = new ArrayList<TerminationListener>();
synchronized( _terminationListenersByPid ) {
@@ -110,6 +112,9 @@
listener.terminate();
}
}
+
+ __log.info("Cancelled PROCESS CRON jobs for: " + pid);
+
}
public void scheduleProcessCronJobs(QName pid, ProcessConf pconf) {
@@ -122,7 +127,9 @@
Collection<TerminationListener> newListeners = new ArrayList<TerminationListener>();
synchronized( pid ) {
- if( __log.isInfoEnabled() ) __log.info("Scheduling PROCESS CRON jobs for: " + pid);
+ if( __log.isDebugEnabled() ) {
+ __log.debug("Scheduling PROCESS CRON jobs for: " + pid);
+ }
// start new cron jobs
for( final CronJob job : pconf.getCronJobs() ) {
@@ -161,6 +168,8 @@
}
}
}
+
+ __log.info("Scheduled PROCESS CRON jobs for: " + pid);
}
public void refreshSystemCronJobs(SystemSchedulesConfig systemSchedulesConf) {
Modified: branches/ODE/RiftSaw-ODE-trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/scheduler/JobDAOImpl.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/scheduler/JobDAOImpl.java 2010-10-20 11:35:01 UTC (rev 1046)
+++ branches/ODE/RiftSaw-ODE-trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/scheduler/JobDAOImpl.java 2010-10-21 03:29:59 UTC (rev 1047)
@@ -227,7 +227,7 @@
@Lob
@Column(name = "detailsExt")
public byte[] getDetailsExt() {
- if (_details.detailsExt != null) {
+ if (_details.detailsExt != null && _details.detailsExt.size() > 0) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream os = new ObjectOutputStream(bos);
@@ -242,7 +242,7 @@
}
public void setDetailsExt(byte[] detailsExt) {
- if (detailsExt != null) {
+ if (detailsExt != null && detailsExt.length > 0) {
try {
ByteArrayInputStream bis = new ByteArrayInputStream(detailsExt);
ObjectInputStream is = new ObjectInputStream(bis);
Modified: branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/build.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/build.xml 2010-10-20 11:35:01 UTC (rev 1046)
+++ branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/build.xml 2010-10-21 03:29:59 UTC (rev 1047)
@@ -66,7 +66,6 @@
<concat destfile="${db.scripts.dir}/scripts/(a){db}.sql">
<fileset file="${scripts.dir}/license-header.sql"/>
<fileset file="${scripts.dir}/common.sql"/>
- <fileset file="${scripts.dir}/simplesched-(a){db}.sql"/>
<fileset file="${db.scripts.dir}/partial.(a){db}.sql"/>
</concat>
Modified: branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java 2010-10-20 11:35:01 UTC (rev 1046)
+++ branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java 2010-10-21 03:29:59 UTC (rev 1047)
@@ -60,23 +60,23 @@
private static final String DELETE_JOB = "delete from ODE_JOB where jobid = ? and nodeid = ?";
- private static final String UPDATE_REASSIGN = "update ODE_JOB set nodeid = ?, scheduled = 0 where nodeid = ?";
+ private static final String UPDATE_REASSIGN = "update ODE_JOB set nodeid = ?, scheduled = false where nodeid = ?";
private static final String UPDATE_JOB = "update ODE_JOB set ts = ?, retryCount = ?, scheduled = ? where jobid = ?";
- private static final String UPGRADE_JOB_DEFAULT = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = 0 "
+ private static final String UPGRADE_JOB_DEFAULT = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = false "
+ "and mod(ts,?) = ? and ts < ?";
- private static final String UPGRADE_JOB_DB2 = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = 0 "
+ private static final String UPGRADE_JOB_DB2 = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = false "
+ "and mod(ts,CAST(? AS BIGINT)) = ? and ts < ?";
- private static final String UPGRADE_JOB_SQLSERVER = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = 0 "
+ private static final String UPGRADE_JOB_SQLSERVER = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = false "
+ "and (ts % ?) = ? and ts < ?";
- private static final String UPGRADE_JOB_SYBASE = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = 0 "
+ private static final String UPGRADE_JOB_SYBASE = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = false "
+ "and convert(int, ts) % ? = ? and ts < ?";
- private static final String UPGRADE_JOB_SYBASE12 = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = 0 "
+ private static final String UPGRADE_JOB_SYBASE12 = "update ODE_JOB set nodeid = ? where nodeid is null and scheduled = false "
+ "and -1 <> ? and -1 <> ? and ts < ?";
private static final String SAVE_JOB = "insert into ODE_JOB "
@@ -118,9 +118,9 @@
+ "inMem,"
+ "detailsExt"
+ " from ODE_JOB "
- + "where nodeid = ? and scheduled = 0 and ts < ? order by ts";
+ + "where nodeid = ? and scheduled = false and ts < ? order by ts";
- private static final String UPDATE_SCHEDULED = "update ODE_JOB set scheduled = 1 where jobid in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
+ private static final String UPDATE_SCHEDULED = "update ODE_JOB set scheduled = true where jobid in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
private static final int UPDATE_SCHEDULED_SLOTS = 10;
@@ -197,10 +197,11 @@
ps.setString(i++, job.getJobId());
ps.setString(i++, nodeId);
ps.setLong(i++, job.getScheduledDate());
- ps.setInt(i++, asInteger(loaded));
- ps.setInt(i++, asInteger(job.isTransacted()));
+ ps.setBoolean(i++, loaded);
+ ps.setBoolean(i++, job.isTransacted());
JobDetails details = job.getDetails();
+
ps.setObject(i++, details.instanceId, Types.BIGINT);
ps.setObject(i++, details.mexId, Types.VARCHAR);
ps.setObject(i++, details.processId, Types.VARCHAR);
@@ -209,10 +210,10 @@
ps.setObject(i++, details.correlatorId, Types.VARCHAR);
ps.setObject(i++, details.correlationKeySet, Types.VARCHAR);
ps.setObject(i++, details.retryCount, Types.INTEGER);
- ps.setObject(i++, details.inMem, Types.INTEGER);
+ ps.setObject(i++, details.inMem, Types.BOOLEAN);
if (details.detailsExt == null || details.detailsExt.size() == 0) {
- ps.setBytes(i++, null);
+ ps.setObject(i++, null, Types.BLOB);
} else {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
@@ -221,7 +222,7 @@
__log.error("Error serializing job detail: " + job.getDetails());
throw new DatabaseException(ex);
}
- ps.setBytes(i++, bos.toByteArray());
+ ps.setObject(i++, bos.toByteArray(), Types.BLOB);
}
return ps.executeUpdate() == 1;
@@ -244,7 +245,7 @@
ps = con.prepareStatement(UPDATE_JOB);
ps.setLong(1, job.getScheduledDate());
ps.setInt(2, job.getDetails().getRetryCount());
- ps.setInt(3, asInt(job.isScheduled()));
+ ps.setBoolean(3, job.isScheduled());
ps.setString(4, job.getJobId());
return ps.executeUpdate() == 1;
} catch (SQLException se) {
@@ -254,14 +255,8 @@
close(con);
}
}
+
- private int asInt(boolean flag) {
- if (flag) {
- return 1;
- }
- return 0;
- }
-
private Long asLong(Object o) {
if (o == null) return null;
else if (o instanceof BigDecimal) return ((BigDecimal) o).longValue();
@@ -300,7 +295,7 @@
details.correlatorId = (String) rs.getObject("correlatorId");
details.correlationKeySet = (String) rs.getObject("correlationKeySet");
details.retryCount = asInteger(rs.getObject("retryCount"));
- details.inMem = asBoolean(rs.getInt("inMem"));
+ details.inMem = rs.getBoolean("inMem");
if (rs.getObject("detailsExt") != null) {
try {
ObjectInputStream is = new ObjectInputStream(rs.getBinaryStream("detailsExt"));
@@ -346,7 +341,7 @@
}
}
- JobDAO job = new JobDAOImpl(rs.getLong("ts"), rs.getString("jobid"), asBoolean(rs.getInt("transacted")), details);
+ JobDAO job = new JobDAOImpl(rs.getLong("ts"), rs.getString("jobid"), rs.getBoolean("transacted"), details);
ret.add(job);
}
rs.close();
@@ -435,14 +430,6 @@
return c;
}
- private int asInteger(boolean value) {
- return (value ? 1 : 0);
- }
-
- private boolean asBoolean(int value) {
- return (value != 0);
- }
-
private void close(PreparedStatement ps) {
if (ps != null) {
try {
14 years, 11 months
riftsaw SVN: r1046 - in trunk: runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-10-20 07:35:01 -0400 (Wed, 20 Oct 2010)
New Revision: 1046
Modified:
trunk/docs/docbook/userguide/src/main/module/esb.xml
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java
Log:
RIFTSAW-190 - added documentation and shortened the part name property.
Modified: trunk/docs/docbook/userguide/src/main/module/esb.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/module/esb.xml 2010-10-19 10:34:42 UTC (rev 1045)
+++ trunk/docs/docbook/userguide/src/main/module/esb.xml 2010-10-20 11:35:01 UTC (rev 1046)
@@ -263,6 +263,41 @@
</listitem>
</orderedlist>
</section>
+
+ <section>
+ <title>SAML Support</title>
+
+ <para>
+ If the ESB service uses PicketLink to obtain a SAML token, then this assertion
+ can be passed to the invoked BPEL process, using the <emphasis>requestSAMLPartName</emphasis>
+ property.
+ </para>
+
+ <informalexample>
+ <programlisting role="XML" ><![CDATA[
+<action name="action2" class="org.jboss.soa.esb.actions.bpel.BPELInvoke">
+ <property name="service" value="{http://simple_invoke/helloworld}HelloHeaderWSService"/>
+ <property name="operation" value="sayHi" />
+ <property name="requestPartName" value="sayHello" />
+ <property name="responsePartName" value="sayHelloResponse" />
+ <property name="requestSAMLPartName" value="Security" />
+</action>
+ ]]></programlisting>
+ </informalexample>
+
+ <para>
+ The part name identified by the <emphasis>requestSAMLPartName</emphasis> must be
+ defined as a WS-Security Security element, e.g.
+ </para>
+
+ <informalexample>
+ <programlisting role="XML" ><![CDATA[
+<part name="Security" element="wsse:Security"
+ xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..." />
+ ]]></programlisting>
+ </informalexample>
+
+ </section>
</section>
</chapter>
Modified: trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java
===================================================================
--- trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java 2010-10-19 10:34:42 UTC (rev 1045)
+++ trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java 2010-10-20 11:35:01 UTC (rev 1046)
@@ -49,7 +49,7 @@
private static final String TOP_LEVEL_ELEMENT_NAME = "message";
protected static final String REQUEST_PART_NAME = "requestPartName";
- protected static final String REQUEST_SAML_ASSERTION_PART_NAME = "requestSAMLAssertionPartName";
+ protected static final String REQUEST_SAML_PART_NAME = "requestSAMLPartName";
protected static final String RESPONSE_PART_NAME = "responsePartName";
protected static final String SERVICE = "service";
protected static final String PORT = "port";
@@ -213,7 +213,7 @@
}
protected void establishHeaderParts(ESBInvocationAdapter invocationContext) {
- String requestSAMLAssertionPartName=_config.getAttribute(REQUEST_SAML_ASSERTION_PART_NAME);
+ String requestSAMLAssertionPartName=_config.getAttribute(REQUEST_SAML_PART_NAME);
if (requestSAMLAssertionPartName != null) {
14 years, 11 months
riftsaw SVN: r1045 - trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf.
by riftsaw-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2010-10-19 06:34:42 -0400 (Tue, 19 Oct 2010)
New Revision: 1045
Added:
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/FaultType.java
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java
Modified:
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/ActivityStartAdapter.java
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/BPAFLogAdapter.java
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/EventAdapter.java
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceEndAdapter.java
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceTerminationAdapter.java
Log:
Fix ambiguity in BAPF log records. Deal with completed, failed and terminated in particular
Modified: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/ActivityStartAdapter.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/ActivityStartAdapter.java 2010-10-18 15:37:08 UTC (rev 1044)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/ActivityStartAdapter.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -40,9 +40,18 @@
static void mapDefault(Event target, ActivityEvent source)
{
InstanceStartAdapter.mapDefault(target, source);
-
- target.setActivityDefinitionID(String.valueOf(source.getActivityDeclarationId()));
- target.setActivityInstanceID(String.valueOf(source.getActivityId()));
- target.setActivityName( source.getActivityName() );
+
+ String def = (source.getActivityDeclarationId() > 0) ?
+ String.valueOf(source.getActivityDeclarationId()) : "-1";
+
+ String id = source.getActivityId() > 0 ?
+ String.valueOf(source.getActivityId()) : "-1";
+
+ String name = source.getActivityName() != null ?
+ source.getActivityName() : "n/a";
+
+ target.setActivityDefinitionID(def);
+ target.setActivityInstanceID(id);
+ target.setActivityName(name);
}
}
Modified: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/BPAFLogAdapter.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/BPAFLogAdapter.java 2010-10-18 15:37:08 UTC (rev 1044)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/BPAFLogAdapter.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -17,7 +17,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.ode.bpel.evt.*;
+import org.apache.ode.bpel.evt.BpelEvent;
import org.apache.ode.bpel.iapi.BpelEventListener;
import org.jboss.bpm.monitor.model.bpaf.Event;
@@ -29,25 +29,15 @@
*/
public class BPAFLogAdapter implements BpelEventListener {
- protected final Log log = LogFactory.getLog(BPAFLogAdapter.class);
-
- final static Class[] notableEvents = new Class[] {
- ActivityExecStartEvent.class,
- ActivityExecEndEvent.class,
- ActivityFailureEvent.class,
- ProcessInstanceStartedEvent.class,
- ProcessCompletionEvent.class,
- ProcessTerminationEvent.class
- };
-
+ protected final Log log = LogFactory.getLog(BPAFLogAdapter.class);
private PersistenceStrategy persistenceStrategy = null;
public void onEvent(BpelEvent bpelEvent) {
- if(isNotable(bpelEvent))
- {
- Event event = EventAdapter.createBPAFModel(bpelEvent);
+
+ Event event = EventAdapter.createBPAFModel(bpelEvent);
+ if(event!=null) //no mapping or not of interest
persistenceStrategy.persist(event);
- }
+
}
public void startup(Properties properties) {
@@ -59,17 +49,5 @@
public void shutdown() {
this.persistenceStrategy.stop();
System.out.println("BPAFLogAdapter shutdown");
- }
-
- private static boolean isNotable(BpelEvent event)
- {
- boolean notable = false;
- for(Class c : notableEvents)
- if(c.equals(event.getClass()))
- {
- notable = true;
- break;
- }
- return notable;
- }
+ }
}
Modified: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/EventAdapter.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/EventAdapter.java 2010-10-18 15:37:08 UTC (rev 1044)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/EventAdapter.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -31,7 +31,7 @@
public class EventAdapter {
protected final static Log log = LogFactory.getLog(EventAdapter.class);
-
+
static Map<Class<?>, EventDetailMapping> detailMapping = new HashMap<Class<?>, EventDetailMapping>();
static
@@ -43,32 +43,37 @@
detailMapping.put(ActivityExecStartEvent.class, new ActivityStartAdapter());
detailMapping.put(ActivityExecEndEvent.class, new ActivityEndAdapter());
detailMapping.put(ActivityFailureEvent.class, new ActivityFailedAdapter());
+
+ detailMapping.put(ProcessInstanceStateChangeEvent.class, new StateChangeAdapter());
}
public static Event createBPAFModel(BpelEvent bpelEvent)
{
- ProcessEvent source = (ProcessEvent)bpelEvent;
+ Event target = null;
+ EventDetailMapping mapping = detailMapping.get(bpelEvent.getClass());
- // base event data
- Event target = new Event(false);
- target.setTimestamp(bpelEvent.getTimestamp().getTime());
- target.setProcessDefinitionID(source.getProcessId().toString());
- target.setProcessName(source.getProcessName().toString());
+ if(mapping!=null)
+ {
+ ProcessEvent source = (ProcessEvent)bpelEvent;
- // required for bpel2svg. See https://jira.jboss.org/browse/RIFTSAW-264
- target.addData(new LineNumber(bpelEvent.getLineNo()));
+ // base event data
+ target = new Event(false);
+ target.setTimestamp(bpelEvent.getTimestamp().getTime());
+ target.setProcessDefinitionID(source.getProcessId().toString());
+ target.setProcessName(source.getProcessName().toString());
- EventDetailMapping mapping = detailMapping.get(bpelEvent.getClass());
- if(mapping!=null)
- mapping.adoptDetails(target, source);
- else
- log.warn("No mapping for "+ bpelEvent.getClass());
+ // required for bpel2svg. See https://jira.jboss.org/browse/RIFTSAW-264
+ target.addData(new LineNumber(bpelEvent.getLineNo()));
+ // can return null and thus invalidate the event
+ target = mapping.adoptDetails(target, source);
+ }
+
return target;
}
public interface EventDetailMapping<T extends ProcessEvent>
{
Event adoptDetails(Event target, T source);
- }
+ }
}
Added: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/FaultType.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/FaultType.java (rev 0)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/FaultType.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 JBoss, a divison Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.soa.bpel.console.bpaf;
+
+import org.jboss.bpm.monitor.model.bpaf.Tuple;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author: Heiko Braun <hbraun(a)redhat.com>
+ * @date: Oct 19, 2010
+ */
+public final class FaultType extends Tuple {
+
+ public final static String name = "fault-type";
+
+ public FaultType(String value) {
+ setName(name);
+ setValue(value);
+ }
+
+ public FaultType(QName qname) {
+ setName(name);
+ setValue(qname.toString());
+ }
+}
Modified: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceEndAdapter.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceEndAdapter.java 2010-10-18 15:37:08 UTC (rev 1044)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceEndAdapter.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -27,10 +27,16 @@
public Event adoptDetails(Event target, ProcessCompletionEvent source) {
Event.EventDetails details = target.getEventDetails();
- details.setCurrentState(State.Closed_Completed);
+ State state = source.getFault()!=null ?
+ State.Closed_Completed_Failed : State.Closed_Completed;
+ details.setCurrentState(state);
+
+ if(State.Closed_Completed_Failed == details.getCurrentState())
+ target.getDataElement().add(new FaultType(source.getFault()));
+
InstanceStartAdapter.mapDefault(target, source);
return target;
- }
+ }
}
Modified: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceTerminationAdapter.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceTerminationAdapter.java 2010-10-18 15:37:08 UTC (rev 1044)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/InstanceTerminationAdapter.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -27,7 +27,7 @@
public Event adoptDetails(Event target, ProcessTerminationEvent source) {
Event.EventDetails details = target.getEventDetails();
- details.setCurrentState(State.Closed_Cancelled);
+ details.setCurrentState(State.Closed_Cancelled_Terminated);
InstanceStartAdapter.mapDefault(target, source);
Added: trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java
===================================================================
--- trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java (rev 0)
+++ trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java 2010-10-19 10:34:42 UTC (rev 1045)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2009 JBoss, a divison Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.soa.bpel.console.bpaf;
+
+import org.apache.ode.bpel.common.ProcessState;
+import org.apache.ode.bpel.evt.ProcessInstanceStateChangeEvent;
+import org.jboss.bpm.monitor.model.bpaf.Event;
+import org.jboss.bpm.monitor.model.bpaf.State;
+
+/**
+ * @author: Heiko Braun <hbraun(a)redhat.com>
+ * @date: Oct 18, 2010
+ */
+public class StateChangeAdapter
+ implements EventAdapter.EventDetailMapping<ProcessInstanceStateChangeEvent>{
+
+ public Event adoptDetails(Event target, ProcessInstanceStateChangeEvent source) {
+
+ Event.EventDetails details = target.getEventDetails();
+
+ InstanceStartAdapter.mapDefault(target, source);
+
+ switch (source.getNewState())
+ {
+ case ProcessState.STATE_TERMINATED:
+ target.getEventDetails().setCurrentState(State.Closed_Cancelled_Terminated);
+ break;
+ /*
+ Equivalent to 'ProcessCompletionEvent' with fault!=null
+ case ProcessState.STATE_COMPLETED_WITH_FAULT:
+ target.getEventDetails().setCurrentState(State.Closed_Completed_Failed);
+ break;*/
+ case ProcessState.STATE_SUSPENDED:
+ target.getEventDetails().setCurrentState(State.Open_NotRunning_Suspended);
+ break;
+ /*
+ Equivalent to 'ProcessInstanceStartedEvent'
+ case ProcessState.STATE_ACTIVE:
+ target.getEventDetails().setCurrentState(State.Open_Running);
+ break;*/
+ default:
+ return null; // not logged
+ }
+
+ return target;
+ }
+}
14 years, 11 months