[JCA] New message: "Re: CachedConnectionManager API issue"
by Vicky Kak
User development,
A new message was posted in the thread "CachedConnectionManager API issue":
http://community.jboss.org/message/524456#524456
Author : Vicky Kak
Profile : http://community.jboss.org/people/vickyk
Message:
--------------------------------------------------------------
> gaohoward wrote:
>
> My understanding is that it simulates a JCA start up in a JBoss server. This works with AS 4 lib set. Now I need this work with AS 5 too. It turned out AS 5 has changed the API. I don't know how to do it.
>
>
The code basically plugs in the JCA infrastruture MBeans for the testcase.
You can knock off the following call
mbeanServer.invoke(on, "start", new Object[0], new String[0]);
This basically was calling the startService() operation in 4.x implementation which had been doing this
protected void startService()
throws Exception
{
tm = (TransactionManager) getServer().getAttribute(transactionManagerServiceName,
"TransactionManager");
TransactionSynchronizer.setTransactionManager(tm);
ServerVMClientUserTransaction.getSingleton().registerTxStartedListener(this);
EnterpriseContext.setUserTransactionStartedListener(this);
}
With Jboss5 we only need to set the TM which can be done by calling the
setTransactionManager() on the CachedConnectionManager implenetation, check code
https://svn.jboss.org/repos/jbossas/trunk/connector/src/main/java/org/jbo...
The other parts are knocked off as needed for this
https://jira.jboss.org/jira/browse/JBAS-6159
So what I had pointed before should be helpful, you should knockoff the call on start() operation on the CCM in your testcase.
Also I am wondering if you really need to plugin the CCM, the CCM is used to track the connection taken by the meta-ware objects.
I am not sure if your test case need it, this is what you will have to check.
Go ahead and try the approach which I had suggested and let us know if you see red signal.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524456#524456
16 years, 5 months
[jBPM] New message: "Does anyone knows how to deploy ProcessDefintion in JBPM 4.2.1"
by Marcin M
User development,
A new message was posted in the thread "Does anyone knows how to deploy ProcessDefintion in JBPM 4.2.1":
http://community.jboss.org/message/524444#524444
Author : Marcin M
Profile : http://community.jboss.org/people/kot.filemon
Message:
--------------------------------------------------------------
I am facing a serious problem, which can a blocker for us.
I have wrote a small piecie of code that builds ProcessDefintion.
ProcessDefinitionBuilder builder = ProcessDefinitionBuilder.startProcess("Hello World");
builder.startActivity(new StartActivity()).initial().transition("hello display").endActivity();
builder.startActivity("hello display", new Display("Hello")).transition("world display").endActivity();
builder.startActivity("world display", new Display("World")).endActivity();
ProcessDefinition processDefinition = builder.endProcess();
The Display class implements ActivityBehaviour and pariculary does nothing.
My setup is Spring 3.0, Spring jbpm integration, jbpm 4.2 via maven (from JBoss repository). I am looking for a way to deploy this small process, I have found several ways on wiki and forum which fail:
http://docs.jboss.org/jbpm/pvm/manual/html_single/#d0e1870
I donot have PvmDbSession class on my classpath (but for sure I do have pvm jars included!) + EnvironmentFactory is an interface.
The question is how to deploy ProcessDefintion that has been built by ProcessDefintionBuilder?
thanks in advance for any help
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524444#524444
16 years, 5 months
[JCA] New message: "Re: CachedConnectionManager API issue"
by Yong Hao Gao
User development,
A new message was posted in the thread "CachedConnectionManager API issue":
http://community.jboss.org/message/524442#524442
Author : Yong Hao Gao
Profile : http://community.jboss.org/people/gaohoward
Message:
--------------------------------------------------------------
Hi Vicky,
Thanks for look after my question. JBM 1.x has a test framework to simulate a JBoss server runtime environment. The simulated server can be configured to selectively start a set of services such as
Transactions, Remoting, Datasources, JCA services etc for different tests. The above mentioned method is used to start a JCA service, like:
if (jca)
{
startCachedConnectionManager(CACHED_CONNECTION_MANAGER_OBJECT_NAME);
// DefaultDS specific
startManagedConnectionFactory(DEFAULTDS_MANAGED_CONNECTION_FACTORY_OBJECT_NAME);
startManagedConnectionPool(
DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME,
DEFAULTDS_MANAGED_CONNECTION_FACTORY_OBJECT_NAME,
"ByContainer");
startConnectionManager(DEFAULTDS_CONNECTION_MANAGER_OBJECT_NAME,
true, true, TRANSACTION_MANAGER_OBJECT_NAME,
CachedConnectionManagerMBean.OBJECT_NAME,
DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME);
startWrapperDataSourceService();
}
where CACHED_CONNECTION_MANAGER_OBJECT_NAME = new ObjectName("jboss.jca:service=CachedConnectionManager");
DEFAULTDS_MANAGED_CONNECTION_FACTORY_OBJECT_NAME = new ObjectName("jboss.jca:name=DefaultDS,service=ManagedConnectionFactory");
DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME = new ObjectName("jboss.jca:name=DefaultDS,service=ManagedConnectionPool");
DEFAULTDS_CONNECTION_MANAGER_OBJECT_NAME = new ObjectName("jboss.jca:name=DefaultDS,service=LocalTxCM");
TRANSACTION_MANAGER_OBJECT_NAME = new ObjectName("jboss:service=TransactionManager");
My understanding is that it simulates a JCA start up in a JBoss server. This works with AS 4 lib set. Now I need this work with AS 5 too. It turned out AS 5 has changed the API. I don't know how to do it.
I attached the source file (ServiceContainer) that contains the above code piece for your info.
Thanks.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524442#524442
16 years, 5 months