You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rm...@apache.org on 2013/09/11 15:21:08 UTC

svn commit: r1521825 [2/2] - in /geronimo/specs/trunk: ./ geronimo-jbatch_1.0_spec/ geronimo-jbatch_1.0_spec/src/ geronimo-jbatch_1.0_spec/src/main/ geronimo-jbatch_1.0_spec/src/main/java/ geronimo-jbatch_1.0_spec/src/main/java/javax/ geronimo-jbatch_1...

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/BatchRuntimeException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/BatchRuntimeException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/BatchRuntimeException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/BatchRuntimeException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class BatchRuntimeException extends RuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public BatchRuntimeException() {
+		// no-op
+	}
+
+	public BatchRuntimeException(final String message) {
+		super(message);
+	}
+
+	public BatchRuntimeException(final Throwable cause) {
+		super(cause);
+	}
+
+	public BatchRuntimeException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionAlreadyCompleteException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionAlreadyCompleteException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionAlreadyCompleteException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionAlreadyCompleteException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobExecutionAlreadyCompleteException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public JobExecutionAlreadyCompleteException() {
+        // no-op
+	}
+
+	public JobExecutionAlreadyCompleteException(final String message) {
+		super(message);
+	}
+
+	public JobExecutionAlreadyCompleteException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobExecutionAlreadyCompleteException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionIsRunningException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionIsRunningException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionIsRunningException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionIsRunningException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobExecutionIsRunningException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public JobExecutionIsRunningException() {
+		// no-op
+	}
+
+	public JobExecutionIsRunningException(final String message) {
+		super(message);
+	}
+
+	public JobExecutionIsRunningException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobExecutionIsRunningException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotMostRecentException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotMostRecentException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotMostRecentException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotMostRecentException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobExecutionNotMostRecentException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public JobExecutionNotMostRecentException() {
+		// no-op
+	}
+
+	public JobExecutionNotMostRecentException(final String message) {
+		super(message);
+	}
+
+	public JobExecutionNotMostRecentException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobExecutionNotMostRecentException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotRunningException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotRunningException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotRunningException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobExecutionNotRunningException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobExecutionNotRunningException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public JobExecutionNotRunningException() {
+		// no-op
+	}
+
+	public JobExecutionNotRunningException(final String message) {
+		super(message);
+	}
+
+	public JobExecutionNotRunningException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobExecutionNotRunningException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobOperator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobOperator.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobOperator.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobOperator.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+import javax.batch.runtime.JobExecution;
+import javax.batch.runtime.JobInstance;
+import javax.batch.runtime.StepExecution;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+public interface JobOperator {
+    Set<String> getJobNames() throws JobSecurityException;
+
+    int getJobInstanceCount(String jobName) throws NoSuchJobException, JobSecurityException;
+
+    List<JobInstance> getJobInstances(String jobName, int start, int count) throws NoSuchJobException, JobSecurityException;
+
+    List<Long> getRunningExecutions(String jobName) throws NoSuchJobException, JobSecurityException;
+
+    Properties getParameters(long executionId) throws NoSuchJobExecutionException, JobSecurityException;
+
+    long start(String jobXMLName, Properties jobParameters) throws JobStartException, JobSecurityException;
+
+    long restart(long executionId, Properties restartParameters) throws JobExecutionAlreadyCompleteException, NoSuchJobExecutionException, JobExecutionNotMostRecentException, JobRestartException, JobSecurityException;
+
+    void stop(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException;
+
+    void abandon(long executionId) throws NoSuchJobExecutionException, JobExecutionIsRunningException, JobSecurityException;
+
+    JobInstance getJobInstance(long executionId) throws NoSuchJobExecutionException, JobSecurityException;
+
+    List<JobExecution> getJobExecutions(JobInstance instance) throws NoSuchJobInstanceException, JobSecurityException;
+
+    JobExecution getJobExecution(long executionId) throws NoSuchJobExecutionException, JobSecurityException;
+
+    List<StepExecution> getStepExecutions(long jobExecutionId) throws NoSuchJobExecutionException, JobSecurityException;
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobRestartException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobRestartException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobRestartException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobRestartException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobRestartException extends BatchRuntimeException {
+    private static final long serialVersionUID = 1L;
+
+	public JobRestartException() {
+        // no-op
+	}
+
+	public JobRestartException(final String message) {
+		super(message);
+	}
+
+	public JobRestartException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobRestartException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobSecurityException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobSecurityException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobSecurityException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobSecurityException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobSecurityException extends BatchRuntimeException {
+    private static final long serialVersionUID = 1L;
+
+	public JobSecurityException() {
+        // no-op
+	}
+
+	public JobSecurityException(final String message) {
+		super(message);
+	}
+
+	public JobSecurityException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobSecurityException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobStartException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobStartException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobStartException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/JobStartException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class JobStartException extends BatchRuntimeException {
+    private static final long serialVersionUID = 1L;
+
+	public JobStartException() {
+        // no-op
+	}
+
+	public JobStartException(final String message) {
+		super(message);
+	}
+
+	public JobStartException(final Throwable cause) {
+		super(cause);
+	}
+
+	public JobStartException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class NoSuchJobException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public NoSuchJobException() {
+		// no-op
+	}
+
+	public NoSuchJobException(final String message) {
+		super(message);
+	}
+
+	public NoSuchJobException(final Throwable cause) {
+		super(cause);
+	}
+
+	public NoSuchJobException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobExecutionException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobExecutionException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobExecutionException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobExecutionException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class NoSuchJobExecutionException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public NoSuchJobExecutionException() {
+		// no-op
+	}
+
+	public NoSuchJobExecutionException(final String message) {
+		super(message);
+	}
+
+	public NoSuchJobExecutionException(final Throwable cause) {
+		super(cause);
+	}
+
+	public NoSuchJobExecutionException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobInstanceException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobInstanceException.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobInstanceException.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/operations/NoSuchJobInstanceException.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.operations;
+
+public class NoSuchJobInstanceException extends BatchRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public NoSuchJobInstanceException() {
+		// no-op
+	}
+
+	public NoSuchJobInstanceException(final String message) {
+		super(message);
+	}
+
+	public NoSuchJobInstanceException(final Throwable cause) {
+		super(cause);
+	}
+
+	public NoSuchJobInstanceException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchRuntime.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchRuntime.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchRuntime.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchRuntime.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime;
+
+import javax.batch.operations.JobOperator;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ServiceLoader;
+
+public class BatchRuntime {
+    public static JobOperator getJobOperator() {
+        if (System.getSecurityManager() == null) {
+            return findJobOperator();
+        }
+        return AccessController.doPrivileged(new PrivilegedAction<JobOperator>() {
+            public JobOperator run() {
+                return findJobOperator();
+            }
+        });
+    }
+
+    private static JobOperator findJobOperator() {
+        final ServiceLoader<JobOperator> loader = ServiceLoader.load(JobOperator.class);
+        for (final JobOperator provider : loader) {
+            if (provider != null) {
+                // Use first one
+                return provider;
+            }
+        }
+        return null;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchStatus.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchStatus.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchStatus.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/BatchStatus.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime;
+
+public enum BatchStatus {
+    STARTING,
+    STARTED,
+    STOPPING,
+    STOPPED,
+    FAILED,
+    COMPLETED,
+    ABANDONED
+}
\ No newline at end of file

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobExecution.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobExecution.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobExecution.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobExecution.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime;
+
+import java.util.Date;
+import java.util.Properties;
+
+public interface JobExecution {
+    long getExecutionId();
+
+    String getJobName();
+
+    BatchStatus getBatchStatus();
+
+    Date getStartTime();
+
+    Date getEndTime();
+
+    String getExitStatus();
+
+    Date getCreateTime();
+
+    Date getLastUpdatedTime();
+
+    Properties getJobParameters();
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobInstance.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobInstance.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobInstance.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/JobInstance.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime;
+
+public interface JobInstance {
+    long getInstanceId();
+
+    String getJobName();
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/Metric.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/Metric.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/Metric.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/Metric.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime;
+
+public interface Metric {
+    enum MetricType {
+        READ_COUNT,
+        WRITE_COUNT,
+        COMMIT_COUNT,
+        ROLLBACK_COUNT,
+        READ_SKIP_COUNT,
+        PROCESS_SKIP_COUNT,
+        FILTER_COUNT,
+        WRITE_SKIP_COUNT
+    }
+
+    MetricType getType();
+
+    long getValue();
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/StepExecution.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/StepExecution.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/StepExecution.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/StepExecution.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime;
+
+import java.util.Date;
+import java.io.Serializable;
+
+public interface StepExecution {
+    long getStepExecutionId();
+
+    String getStepName();
+
+    BatchStatus getBatchStatus();
+
+    Date getStartTime();
+
+    Date getEndTime();
+
+    String getExitStatus();
+
+    Serializable getPersistentUserData();
+
+    Metric[] getMetrics();
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/JobContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/JobContext.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/JobContext.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/JobContext.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime.context;
+
+import javax.batch.runtime.BatchStatus;
+import java.util.Properties;
+
+public interface JobContext {
+    String getJobName();
+
+    Object getTransientUserData();
+
+    void setTransientUserData(Object data);
+
+    long getInstanceId();
+
+    long getExecutionId();
+
+    Properties getProperties();
+
+    BatchStatus getBatchStatus();
+
+    String getExitStatus();
+
+    void setExitStatus(String status);
+}

Added: geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/StepContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/StepContext.java?rev=1521825&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/StepContext.java (added)
+++ geronimo/specs/trunk/geronimo-jbatch_1.0_spec/src/main/java/javax/batch/runtime/context/StepContext.java Wed Sep 11 13:21:06 2013
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.batch.runtime.context;
+
+import javax.batch.runtime.BatchStatus;
+import javax.batch.runtime.Metric;
+import java.io.Serializable;
+import java.util.Properties;
+
+public interface StepContext {
+    String getStepName();
+
+    Object getTransientUserData();
+
+    void setTransientUserData(Object data);
+
+    long getStepExecutionId();
+
+    Properties getProperties();
+
+    Serializable getPersistentUserData();
+
+    void setPersistentUserData(Serializable data);
+
+    BatchStatus getBatchStatus();
+
+    String getExitStatus();
+
+    void setExitStatus(String status);
+
+    Exception getException();
+
+    Metric[] getMetrics();
+}

Modified: geronimo/specs/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/pom.xml?rev=1521825&r1=1521824&r2=1521825&view=diff
==============================================================================
--- geronimo/specs/trunk/pom.xml (original)
+++ geronimo/specs/trunk/pom.xml Wed Sep 11 13:21:06 2013
@@ -93,6 +93,7 @@
       <module>geronimo-validation_1.0_spec</module>
       <module>geronimo-ws-metadata_2.0_spec</module>
       <module>geronimo-websockets_1.0_spec</module>
+      <module>geronimo-jbatch_1.0_spec</module>
     </modules>