TesterBeanpublic class TesterBean extends Object implements TesterShow injecting in producers
Show how to interact with local producers |
Fields Summary |
---|
private ExampleProducerXA | xa | private org.jboss.ejb3.mdb.ProducerManager | xaManager | private ExampleProducer | local | private org.jboss.ejb3.mdb.ProducerManager | localManager |
Methods Summary |
---|
public void | setLocal(ExampleProducer local)
this.local = local;
this.localManager = ((ProducerObject)local).getProducerManager();
| public void | setXa(ExampleProducerXA xa)
this.xa = xa;
this.xaManager = ((ProducerObject)xa).getProducerManager();
| public void | testLocal()
localManager.connect();
local.method1("testLocal", 1);
Map<String, String> map = new HashMap<String, String>();
map.put("hello", "world");
map.put("great", "ejb3");
local.method2("testLocal2", map);
localManager.close();
| public void | testXA()
xaManager.connect();
xa.method1("testXA", 1);
Map<String, String> map = new HashMap<String, String>();
map.put("hello", "world");
map.put("great", "ejb3");
xa.method2("testXA2", map);
System.out.println("end TESTXA **");
xaManager.close();
|
|