View Javadoc

1   /*
2    * $Id: JcaModel.java 10129 2007-12-21 20:33:11Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.ra;
12  
13  import org.mule.impl.MuleDescriptor;
14  import org.mule.impl.model.AbstractModel;
15  import org.mule.umo.UMOComponent;
16  import org.mule.umo.UMODescriptor;
17  import org.mule.umo.manager.UMOWorkManager;
18  
19  /**
20   * Creates a model suitable for Jca execution
21   */
22  public class JcaModel extends AbstractModel
23  {
24      public static final String JCA_MODEL_TYPE = "jca";
25      /* JCA Model should execute work instance using container provided WorkManager */
26      UMOWorkManager workManager;
27  
28      protected UMOComponent createComponent(UMODescriptor descriptor)
29      {
30          return new JcaComponent((MuleDescriptor) descriptor, workManager);
31      }
32  
33      public String getType()
34      {
35          return JCA_MODEL_TYPE;
36      }
37  
38      public UMOWorkManager getWorkManager()
39      {
40          return workManager;
41      }
42  
43      public void setWorkManager(UMOWorkManager workManager)
44      {
45          this.workManager = workManager;
46      }
47  
48  }