[IronJacamar] - Bug in creating ManagedConnectionFactory instance?
by Andreas Mueller
Andreas Mueller [https://community.jboss.org/people/amueller] created the discussion
"Bug in creating ManagedConnectionFactory instance?"
To view the discussion, visit: https://community.jboss.org/message/738535#738535
--------------------------------------------------------------
This is my configuration (AS 7.1.1):
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
swiftmq_jca16.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<config-property name="debugMode">
true
</config-property>
<connection-definitions>
<connection-definition class-name="*com.swiftmq.connector.v16.outbound.ManagedConnectionFactoryImpl*" jndi-name="java:/comp/env/CF" pool-name="SwiftMQConnectionFactoryPool">
<security>
<application/>
</security>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="com.swiftmq.jms.QueueImpl" jndi-name="java:/com/env/testqueue1" pool-name="testqueue1">
<config-property name="queueName">
testqueue1@router1
</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
</resource-adapters>
</subsystem>
This is an excerpt of the ra.xml for the outbound connection factories:
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>
*com.swiftmq.connector.v16.outbound.ManagedConnectionFactoryImpl*
</managedconnectionfactory-class>
<config-property>
<config-property-name>connectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>QueueConnectionFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>userName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>
javax.jms.QueueConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
com.swiftmq.connector.v16.outbound.ConnectionFactoryImpl
</connectionfactory-impl-class>
<connection-interface>
javax.jms.QueueConnection
</connection-interface>
<connection-impl-class>
*com.swiftmq.connector.v16.outbound.QueueConnectionImpl*
</connection-impl-class>
</connection-definition>
<connection-definition>
<managedconnectionfactory-class>
com.swiftmq.connector.v16.outbound.ManagedConnectionFactoryImpl
</managedconnectionfactory-class>
<config-property>
<config-property-name>connectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>TopicConnectionFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>userName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>
javax.jms.TopicConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
com.swiftmq.connector.v16.outbound.ConnectionFactoryImpl
</connectionfactory-impl-class>
<connection-interface>
javax.jms.TopicConnection
</connection-interface>
<connection-impl-class>
com.swiftmq.connector.v16.outbound.TopicConnectionImpl
</connection-impl-class>
</connection-definition>
<connection-definition>
<managedconnectionfactory-class>
*com.swiftmq.connector.v16.outbound.ManagedConnectionFactoryImpl*
</managedconnectionfactory-class>
<config-property>
<config-property-name>connectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>ConnectionFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>userName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>
javax.jms.ConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
com.swiftmq.connector.v16.outbound.ConnectionFactoryImpl
</connectionfactory-impl-class>
<connection-interface>
javax.jms.Connection
</connection-interface>
<connection-impl-class>
com.swiftmq.connector.v16.outbound.ConnectionImpl
</connection-impl-class>
</connection-definition>
<transaction-support>XATransaction</transaction-support>
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
As you see, class *com.swiftmq.connector.v16.outbound.ManagedConnectionFactoryImpl* is used to create 3 different Types of JMS connection factories (Queue, Topic and unified). If I now deploy and start the RA, it seems JBoss fetches all entries with the name of the specified ManagedConnectionFactory and creates a JNDI entry which fails because the name is already registered:
17:57:38,552 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015876: Starting deployment of "swiftmq_jca16.rar"
17:57:38,905 INFO [stdout] (MSC service thread 1-4) [SwiftMQ | ManagedConnectionFactoryImpl, connectionFactoryName=*QueueConnectionFactory*]/createConnectionFactory, connectionManager=org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl@156a6be ...
17:57:38,906 INFO [stdout] (MSC service thread 1-4) [SwiftMQ | ManagedConnectionFactoryImpl, connectionFactoryName=QueueConnectionFactory]/createConnectionFactory, connectionManager=org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl@156a6be returns: com.swiftmq.connector.v16.outbound.ConnectionFactoryImpl@147bc1
17:57:38,907 INFO [org.jboss.as.deployment.connector] (MSC service thread 1-4) JBAS010406: Registered connection factory java:/comp/env/CF
17:57:38,910 INFO [stdout] (MSC service thread 1-4) [SwiftMQ | ManagedConnectionFactoryImpl, connectionFactoryName=*TopicConnectionFactory*]/createConnectionFactory, connectionManager=org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl@7c9b46 ...
17:57:38,910 INFO [stdout] (MSC service thread 1-4) [SwiftMQ | ManagedConnectionFactoryImpl, connectionFactoryName=TopicConnectionFactory]/createConnectionFactory, connectionManager=org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl@7c9b46 returns: com.swiftmq.connector.v16.outbound.ConnectionFactoryImpl@b635d7
17:57:38,911 INFO [org.jboss.as.deployment.connector] (MSC service thread 1-4) JBAS010406: Registered connection factory java:/comp/env/CF
17:57:38,913 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.ra.deployment."swiftmq_jca16.rar_1": org.jboss.msc.service.StartException in service jboss.ra.deployment."swiftmq_jca16.rar_1": org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [swiftmq_jca16]
...
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.connector.connection-factory.java:/comp/env/CF is already registered
This seems to be a bug for me. Or is there a way to configure it?
Thanks,
Andreas
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738535#738535]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - How to get Event Properties with an EventListener
by hansi007
hansi007 [https://community.jboss.org/people/hansi007] created the discussion
"How to get Event Properties with an EventListener"
To view the discussion, visit: https://community.jboss.org/message/738449#738449
--------------------------------------------------------------
I have an EventListener
public class MyEventListener implements ProcessEventListener{
private IPersistenceCallback persistenceCallback;
public TimerEventListener(IPersistenceCallback persistenceCallback) {
//super();
this.persistenceCallback = persistenceCallback;
}
@Override
public void beforeProcessStarted(ProcessStartedEvent event) {
// TODO Auto-generated method stub
}
@Override
public void afterProcessStarted(ProcessStartedEvent event) {
// TODO Auto-generated method stub
}
@Override
public void beforeProcessCompleted(ProcessCompletedEvent event) {
// TODO Auto-generated method stub
}
@Override
public void afterProcessCompleted(ProcessCompletedEvent event) {
// TODO Auto-generated method stub
}
@Override
public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
System.out.println(event.getNodeInstance().getNodeName());
NodeInstance ni = event.getNodeInstance();
// if(ni instanceof EventNodeInstance){
// System.out.println("EVENT_NODE_ISTANCE");
// EventNodeInstance eventNi=(EventNodeInstance)ni;
// System.out.println(eventNi.getMetaData());
// }
//
// if(event.getNodeInstance().getVariable("Timer Delay") != null)System.out.println("VARRRRRRRRRRRRRRR:"+event.getNodeInstance().getVariable("Timer Delay").toString());
}
Thanks for your help!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738449#738449]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[Datasource Configuration] - Oracle datasource configuration with jboss 5.1
by rukia
rukia [https://community.jboss.org/people/rukia] created the discussion
"Oracle datasource configuration with jboss 5.1"
To view the discussion, visit: https://community.jboss.org/message/737685#737685
--------------------------------------------------------------
| %2%
Posts: 2
|
http://www.coderanch.com/templates/default/images/icon_minipost_new.gif (http://www.coderanch.com/forums/posts/list/581141#2648333)posted Today 15:43:55
http://www.coderanch.com/templates/default/images/thumbs-up.gif (http://www.coderanch.com/templates/default/images/thumbs-up.gif)
http://www.coderanch.com/templates/default/images/icon_quote.gif (http://www.coderanch.com/forums/posts/quote/0/2648333) http://www.coderanch.com/templates/default/images/icon_edit.gif (http://www.coderanch.com/forums/jforum?module=posts&action=edit&post_id=2... |
| Hello,
Actuallly i am unable to configure correctly a new oracle datasource, i spent a week trying to make it work but no way!!
I need to define a new oracle datasource, i am using Oracle 11g , Jboss 5.1
My oracle-ds.xml
[code=java]
[b]<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<use-java-context>false</use-java-context>
<!--<connection-url>jdbc:oracle:thin:@localhost:1521:iamsaas</connection-url> -->
<connection-url>jdbc:oracle:thin:@localhost:1521:iamsaas</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>ADMIAMSAAS</user-name>
<password>iamsaas</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<min-pool-size>5</min-pool-size>
<max-pool-size>200</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<blocking-timeout-millis>10000</blocking-timeout-millis>
<metadata> <type-mapping>Oracle9i</type-mapping> </metadata>
</local-tx-datasource>
</datasources>[/b][color=red] [/color]
[/code]
My persistence.xml
[code=java]
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="IAMPersistance" transaction-type="JTA">
<jta-data-source>java:/OracleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
</persistence> [color=red] [/color]
[/code]
when i deploy my ejb project on jboss i get these errors,
[b]2012-05-24 15:37:07,908 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] (main) Starting persistence unit persistence.unit:unitName=#IAMPersistance
2012-05-24 15:37:07,908 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=persistence.unit:unitName=#IAMPersistance state=Create
javax.naming.NameNotFoundException: OracleDS not bound[/b][color=red] [/color]
[b]DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#IAMPersistance' **")
Deployment "jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#IAMPersistance' **
Deployment "persistence.unit:unitName=#IAMPersistance" is in error due to the following reason(s): javax.naming.NameNotFoundException: OracleDS not bound[/b][color=red] [/color]
but in the JMX console i can see my beans!
Please can anyone help me, i really need it :s ???
|
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737685#737685]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[IronJacamar] - Exporting connection related classes
by Earnest Dyke
Earnest Dyke [https://community.jboss.org/people/earnest.dyke] created the discussion
"Exporting connection related classes"
To view the discussion, visit: https://community.jboss.org/message/736830#736830
--------------------------------------------------------------
Greetings all,
Well, I got my JCA connector to work in EAP 5 and it's a thing of beauty if I do say so myself. My requirements have changed a little however and now I find that I need to deploy my JCA to AS 7. So I added the resource adapter config in standalone.xml and deployed and it seems to have deployed fine. When I deployed the web app that utilizes the JCA, I am getting NoClassDefFoundError exceptions on the connection classes. It appears that pre-AS 7 all of the classes in the .rar where available globally but now in AS 7 they are not. Is this observation correct? If so, what do I need to do to make my connection classes available to my .war? Do I need to bundle them into a jar and create a module for them?
Thanks in advance for any and all relevant responses.
Earnie!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/736830#736830]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months