<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sheila&#039;s Blog</title>
	<atom:link href="http://sheilapollard.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sheilapollard.com</link>
	<description>Software Development</description>
	<lastBuildDate>Wed, 24 Mar 2010 17:19:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configure Spring Batch to persist to a database</title>
		<link>http://sheilapollard.com/2010/03/24/configure-spring-batch-to-persist-to-a-database/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2010/03/24/configure-spring-batch-to-persist-to-a-database/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 17:15:21 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[spring]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[spring batch]]></category>

		<guid isPermaLink="false">http://sheilapollard.com/?p=534</guid>
		<description><![CDATA[For anything more than a simplistic application, you will probably want to persist the spring batch job data to a data source.  Spring batch uses a set of database tables to store information about the jobs being executed.  You will need to create the following tables in your database (this script will work [...]]]></description>
			<content:encoded><![CDATA[<p>For anything more than a simplistic application, you will probably want to persist the spring batch job data to a data source.  Spring batch uses a set of database tables to store information about the jobs being executed.  You will need to create the following tables in your database (this script will work for oracle).
<code>CREATE TABLE BATCH_JOB_INSTANCE  (
  JOB_INSTANCE_ID NUMBER(19,0)  NOT NULL PRIMARY KEY ,  
  VERSION NUMBER(19,0) ,  
  JOB_NAME VARCHAR2(100) NOT NULL, 
  JOB_KEY VARCHAR2(32) NOT NULL,
  constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY)
) ;

CREATE TABLE BATCH_JOB_EXECUTION  (
  JOB_EXECUTION_ID NUMBER(19,0)  NOT NULL PRIMARY KEY ,
  VERSION NUMBER(19,0)  ,  
  JOB_INSTANCE_ID NUMBER(19,0) NOT NULL,
  CREATE_TIME TIMESTAMP NOT NULL,
  START_TIME TIMESTAMP DEFAULT NULL , 
  END_TIME TIMESTAMP DEFAULT NULL ,
  STATUS VARCHAR2(10) ,
  EXIT_CODE VARCHAR2(20) ,
  EXIT_MESSAGE VARCHAR2(2500) ,
  LAST_UPDATED TIMESTAMP,
  constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID)
  references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
) ;
  
CREATE TABLE BATCH_JOB_PARAMS  (
  JOB_INSTANCE_ID NUMBER(19,0) NOT NULL ,
  TYPE_CD VARCHAR2(6) NOT NULL ,
  KEY_NAME VARCHAR2(100) NOT NULL , 
  STRING_VAL VARCHAR2(250) , 
  DATE_VAL TIMESTAMP DEFAULT NULL ,
  LONG_VAL NUMBER(19,0) ,
  DOUBLE_VAL NUMBER ,
  constraint JOB_INST_PARAMS_FK foreign key (JOB_INSTANCE_ID)
  references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
) ;
  
CREATE TABLE BATCH_STEP_EXECUTION  (
  STEP_EXECUTION_ID NUMBER(19,0)  NOT NULL PRIMARY KEY ,
  VERSION NUMBER(19,0) NOT NULL,  
  STEP_NAME VARCHAR2(100) NOT NULL,
  JOB_EXECUTION_ID NUMBER(19,0) NOT NULL,
  START_TIME TIMESTAMP NOT NULL , 
  END_TIME TIMESTAMP DEFAULT NULL ,  
  STATUS VARCHAR2(10) ,
  COMMIT_COUNT NUMBER(19,0) , 
  READ_COUNT NUMBER(19,0) ,
  FILTER_COUNT NUMBER(19,0) ,
  WRITE_COUNT NUMBER(19,0) ,
  READ_SKIP_COUNT NUMBER(19,0) ,
  WRITE_SKIP_COUNT NUMBER(19,0) ,
  PROCESS_SKIP_COUNT NUMBER(19,0) ,
  ROLLBACK_COUNT NUMBER(19,0) , 
  EXIT_CODE VARCHAR2(20) ,
  EXIT_MESSAGE VARCHAR2(2500) ,
  LAST_UPDATED TIMESTAMP,
  constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID)
  references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
) ;

CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT  (
  STEP_EXECUTION_ID NUMBER(19,0) NOT NULL PRIMARY KEY,
  SHORT_CONTEXT VARCHAR2(2500) NOT NULL,
  SERIALIZED_CONTEXT CLOB , 
  constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID)
  references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID)
) ;

CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT  (
  JOB_EXECUTION_ID NUMBER(19,0) NOT NULL PRIMARY KEY,
  SHORT_CONTEXT VARCHAR2(2500) NOT NULL,
  SERIALIZED_CONTEXT CLOB , 
  constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID)
  references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
) ;

CREATE SEQUENCE BATCH_STEP_EXECUTION_SEQ MAXVALUE 9223372036854775807 NOCYCLE;
CREATE SEQUENCE BATCH_JOB_EXECUTION_SEQ MAXVALUE 9223372036854775807 NOCYCLE;
CREATE SEQUENCE BATCH_JOB_SEQ MAXVALUE 9223372036854775807 NOCYCLE;</code></p>
<p>You need to add the following jar files to your ear file:</p>
<blockquote><p>
org.springframework.jdbc-3.0.0.RELEASE.jar<br />
com.springsource.com.thoughtworks.xstream-1.3.0.jar<br />
com.springsource.org.codehaus.jettison-1.0.0.jar<br />
commons-dbcp-1.2.2.jar
</p></blockquote>
<p>You first configure your jobRepository
<code>&lt;bean id="jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"&gt;
    &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;property name="transactionManager" ref="transactionManager"/&gt;
&lt;/bean&gt;</code></p>
<p>You then need to configure your datasource and transaction manager.  For oracle the following configuration worked:
<code>&lt;bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
  &lt;/bean&gt;

  &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
    &lt;property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /&gt;
    &lt;property name="url" value="jdbc:oracle:thin:@localhost:1521:XE" /&gt;
    &lt;property name="username" value="username" /&gt;
    &lt;property name="password" value="password" /&gt;
  &lt;/bean&gt;</code></p>
<p>Now you will see entries persisted to the database for each new job that is run.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLz9wPTUzNCNjb21tZW50cw==" title=\"Comments on &quot;Configure Spring Batch to persist to a database&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?534" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=534" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2010/03/24/configure-spring-batch-to-persist-to-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Seam and Spring Batch</title>
		<link>http://sheilapollard.com/2010/02/04/configuring-seam-and-spring-batch/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2010/02/04/configuring-seam-and-spring-batch/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:26:41 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[seam]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring batch]]></category>

		<guid isPermaLink="false">http://sheilapollard.com/?p=529</guid>
		<description><![CDATA[Seam provides jbpm for handling workflows, but doesn&#8217;t have anything dedicated so far to the issue of batch processing.  While jbpm will handle complex business conditional steps, some steps are repetitive rather than complex and are better suited to a batch framework, like Spring Batch.  In order to use Spring Batch with Seam, [...]]]></description>
			<content:encoded><![CDATA[<p>Seam provides jbpm for handling workflows, but doesn&#8217;t have anything dedicated so far to the issue of batch processing.  While jbpm will handle complex business conditional steps, some steps are repetitive rather than complex and are better suited to a batch framework, like Spring Batch.  In order to use Spring Batch with Seam, you will first need to follow the steps to configure Seam to start up the Spring container and make the required Spring beans accessible as Seam components.</p>
<p>These steps describe adding a very simplistic batch job and calling it from a Seam class.  As a simple batch example, the database tables usually used by Spring batch will be held in memory and not persisted to a database.</p>
<p>The first step in the batch process is to upload a csv file and extract the list of people contained in it.  The test file is:
<code>title,firstname,surname,dateOfBirth,country
Mr,John,Smith,1949,United States
Ms,Jane,Smith,03/09/1994,England
Mr,David,Moore,13/04/1972,France
Mr,Robert,Fisher,26/06/1946,Brazil</code></p>
<p>You need to add the following jar files to your ear file (in addition to the ones here.</p>
<blockquote><p>
spring/org.springframework.batch.core-2.0.0.RELEASE.jar<br />
spring/org.springframework.batch.infrastructure-2.0.0.RELEASE.jar<br />
spring/aopalliance-1.0.jar<br />
spring/org.springframework.aop-3.0.0.RELEASE.jar<br />
spring/org.springframework.jdbc-3.0.0.RELEASE.jar<br />
spring/org.springframework.transaction-3.0.0.RELEASE.jar
</p></blockquote>
<p>You should create a new folder to hold the configuration files for your batch jobs on the class path, eg. WEB-INF/classes/exampleJob.xml.  You can import these files into your applicationContext.xml.
<code>&lt;import resource="classpath:/jobs/exampleJob.xml" /&gt;</code></p>
<p>Rather than persisting information about the batch job to a database, you can define an in-memory data source to hold the information in applicationContext.xml.  You need a job repository and a transaction manager defined.
<code>&lt;bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean"&gt;
      &lt;property name="transactionManager" ref="transactionManager"/&gt;
  &lt;/bean&gt;

  &lt;bean id="transactionManager" class="org.springframework.batch.support.transaction.ResourcelessTransactionManager"/&gt;</code></p>
<p>The exampleJob.xml contains the configuration for the batch job itself:
<code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:seam="http://jboss.com/products/seam/spring-seam"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:batch="http://www.springframework.org/schema/batch"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-2.2.xsd
    http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd"&gt;

  &lt;bean id="exampleJob"
    class="com.example.ExampleJob"&gt;
    &lt;seam:component/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jobLauncher"
    class="org.springframework.batch.core.launch.support.SimpleJobLauncher"&gt;
    &lt;property name="jobRepository" ref="jobRepository" /&gt;
    &lt;seam:component/&gt;
  &lt;/bean&gt;
  
  &lt;batch:job id="personUpload"&gt;
    &lt;batch:step id="personload"&gt;
      &lt;batch:tasklet&gt;
        &lt;batch:chunk reader="personItemReader" writer="exampleWriter" commit-interval="5"/&gt;
      &lt;/batch:tasklet&gt;
    &lt;/batch:step&gt;
  &lt;/batch:job&gt;

  &lt;bean id="personItemReader" class="org.springframework.batch.item.file.FlatFileItemReader"&gt;
    &lt;property name="resource" value="file://C:/workspaces/test/v3_crime/testdata/watchlist/uploadwatchlist1.csv" /&gt;
    &lt;property name="lineMapper"&gt;
      &lt;bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper"&gt;
        &lt;property name="lineTokenizer"&gt;
          &lt;bean class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer"&gt;
            &lt;property name="names" value="title,firstname,surname,dateOfBirth,country" /&gt;
          &lt;/bean&gt;
        &lt;/property&gt;  
        &lt;property name="fieldSetMapper"&gt;
          &lt;bean class="com.example.ExampleFieldSetMapper" /&gt;
        &lt;/property&gt;
      &lt;/bean&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="exampleWriter" class="com.example.ExampleWriter" /&gt;
  
&lt;/beans&gt;</code><br />
In this file we define the exampleJob bean which is a java class called ExampleJob.  This is a spring class that is wrapped as a seam component.  We also define a job launcher that uses the job repository already defined in applicationContext.xml.  </p>
<p>The batch job called personUpload contains the step personload which defines a reader and writer for the data.  To read the csv file we use Spring Batch&#8217;s FlatFileItemReader and tell it the names of the fields that are contained in the file.  It uses the ExampleFieldSetMapper class to do the mapping.  We also define an exampleWriter bean that will be used to display the data uploaded in the logs.</p>
<p>The ExampleJob.java class simply launches the batch job.
<code>public class ExampleJob {

    @Autowired
    private JobLauncher jobLauncher;

    @Autowired
    private Job job;

    public void launchJob() throws Exception {
        jobLauncher.run(job, new JobParameters());
    }
}</code></p>
<p>The ExampleFieldSetMapper.java takes the data read in from each line in the csv file and stores it as an UploadedPerson (a simple class containing the properties and getters/setters required).
<code>public class ExampleFieldSetMapper implements FieldSetMapper&lt;UploadedPerson&gt; {

    public UploadedPerson mapFieldSet(FieldSet fs) {
        if(fs == null){
            return null;
        }
        
        UploadedPerson person = new UploadedPerson();
        person.setTitle(fs.readString("title"));
        person.setFirstname(fs.readString("firstname"));
        person.setSurname(fs.readString("surname"));
        person.setDateOfBirth(fs.readString("dateOfBirth"));
        person.setCountry(fs.readString("country"));
        return person;
    }

}</code></p>
<p>ExampleWriter.java just logs the list of UploadedPerson objects to the log files:
<code>public class ExampleWriter implements ItemWriter&lt;Object&gt; {

    UploadWatchlistService  watchlistService;
    
    private static final Log log = LogFactory.getLog(ExampleWriter.class);
    
    /**
     * @see ItemWriter#write(Object)
     */
    public void write(List&lt;? extends Object&gt; data) throws Exception {
        log.info(data);
    }

}</code></p>
<p>Now in the seam component that calls the job we inject the ExampleJob and
<code>@In(create=true)
private ExampleJob exampleJob;
...
try {
  exampleJob.launchJob();
} catch (Exception e) {
  log.info("There was an error: " + e);
}</code></p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLz9wPTUyOSNjb21tZW50cw==" title=\"Comments on &quot;Configuring Seam and Spring Batch&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?529" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=529" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2010/02/04/configuring-seam-and-spring-batch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring seam to integrate spring</title>
		<link>http://sheilapollard.com/2010/01/05/configuring-seam-to-integrate-spring/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2010/01/05/configuring-seam-to-integrate-spring/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 16:27:26 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[seam]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://sheilapollard.com/?p=517</guid>
		<description><![CDATA[There are advantages and disadvantages to choosing Spring or Seam for developing an application.  The third option is to use both of them and leverage the best of both frameworks.  If Spring and Seam are integrated then they can pass components to each other to use depending on which framework can construct that [...]]]></description>
			<content:encoded><![CDATA[<p>There are advantages and disadvantages to choosing Spring or Seam for developing an application.  The third option is to use both of them and leverage the best of both frameworks.  If Spring and Seam are integrated then they can pass components to each other to use depending on which framework can construct that component in the best possible way.  The instructions below are based on Seam 2.2.0.GA and Spring 3.0.0.</p>
<p>In order to integrate Spring into Seam, you need the ability to start up both of the containers and allow them access to each others components.  To assist with this Seam provides a special ContextLoader in the jboss-seam-ioc jar file, so that Seam can read the Spring configuration files and start up the Spring container.  To configure this you need to edit Seam&#8217;s components.xml and add the following namespace and schema entry:
<code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;components ...
xmlns:spring="http://jboss.com/products/seam/spring"
...
http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.2.xsd</code></p>
<p>Further down the file within the components section you instruct Seam to bootstrap the Spring container, assuming by default that there is a WEB-INF/applicationContext.xml containing the Spring configuration.
<code>&lt;spring:context-loader/&gt;</code></p>
<p>You then add a basic applicationContext.xml
<code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:seam="http://jboss.com/products/seam/spring-seam"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-2.2.xsd"&gt;
    
&lt;/beans&gt;</code></p>
<p>Any additional spring configuration will be added to this file.</p>
<p>For this code to work, you need to add the following jar files to your ear file.  The jboss-seam-ioc.jar contains the classes that allow you to integrate Spring and the other jars are required for the Spring configuration files.</p>
<blockquote><p>
jboss-seam-ioc-2.2.0.GA.jar<br />
org.springframework.asm-3.0.0.RELEASE.jar<br />
org.springframework.beans-3.0.0.RELEASE.jar<br />
org.springframework.core-3.0.0.RELEASE.jar<br />
org.springframework.context-3.0.0.RELEASE.jar<br />
org.springframework.expression-3.0.0.RELEASE.jar<br />
org.springframework.web-3.0.0.RELEASE.jar
</p></blockquote>
<p>You can now add a spring bean into your applicationContext.xml
<code>&lt;bean id="exampleSpringBean"
    class="com.example.exampleSpringBean"&gt;
    &lt;property name="testString" value="This is a test" /&gt;
    &lt;seam:component/&gt;
  &lt;/bean&gt;</code></p>
<p>You will obviously need to create a corresponding class for this bean.  The seam:component tag marks this bean as a SpringComponent which is registered for use as a Seam component by the Seam container.</p>
<p>You can now inject the bean into another class as a seam component.
<code>@In(create=true)
private ExampleSpringBean exampleSpringBean;

...

String value = exampleSpringBean.getTestString();</code></p>
<p>This is a very simple example with basic configuration that doesn&#8217;t take into account any of the issues you may need to watch out for when mixing Spring and Seam.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLz9wPTUxNyNjb21tZW50cw==" title=\"Comments on &quot;Configuring seam to integrate spring&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?517" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=517" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2010/01/05/configuring-seam-to-integrate-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Icefaces and JBoss Seam Excel</title>
		<link>http://sheilapollard.com/2009/08/20/configuring-icefaces-and-jboss-seam-excel/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/08/20/configuring-icefaces-and-jboss-seam-excel/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 10:14:42 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[icefaces]]></category>
		<category><![CDATA[seam]]></category>

		<guid isPermaLink="false">http://sheilapollard.com/?p=463</guid>
		<description><![CDATA[As in Configuring Icefaces and Seam PDF, when you want to render excel pages in an application that already uses seam and icefaces, you need to use the default view handler for rendering the excel files.  So you need to follow some of the same steps&#8230;  Separate out the pages so that some are icefaces [...]]]></description>
			<content:encoded><![CDATA[<p>As in <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLzIwMDkvMDgvMTcvY29uZmlndXJpbmctaWNlZmFjZXMtYW5kLXNlYW0tcGRmLz91dG1fY2FtcGFpZ249ZmVlZCZ1dG1fbWVkaXVtPWZlZWQmdXRtX3NvdXJjZT1ibG9n">Configuring Icefaces and Seam PDF</a>, when you want to render excel pages in an application that already uses seam and icefaces, you need to use the default view handler for rendering the excel files.  So you need to follow some of the same steps&#8230;  Separate out the pages so that some are icefaces pages only, the other pages are non-icefaces and do the Excel rendering.   Replace icefaces.jar with just-ice.jar and configure the application to delegate pages that contain
<code&gt;&lt;e:workbook/&gt;&lt;/code> to the standard facelets view handler.</p>
<p>Steps:<br />
1.    Update to icefaces 1.8.1 and jboss-seam 2.2.0.GA and test the application still functions correctly.<br />
2.    Replace icefaces.jar with just-ice.jar (from the icefaces jars) and redeploy the application.  Fix any errors.<br />
3.    Add in the excel functionality.  Add jboss-seam-excel-2.2.0.GA.jar and jxl.jar to your ear file.<br />
4.    In components.xml add the excel and document namespaces<code>xmlns:excel="http://jboss.com/products/seam/excel"
xmlns:document="http://jboss.com/products/seam/document"

http://jboss.com/products/seam/document http://jboss.com/products/seam/document-2.2.xsd
http://jboss.com/products/seam/excel http://jboss.com/products/seam/excel-2.2.xsd</code></p>
<p>5.    In faces-config.xml you add both view handlers
<code>&lt;application&gt;
  &lt;view-handler&gt;com.sun.facelets.FaceletViewHandler&lt;/view-handler&gt;
&lt;/application&gt;

&lt;application&gt;
  &lt;view-handler&gt;com.icesoft.faces.facelets.D2DSeamFaceletViewHandler&lt;/view-handler&gt;
  &lt;message-bundle&gt;
    JSFoverride
  &lt;/message-bundle&gt;
&lt;/application&gt;</code></p>
<p>6.    Configure the document servlet in web.xml
<code>&lt;servlet&gt;
  &lt;servlet-name&gt;Document Store Servlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;org.jboss.seam.document.DocumentStoreServlet&lt;/servlet-class&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Document Store Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.csv&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
&lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Document Store Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.xls&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;</code></p>
<p>and add a new mapping for jsf pages to be handled by the Faces Servlet
<code>&lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;</code><br />
Your application should now be configured to render excels.  To test this you can copy some of the .xhtml pages from the seam \examples\excel to test that the rendering works.  Take ExcelTest.java and people.xhtml.  Create a normal index page and add a link to people.jsf.
<code>&lt;ice:outputLink value="./docs/people.jsf"&gt;2nd Excel Test/&gt;</code></p>
<p>In people.xhtml I had to edit the value to excelTest.people instead of people
<code>&lt;e:worksheet name="People" value="#{excelTest.people}" var="person"&gt;</code></p>
<p>Now redeploy your application and try accessing people.jsf</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLz9wPTQ2MyNjb21tZW50cw==" title=\"Comments on &quot;Configuring Icefaces and JBoss Seam Excel&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?463" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=463" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/08/20/configuring-icefaces-and-jboss-seam-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Icefaces and Seam PDF</title>
		<link>http://sheilapollard.com/2009/08/17/configuring-icefaces-and-seam-pdf/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/08/17/configuring-icefaces-and-seam-pdf/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 13:33:44 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[icefaces]]></category>
		<category><![CDATA[seam]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=455</guid>
		<description><![CDATA[Unfortunately seam-pdf doesn&#8217;t play nice with ICEfaces.  Specifically, the D2DFaceletViewHandler doesn&#8217;t do pdf/email rendering.  The workaround for this is to separate the application into ICEFaces (ice: tags) and Non-ICEFaces (h: tags) pages which are the ones that trigger a pdf or email render.  You can replace icefaces.jar with just-ice.jar, which contains renderers [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately seam-pdf doesn&#8217;t play nice with ICEfaces.  Specifically, the D2DFaceletViewHandler doesn&#8217;t do pdf/email rendering.  The workaround for this is to separate the application into ICEFaces (ice: tags) and Non-ICEFaces (h: tags) pages which are the ones that trigger a pdf or email render.  You can replace icefaces.jar with just-ice.jar, which contains renderers for ICEFaces components only.  Then configure the application to delegate any pages that consist of a
<p:document/> to the standard facelets view handler instead of D2DFaceletViewHandler.</p>
<p><strong>Steps:</strong></p>
<p>1.    I updated to icefaces 1.8.1 and jboss-seam 2.2.0.GA and tested the application still functioned correctly.<br />
2.    Replace icefaces.jar with just-ice.jar (from the icefaces jars) and redeploy the application.  You may get some errors.  For example I found a number of errors caused because an xhtml page contained more than one
<code&gt;&lt;ice:commandButton&gt;&lt;/code> with ids that weren't unique.<br />
3.    If the application is functioning correctly you can start adding in the pdf functionality.  Add itext.jar, itext-rtf.jar, jboss-seam-pdf.jar, jcommon.jar, and jfreechart.jar to your ear file.<br />
4.    In components.xml add the pdf and framework namespaces<code>xmlns:pdf="http://jboss.com/products/seam/pdf" xmlns:core="http://jboss.com/products/seam/core"
xmlns:framework="http://jboss.com/products/seam/framework"</code>
<code>http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.1.xsd
http://jboss.com/products/seam/pdf http://jboss.com/products/seam/pdf-2.1.xsd</code></p>
<p>Also add the following to configure missing pdfs:
<code>&lt;component name="org.jboss.seam.document.documentStore"&gt;
&lt;property name="useExtensions"&gt;true&lt;/property&gt;
&lt;property name="errorPage"&gt;/pdfMissing.seam&lt;/property&gt;
&lt;/component&gt;</code></p>
<p>5.    In faces-config.xml you add both view handlers<br/>
<code&gt;&lt;application>&lt;view-handler&gt;com.sun.facelets.FaceletViewHandler&lt;/view-handler&gt;
&lt;/application&gt;</code>
<code>&lt;application&gt;
&lt;view-handler&gt;com.icesoft.faces.facelets.D2DSeamFaceletViewHandler&lt;/view-handler&gt;
&lt;message-bundle&gt;
JSFoverride
&lt;/message-bundle&gt;
&lt;/application&gt;</code></p>
<p>6.    Configure the document servlet in web.xml
<code>&lt;servlet&gt;
&lt;servlet-name&gt;Document Store Servlet&lt;/servlet-name&gt;
&lt;servlet-class&gt;org.jboss.seam.document.DocumentStoreServlet&lt;/servlet-class&gt;
&lt;/servlet&gt;</code>
<code>&lt;servlet-mapping&gt;
&lt;servlet-name&gt;Document Store Servlet&lt;/servlet-name&gt;
&lt;url-pattern&gt;*.pdf&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;</code></p>
<p>and add a new mapping for jsf pages to be handled by the Faces Servlet
<code>&lt;servlet-mapping&gt;
&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
&lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;</code><br />
Your application should now be configured for icefaces pages, and non-icefaces pages that can render pdfs and emails.  To test this you can copy some of the .xhtml pages from seam's \examples\itext to test that the pdf rendering works.  The index.html lists the examples available.  You will need to take lists.xhtml and Lists.java and add them to your application to test that the PDF Lists link in the index works correctly.  Assuming your application has no errors and the PDF List example generates a pdf successfully, you're ready to use seam pdf in your web application.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD00NTUjY29tbWVudHM=" title=\"Comments on &quot;Configuring Icefaces and Seam PDF&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?455" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=455" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/08/17/configuring-icefaces-and-seam-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up an Automated Build System</title>
		<link>http://sheilapollard.com/2009/06/09/setting-up-an-automated-build-system/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/06/09/setting-up-an-automated-build-system/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 10:04:43 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[build]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=430</guid>
		<description><![CDATA[Many teams apply continuous integration as part of their software development process.  This means that each team member integrates their work regularly.  To facilitate doing this, you first need an automated build script that each developer can use to compile and build the code locally.  If there are no issues, then the developer can check [...]]]></description>
			<content:encoded><![CDATA[<p>Many teams apply continuous integration as part of their software development process.  This means that each team member integrates their work regularly.  To facilitate doing this, you first need an automated build script that each developer can use to compile and build the code locally.  If there are no issues, then the developer can check in their code.  At this point you want an automated build system that takes the latest code from source control and builds it, notifying the team if there are any errors.  The advantage of such an automated build system is that teams are notified early on if there are any integration issues rather than just before a  release deadline.  The build machine also serves as a fully deployed example of the latest version.  When a team member says that a piece of work is completed it should be verified on this machine &#8211; not their own.</p>
<p><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2NydWlzZWNvbnRyb2wuc291cmNlZm9yZ2UubmV0Lw==" target=\"_blank\">Cruisecontrol</a> is an open source continuous integration tool.  It allows you to monitor a project, building it when files are updated and notifying you if any part of the build process fails.  There are a lot of reporting tools that can be run on your build.  Unit tests, cover coverage and analysis tools and java documentation are useful to add to your build and make available in your reporting application.  These can be integrated into cruisecontrol.</p>
<p>This post assumes that you are installing cruisecontrol on a redhat machine and that you deploy your application to JBoss.  Any necessary databases have been installed and configured, and you have an ant build script for building and deploying the application.  You have also created a user called cruise that will run the automated build.</p>
<p><strong>Install Java</strong><br />
Download jdk-6u13-linux-i586.bin to /home/cruise<br />
Type sh jdk-6u13-linux-i586.bin<br />
Accept the license agreement<br />
Java will install into the cruise home directory<br />
JAVA_HOME = /home/cruise/jdk1.6.0_13</p>
<p><strong>Install JBoss</strong><br />
Download jboss-4.2.2.GA.zip to /home/cruise<br />
unzip jboss-4.2.2.GA.zip<br />
To avoid any permgen memory errors edit JBOSS_HOME/bin/run.conf and set the following Xms, Xmx, PermSize and MaxPermSize values
<code&gt;JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512 -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"&lt;/code></p>
<p><strong>Install Ant</strong><br />
Download apache-ant-1.7.1-bin.tar.gz to /home/cruise<br />
gunzip apache-ant-1.7.1-bin.tar.gz<br />
tar -xvf  apache-ant-1.7.1-bin.tar</p>
<p><strong>Configure paths and settings for the user</strong><br />
You need to configure the .bashrc for the cruise user (assuming the user shell is bash)<code># .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
  . /etc/bashrc
fi

# User specific aliases and functions
export JAVA_HOME=/home/cruise/jdk1.6.0_13
export ANT_HOME=/home/cruise/apache-ant-1.7.1
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export JBOSS_HOME=/home/cruise/jboss-4.2.2.GA

export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$ORACLE_HOME/bin:$JBOSS_HOME/bin:$PATH</code><br />
<strong>Install subversion</strong><br />
Subversion should already be available, check this by running 'rpm -q subversion'<br />
and making sure it returns a value</p>
<p><strong>Install cruisecontrol</strong><br />
Download cruisecontrol-src-2.8.2.zip to /home/cruise<br />
unzip cruisecontrol-src-2.8.2.zip<br />
Type ant in /home/cruise/cruisecontrol-2.8.2/main</p>
<p><strong>Configure the build projects</strong><br />
mkdir /home/cruise/build<br />
mkdir /home/cruise/build/artifacts<br />
mkdir /home/cruise/build/logs<br />
mkdir /home/cruise/build/projects</p>
<p><strong>Configure a new project</strong><br />
For a project called 'projectname', in /home/cruise/build/projects/projectname you should check out the source code eg.<br />
svn checkout http://svn.company.com/project/trunk<br />
Configure the project settings and test the build script to verify that it works without errors.</p>
<p><strong>Configure CruiseControl</strong><br />
You will need to create a file called build-projectname.xml
<code>&lt;!-- Delegating build script, used by cruisecontrol to build the project.
Note that the basedir is set to the checked out project --&gt;
&lt;project name="build-projectname"
default="automatedbuild"
basedir="/home/cruise/build/projects/projectname"&gt;
  &lt;target name="automatedbuild"&gt;
    &lt;!-- Get the latest from SVN --&gt;
    &lt;exec executable="svn"&gt;
      &lt;arg line="up --username user --password pass"/&gt;
    &lt;/exec&gt;
    &lt;!-- Call the target that does everything --&gt;
    &lt;ant antfile="build.xml" target="clean-deploy"/&gt;
  &lt;/target&gt;
&lt;/project&gt;</code></p>
<p>Edit this file to match your own settings and set the correct username/password for subversion.</p>
<p>Now you need to create the config.xml that is used by cruisecontrol:
<code>&lt;cruisecontrol&gt;
&lt;!-- Schedule each project to check for modifications every 15 mins and build if modifications have been made --&gt;

&lt;project name="projectname" buildafterfailed="true" requiremodification="true"&gt;
  &lt;plugin name="svn" classname="net.sourceforge.cruisecontrol.sourcecontrols.SVN"/&gt;
    &lt;listeners&gt;
      &lt;currentbuildstatuslistener file="logs/projectname/status.txt"/&gt;
    &lt;/listeners&gt;
    &lt;modificationset quietperiod="180" ignoreFiles="*/projectname/db/**"&gt;
      &lt;svn localworkingcopy="projects/projectname"/&gt;
    &lt;/modificationset&gt;
    &lt;schedule interval="900"&gt;
    &lt;ant anthome="/home/cruise/apache-ant-1.7.1"
buildfile="build-projectname.xml"
target="automatedbuild"
uselogger="true"
usedebug="false"/&gt;
     &lt;/schedule&gt;
    &lt;log logdir="logs/projectname"&gt;
      &lt;delete every="1" unit="MONTH"/&gt;
      &lt;merge dir="projects/projectname/reports/junit/"/&gt;
      &lt;merge file="projects/projectname/reports/checkstyle/cs_errors.xml"/&gt;
      &lt;merge dir="projects/projectname/reports/metrics/"/&gt;
      &lt;merge dir="projects/projectname/reports/cobertura/"/&gt;
    &lt;/log&gt;
  &lt;publishers&gt;
  &lt;htmlemail mailhost="xxx.xxx.x.x"
username="emailuser"
password="emailpass"
returnname="CruiseControl"
returnaddress="&lt;em&gt;user@company.com&lt;/em&gt;"
reportsuccess="always"
subjectprefix="CruiseControl: Projectname - "
buildresultsurl="http://xxx.xxx.x.x:8080/cruisecontrol/buildresults/projectname"
skipusers="true" spamwhilebroken="false"
logdir="logs/projectname"
xsldir="/home/cruise/cruisecontrol-2.8.2/reporting/jsp/webcontent/xsl"
css="/home/cruise/cruisecontrol-2.8.2/reporting/jsp/webcontent/css/cruisecontrol.css"&gt;
&lt;always address="user@company.com" /&gt;
&lt;failure address="teamlist@company.com" reportWhenFixed="true"/&gt;
  &lt;/htmlemail&gt;

&lt;/publishers&gt;

&lt;/project&gt;

&lt;/cruisecontrol&gt;</code></p>
<p>Edit this again to suit your own settings.  Refer back to the cruisecontrol documentation for further information on the settings above, but this will check for updates to the source code every 15 mins.  If there are changes then the build will be run.  If the build fails then the team is emailed.  If it's successful then someone who monitors the build system can be emailed.</p>
<p><strong>Start CruiseControl</strong></p>
<p>To test the cruisecontrol configuration you need to execute cruisecontrol.sh from /home/cruise/build<br />
First set the permissions with chmod a+x /home/cruise/cruisecontrol-2.8.2/main/bin/cruisecontrol.sh<br />
Then run<br />
/home/cruise/cruisecontrol-2.8.2/main/bin/cruisecontrol.sh</p>
<p><strong>Configure Reporting</strong><br />
Type ant in<br />
/home/cruise/cruisecontrol-2.8.2/reporting/jsp</p>
<p>You will be asked for these parameters:<br />
log.dir: /home/cruise/build/logs<br />
status.file: status.txt<br />
artifacts.dir: /home/cruise/build/artifacts</p>
<p>Copy /home/cruise/cruisecontrol-2.8.2/reporting/jsp/dist/cruisecontrol.war to the jboss deploy directory</p>
<p>Start up jboss and you should be able to access cruisecontrol at http://<em>xxx.xxx.x.x</em>:8080/cruisecontrol/</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD00MzAjY29tbWVudHM=" title=\"Comments on &quot;Setting up an Automated Build System&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?430" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=430" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/06/09/setting-up-an-automated-build-system/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Applying Scrum &#8211; Where to Start?</title>
		<link>http://sheilapollard.com/2009/06/03/applying-scrum-where-to-start/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/06/03/applying-scrum-where-to-start/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 22:13:02 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=378</guid>
		<description><![CDATA[No one ever said it was going to be easy taking on the role of scrum master.  One of the best things about scrum is also the worst thing about it.  There&#8217;s a lot of room for interpretation.  Rather than being a detailed framework, scrum is like a list of guidelines or best practices for [...]]]></description>
			<content:encoded><![CDATA[<p>No one ever said it was going to be easy taking on the role of scrum master.  One of the best things about scrum is also the worst thing about it.  There&#8217;s a lot of room for interpretation.  Rather than being a detailed framework, scrum is like a list of guidelines or best practices for developing software.  The purist approach to scrum can be too rigid to flourish in some environments, and after all &#8211; scrum is supposed to be about adapting and improving.  I think it&#8217;s more important to focus on the spirit of scrum and try and implement the best practices described as best you can.</p>
<p>A large number of companies out there now say that they &#8216;do scrum&#8217;.  This can be a bone of contention, especially for those who have a very strict interpretation of what scrum is, and what it isn&#8217;t.  It also presents the problem of taking on the role of scrum master with a team that has been &#8216;doing scrum&#8217; for a period of time, but not necessarily successfully.  It can be hard to sell a new style of managing software development that comes with the same label on the tin as what&#8217;s been done before.  People who have had a negative experience of scrum may be extremely resistent to continuing to use it, even in a different form.</p>
<p>It&#8217;s a daunting task to take responsibility for a team. When you&#8217;re inheriting a development process that has a list of &#8216;issues&#8217; so long you can&#8217;t see the end of it, it&#8217;s easy to get lost just trying to figure out where to start. In the mean time, you have a team that needs to be kept productively busy while you find a way to start progressing in the direction you want to go.  Really, the only place to start with is the Product Backlog.  If that&#8217;s not right, everything is going to fall apart.  This is something to tackle first with the Product Owner, and then with the team.</p>
<p>The scrum master and product owner must commit to working on the backlog and producing something useful for the team.  It can be a good idea to put this as a task in the current Sprint &#8211; even as one with 0 Story Points.  If the team is to commit to delivering what it promises, the Product Owner and Scrum Master must lead by example and do the same.  Inevitably, the team will need to get involved at a certain point to assist with breaking down the backlog items and assigning story point estimates, but there needs to be something there to start with.</p>
<p>To start generating the Product Backlog, a number of meetings were needed with the Product Owner.  We needed a clear understanding of what projects were potentially in the pipeline, what the deadlines were, and how to prioritise these things.  We started with an extremely high level list of about 10 items that was loosely prioritised.  For each of the items a document was created with a broad description of the item and what it involved.  I then split some of these stories into smaller ones and added some of the tasks that might be needed to complete them.  We reviewed what we had at that point and were happy that the list could be broken down into a Product Backlog that would at least cover a couple of months for the development team.  The team could now provide some input and take the first steps into being less dependent on having the Product Owner present for every single meeting.  This had been a must when requirements were only generated in the Planning meetings at the start of every week.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0zNzgjY29tbWVudHM=" title=\"Comments on &quot;Applying Scrum &#8211; Where to Start?&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?378" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=378" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/06/03/applying-scrum-where-to-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing Scrum</title>
		<link>http://sheilapollard.com/2009/05/25/implementing-scrum/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/05/25/implementing-scrum/#comments</comments>
		<pubDate>Mon, 25 May 2009 20:30:40 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=358</guid>
		<description><![CDATA[Scrum is an iterative and incremental software development framework.  It&#8217;s better described as a set of best practices or guidelines, rather than a detailed step-by-step software development process.  The main focus is to increase communication and help teams to empower themselves, so that they can resolve any issues that are preventing them from working to [...]]]></description>
			<content:encoded><![CDATA[<p>Scrum is an iterative and incremental software development framework.  It&#8217;s better described as a set of best practices or guidelines, rather than a detailed step-by-step software development process.  The main focus is to increase communication and help teams to empower themselves, so that they can resolve any issues that are preventing them from working to the best of their ability.  Engineering practices like XP work well within Scrum.  Scrum manages the product development side of things and XP can be used to help improve quality and productivity.</p>
<p>There are two types of roles defined in Scrum.  Pigs are committed to the project &#8211; they are members of the <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA0LzE3L3NjcnVtLXRlYW0v" target=\"_blank\">Scrum Team</a>.  Within a Scrum Team you have the <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA0LzIxL3NjcnVtLXRoZS1zY3J1bS1tYXN0ZXItcm9sZS8=" target=\"_blank\">Scrum Master</a> who ensures that the process is being followed and performs administrative functions.  The <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA0LzIwL3NjcnVtLXByb2R1Y3Qtb3duZXIv" target=\"_blank\">Product Owner</a> represents the project stakeholders.  And the remainder of the team is a cross-functional group of people that are needed to work on the project.  Any other roles are chicken roles.  These people are not part of the process and are not committed to delivering the product, but they provide input.  Chicken roles include stakeholders (customers and vendors), end users, and managers.</p>
<p>Each time-boxed iteration is known as a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA0LzI4L3NjcnVtLXNwcmludC8=" target=\"_blank\">Sprint</a>.  This is usually 1-4 weeks long.  The less confident a team is, the shorter the iterations should be.  At the end of each sprint the team is expected to deliver a potentially shippable piece of software.  The team takes sets of requirements for each sprint from the top of a prioritised list of requirements called the <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzA1L3NjcnVtLXByb2R1Y3QtYmFja2xvZy8=" target=\"_blank\">Product Backlog</a> that is maintained by the Product Owner.</p>
<p>To start using the scrum process you first need to define a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA0LzI5L3NjcnVtLXByb2R1Y3QtdmlzaW9uLw==" target=\"_blank\">Product Vision</a> describing the goal of the project.  You then need to generate a Product Backlog to start working from and assign complexity estimates for each item (this may require a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzExL3NjcnVtLWVzdGltYXRpb24tbWVldGluZy8=" target=\"_blank\">Team Estimation Meeting</a>).  There are a number of meetings that are held during each sprint.  In the <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzEzL3NjcnVtLXBsYW5uaW5nLW1lZXRpbmcv" target=\"_blank\">Sprint Planning Meeting</a> the team discusses requirements in the product backlog, getting as much information as they need from the Product Owner.  The team then selects the requirements (called stories) they think they can commit to delivering at the end of the iteration.  The team breaks down each story into tasks and begins to assign them.  The stories and tasks for the Sprint are put into a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzEyL3NjcnVtLXNwcmludC1iYWNrbG9nLw==" target=\"_blank\">Sprint Backlog</a>.</p>
<p>Every day of the Sprint the team has a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzE0L3NjcnVtLWRhaWx5LW1lZXRpbmcv" target=\"_blank\">Daily Scrum Meeting</a> to synch up, update the Sprint Backlog and make sure everyone knows how the work is progressing.  On the last day of the sprint a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzE4L3NjcnVtLXJldmlldy1tZWV0aW5nLw==" target=\"_blank\">Sprint Review Meeting</a> is held to demonstrate only completed stories to the Product Owner who will give feedback.  Directly after the Review meeting the team holds a <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzA1LzE5L3NjcnVtLXNwcmludC1yZXRyb3NwZWN0aXZlLw==" target=\"_blank\">Sprint Retrospective</a> to discuss how the process can be improved.  The Sprint has now ended.  The Product Owner should make sure that the Product Backlog has been updated and reprioritised before a new sprint begins.  A Team Estimation Meeting may be required to do this.</p>
<p>Scrum builds cross-functional, self-organised teams that communicate as much as possible.  Teams are small with 4-9 members.  It allows for clients to make changes to the requirements and reprioritise them &#8211; but only between sprints.  The work selected for each sprint is frozen and can only be changed by the team in consultation with the Product Owner.  Visibility is high throughout the process and there are no penalties for identifying a problem.  To successfully implement Scrum within an organisation, both management and team members need to buy into the idea.  It&#8217;s also vitally important to find a Scrum Master that will do a good job in coaching the team to reach their full potential.  This is a difficult job to do, as often the person who enforces change is not popular.  Someone who is a poor team lead, is not going to be a good Scrum Master.</p>
<p>When working well, the Scrum process is a nice one to use.  It keeps all the team members heavily involved in the project&#8217;s success and engaged in constantly making improvements.  However it can also be a difficult process to bring into a company as it doesn&#8217;t solve problems that already exist in a company &#8211; it only helps identify the issues.  Ultimately it&#8217;s up to the team to find a way to resolve any issues rather than changing the process to accommodate them.  So if input into the scrum is poor (bad requirements, individuals unwilling to work as a team), then the output will also be poor.</p>
<blockquote><p>&#8220;I estimate that 75% of those organizations using Scrum will not succeed in getting the benefits that they hope for from it.&#8221;  Ken Schwaber</p></blockquote>
<p>That&#8217;s the theory behind scrum.  In practise, it&#8217;s not quite as easy as it may sound.  Over the next few months I&#8217;ll be trying out some more practical approaches to bringing scrum into an organisation.  It seems that every organisation has its own unique approach to using scrum &#8211; what works well for one team doesn&#8217;t necessarily translate to another.  It&#8217;s interesting to see how other teams tackle particular problems and evaluate whether some of those tactics can be employed or altered to work well within your own team.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0zNTgjY29tbWVudHM=" title=\"Comments on &quot;Implementing Scrum&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?358" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=358" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/05/25/implementing-scrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrum &#8211; Release Plan</title>
		<link>http://sheilapollard.com/2009/05/20/scrum-release-plan/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/05/20/scrum-release-plan/#comments</comments>
		<pubDate>Wed, 20 May 2009 08:53:39 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=356</guid>
		<description><![CDATA[The Release Plan forecasts future velocity based on historical data.  It&#8217;s created by the Product Owner who usually waits 2-3 sprints until some historical data has been generated.  The input is the total effort in the product backlog, the team&#8217;s availability, sprint length and velocity.  From this you can determine how many sprints are needed [...]]]></description>
			<content:encoded><![CDATA[<p>The Release Plan forecasts future velocity based on historical data.  It&#8217;s created by the Product Owner who usually waits 2-3 sprints until some historical data has been generated.  The input is the total effort in the product backlog, the team&#8217;s availability, sprint length and velocity.  From this you can determine how many sprints are needed in total to complete the backlog.   The Product Owner uses this information to update the backlog items so they will get assigned to Sprints according to priority, capacity and building shippable increments.</p>
<p>The Product Owner updates the Release Plan at the end of each Sprint to include current velocity, changes in capacity or capability, and changes in the Product Backlog.  The data can also be shown as a Release Burndown Chart plotting the effort left in the Product Backlog vs time.</p>
<p>The Release Plan should show:</p>
<p>Sprint numbers<br />
Start and End Dates<br />
Velocity (guess)<br />
Comments</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0zNTYjY29tbWVudHM=" title=\"Comments on &quot;Scrum &#8211; Release Plan&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?356" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=356" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/05/20/scrum-release-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrum &#8211; Sprint Retrospective</title>
		<link>http://sheilapollard.com/2009/05/19/scrum-sprint-retrospective/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/05/19/scrum-sprint-retrospective/#comments</comments>
		<pubDate>Tue, 19 May 2009 08:55:04 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=354</guid>
		<description><![CDATA[The Sprint Retrospective takes place after the Sprint Review meeting.  It is an opportunity for the team to identify process improvements to make.  They determine what worked well in the last Sprint, and what didn&#8217;t.  The team can take data from previous Sprint Backlog reports, focus on any issues that arose and decide upon actions [...]]]></description>
			<content:encoded><![CDATA[<p>The Sprint Retrospective takes place after the Sprint Review meeting.  It is an opportunity for the team to identify process improvements to make.  They determine what worked well in the last Sprint, and what didn&#8217;t.  The team can take data from previous Sprint Backlog reports, focus on any issues that arose and decide upon actions to take.</p>
<p>The purpose of the meeting is to improve the process &#8211; the issues should be addressed, rather than blaming team members.  The outcome of the meeting should be actionable improvements that are added to the next Sprint Backlog.  The team should focus on a couple of improvements that are achievable in the next Sprint.  They have to be recorded in the Sprint Backlog as improving the process is part of each Sprint Goal and progress must be measured.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0zNTQjY29tbWVudHM=" title=\"Comments on &quot;Scrum &#8211; Sprint Retrospective&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?354" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=354" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/05/19/scrum-sprint-retrospective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
