[Installation, Configuration & Deployment] - JBOSS 4.2 CR2 with JBOSS Messaging 1.2
by kevind0718
Hello:
I am trying to configure the "default" server to use JBOSS Messaging 1.2.
I unpacked JBOSS 4.2 and had it running and I went through the Messaging 1.2 install procedure and got it running. Ran the messaging tests with out a problem.
Now I want the 4.2 CR2 default server to run JBOSS Messaging 1.2, so I did the following.
deleted default\deploy\jms and default\jmx-console.war
copied jboss-messaging-1.2.0.sp1\jboss-messaging-scoped.sar to
jboss-4.2.0.CR2\server\default\deploy
then started jboss.
At this point I got an error about not being able to find activation.jar. in jbossws.sar. So I copied it from /default/lib.
Now I get an incomplete deployment error as follows:
11:46:24,386 INFO [Server] Starting JBoss (MX MicroKernel)...
11:46:24,386 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)
11:46:24,386 INFO [Server] Home Dir: C:\ProgFiles\jboss-4.2.0.CR2
11:46:24,386 INFO [Server] Home URL: file:/C:/ProgFiles/jboss-4.2.0.CR2/
11:46:24,386 INFO [Server] Patch URL: null
11:46:24,402 INFO [Server] Server Name: default
11:46:24,402 INFO [Server] Server Home Dir: C:\ProgFiles\jboss-4.2.0.CR2\server\default
11:46:24,402 INFO [Server] Server Home URL: file:/C:/ProgFiles/jboss-4.2.0.CR2/server/default/
11:46:24,418 INFO [Server] Server Log Dir: C:\ProgFiles\jboss-4.2.0.CR2\server\default\log
11:46:24,418 INFO [Server] Server Temp Dir: C:\ProgFiles\jboss-4.2.0.CR2\server\default\tmp
11:46:24,418 INFO [Server] Root Deployment Filename: jboss-service.xml
11:46:24,886 INFO [ServerInfo] Java version: 1.5.0_11,Sun Microsystems Inc.
11:46:24,886 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_11-b03,Sun Microsystems Inc.
11:46:24,886 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
11:46:25,324 INFO [Server] Core system initialized
11:46:27,323 INFO [WebService] Using RMI server codebase: http://localhost:8083/
11:46:27,323 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
11:46:27,744 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
11:46:27,744 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
11:46:27,948 INFO [TransactionManagerService] Starting recovery manager
11:46:28,057 INFO [TransactionManagerService] Recovery manager started
11:46:28,057 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
11:46:30,806 INFO [EJB3Deployer] Starting java:comp multiplexer
11:46:34,070 INFO [ServerPeer] ServerPeer[0] creating server peer with ID 0
11:46:35,616 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
11:46:37,022 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_11\bin
11:46:37,100 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
11:46:37,100 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:46:37,100 INFO [Catalina] Initialization processed in 234 ms
11:46:37,100 INFO [StandardService] Starting service jboss.web
11:46:37,100 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.CR1
11:46:37,147 INFO [Catalina] Server startup in 47 ms
11:46:37,256 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
11:46:37,897 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
11:46:38,100 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp48780jbossws-context-exp.war/
11:46:38,412 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
11:46:39,209 INFO [MailService] Mail Service bound to java:/Mail
11:46:39,349 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
11:46:39,381 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
11:46:39,412 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
11:46:39,443 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
11:46:39,459 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
11:46:39,490 INFO [QuartzResourceAdapter] start quartz!!!
11:46:39,552 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
11:46:39,584 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
11:46:39,599 INFO [RAMJobStore] RAMJobStore initialized.
11:46:39,599 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
11:46:39,599 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
11:46:39,599 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
11:46:40,052 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
11:46:40,318 WARN [JDBCPersistenceManager]
JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently NONE.
Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
Using an isolation level more strict than READ_COMMITTED may lead to deadlock.
11:46:40,818 INFO [ServerPeer] JBoss Messaging 1.2.0.sp1 server [0] started
11:46:40,974 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
11:46:40,974 INFO [ConnectionFactory] [/ConnectionFactory, /XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory] started
11:46:40,974 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
11:46:40,974 INFO [ConnectionFactory] [/NonClusteredConnectionFactory, /NonClusteredXAConnectionFactory, java:/NonClusteredConnectionFactory, java:/NonClusteredXAConnectionFactory] started
11:46:40,974 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,974 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [TopicService] Topic[/topic/testTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [TopicService] Topic[/topic/securedTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [TopicService] Topic[/topic/testDurableTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/testQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/A] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/B] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/C] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/D] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/ex] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/PrivateDLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:40,989 INFO [QueueService] Queue[/queue/PrivateExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,005 INFO [QueueService] Queue[/queue/QueueWithOwnDLQAndExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,005 INFO [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,005 INFO [QueueService] Queue[/queue/QueueWithOwnRedeliveryDelay] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,005 INFO [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,005 INFO [QueueService] Queue[/queue/testDistributedQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,005 INFO [TopicService] Topic[/topic/testDistributedTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
11:46:41,036 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.jca:service=TxCM,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.jca:service=ManagedConnectionPool,name=JmsXA
jboss.jca:service=CachedConnectionManager
jboss.security:service=JaasSecurityManager
jboss:service=TransactionManager
Depends On Me:
jboss.jca:service=ConnectionFactoryBinding,name=JmsXA
ObjectName: jboss.jca:service=ManagedConnectionPool,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=JmsXA
Depends On Me:
jboss.jca:service=TxCM,name=JmsXA
ObjectName: jboss.jca:service=ManagedConnectionFactory,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.messaging:service=ServerPeer
jboss.jca:service=RARDeployment,name='jms-ra.rar'
Depends On Me:
jboss.jca:service=ManagedConnectionPool,name=JmsXA
ObjectName: jboss.jca:service=ConnectionFactoryBinding,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.jca:service=TxCM,name=JmsXA
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:service=RARDeployment,name='jms-ra.rar'
State: NOTYETINSTALLED
Depends On Me:
jboss.jca:service=ManagedConnectionFactory,name=JmsXA
11:46:41,114 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
11:46:41,130 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:46:41,130 INFO [Server] JBoss (MX MicroKernel) [4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)] Started in 16s:712ms
In log I have
2007-05-02 11:46:41,036 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/ProgFiles/jboss-4.2.0.CR2/server/default/deploy/hsqldb-ds.xml
2007-05-02 11:46:41,036 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/ProgFiles/jboss-4.2.0.CR2/server/default/deploy/hsqldb-ds.xml -> file:/C:/ProgFiles/jboss-4.2.0.CR2/server/default/deploy/hsqldb-ds.xml
2007-05-02 11:46:41,036 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.jca:service=TxCM,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.jca:service=ManagedConnectionPool,name=JmsXA
jboss.jca:service=CachedConnectionManager
jboss.security:service=JaasSecurityManager
jboss:service=TransactionManager
Depends On Me:
jboss.jca:service=ConnectionFactoryBinding,name=JmsXA
ObjectName: jboss.jca:service=ManagedConnectionPool,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=JmsXA
Depends On Me:
jboss.jca:service=TxCM,name=JmsXA
ObjectName: jboss.jca:service=ManagedConnectionFactory,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.messaging:service=ServerPeer
jboss.jca:service=RARDeployment,name='jms-ra.rar'
Depends On Me:
jboss.jca:service=ManagedConnectionPool,name=JmsXA
ObjectName: jboss.jca:service=ConnectionFactoryBinding,name=JmsXA
State: CONFIGURED
I Depend On:
jboss.jca:service=TxCM,name=JmsXA
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:service=RARDeployment,name='jms-ra.rar'
State: NOTYETINSTALLED
Depends On Me:
jboss.jca:service=ManagedConnectionFactory,name=JmsXA
2007-05-02 11:46:41,036 DEBUG [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Notified that enabled: true
2007-05-02 11:46:41,036 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
2007-05-02 11:46:41,036 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.deployment:type=DeploymentScanner,flavor=URL dependent components: []
2007-05-02 11:46:41,099 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: jboss-service.xml
2007-05-02 11:46:41,114 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/ProgFiles/jboss-4.2.0.CR2/server/default/conf/jboss-service.xml
2007-05-02 11:46:41,114 DEBUG [org.jboss.web.tomcat.service.JBossWeb] Saw org.jboss.system.server.started notification, starting connectors
2007-05-02 11:46:41,114 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
2007-05-02 11:46:41,130 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
2007-05-02 11:46:41,130 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)] Started in 16s:712ms
2007-05-02 11:46:41,130 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Wed, 2 May 2007 11:46:41>
2007-05-02 11:46:41,130 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
2007-05-02 11:46:41,130 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2007-05-02 11:46:41,146 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2007-05-02 11:46:51,142 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Wed, 2 May 2007 11:46:51>
2007-05-02 11:46:51,142 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
2007-05-02 11:46:51,142 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2007-05-02 11:46:51,142 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2007-05-02 11:48:51,096 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Wed, 2 May 2007 11:48:51>
2007-05-02 11:48:51,096 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
2007-05-02 11:48:51,096 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2007-05-02 11:48:51,096 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2007-05-02 11:49:01,092 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Wed, 2 May 2007 11:49:01>
2007-05-02 11:49:01,092 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
2007-05-02 11:49:01,092 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2007-05-02 11:49:01,092 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2007-05-02 11:51:01,072 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Wed, 2 May 2007 11:51:01>
2007-05-02 11:51:01,072 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
2007-05-02 11:51:01,072 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2007-05-02 11:51:01,072 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2007-05-02 11:51:11,071 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Wed, 2 May 2007 11:51:11>
2007-05-02 11:51:11,071 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
2007-05-02 11:51:11,071 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2007-05-02 11:51:11,071 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2007-05-02 11:53:11,055 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Wed, 2 May 2007 11:53:11>
2007-05-02 11:53:11,055 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
2007-05-02 11:53:11,055 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2007-05-02 11:53:11,055 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2007-05-02 11:53:21,054 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Wed, 2 May 2007 11:53:21>
2007-05-02 11:53:21,054 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
2007-05-02 11:53:21,054 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2007-05-02 11:53:21,054 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2007-05-02 11:55:21,045 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Wed, 2 May 2007 11:55:21>
2007-05-02 11:55:21,045 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
2007-05-02 11:55:21,045 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2007-05-02 11:55:21,045 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2007-05-02 11:55:31,044 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Wed, 2 May 2007 11:55:31>
2007-05-02 11:55:31,044 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
2007-05-02 11:55:31,044 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2007-05-02 11:55:31,044 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
I think I am close, but no cigar.
Need some help please.
Would any other info be helpfull.
Thanks
KD
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042501#4042501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042501
17 years, 4 months
[Persistence, JBoss/CMP, Hibernate, Database] - Can't use Persistence.createEntityManagerFactory to dynamica
by riddick
Hi there,
I'm trying to build an example where the datasource depends on the user. Only the database username and password can change.
I'd like to create an entityManagerFactory with a map containing the username and password and thus using an appropriate entitymanager but it fails.
Here is the code of my session ejb
| @Stateless
| @Local(value = { ContactManager.class })
| @Remote(value = { RemoteContactManager.class })
|
| public class ContactManagerBean implements ContactManager,RemoteContactManager {
|
| /**
| * Ajoute un contact
| */
| public ContactDTO addContact(ContactDTO contactDTO) {
| Map<String, String> env = new HashMap<String, String>();
| env.put("hibernate.connection.username", "test");
| env.put("hibernate.connection.password", "test");
|
| EntityManagerFactory emf =Persistence.createEntityManagerFactory("testUnit",env);
|
|
| EntityManager em = emf.createEntityManager();
| Contact contact = ContactAdapter.getContact(contactDTO);
| EntityTransaction tx = em.getTransaction();
| tx.begin();
| em.persist(contact);
| tx.commit();
| em.close();
| return ContactAdapter.getContactDTO(contact);
| }
|
| /**
| * Liste l'ensemble des contacts de la base de données
| */
| public Collection<ContactDTO> listContact() {
| EntityManagerFactory emf =Persistence.createEntityManagerFactory("testUnit");
| EntityManager em = emf.createEntityManager();
| EntityTransaction tx = em.getTransaction();
| tx.begin();
| Collection<Contact> colC= em.createQuery("SELECT c FROM Contact c").getResultList();
| tx.commit();
| em.close();
| return ContactAdapter.getContactDTOCollection(colC);
| }
| }
|
Here is my persistence.xml file:
| <persistence-unit name="testUnit" transaction-type="JTA">
| <jta-data-source>java:TestDS</jta-data-source>
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <class>entity.Contact</class>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="validate" />
| <property name="hibernate.dialect"
| value="org.hibernate.dialect.MySQLInnoDBDialect" />
| <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test" />
| <property name="hibernate.connection.username" value="sa" />
| <property name="hibernate.connection.password" value="" />
| <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
| <property name="hibernate.connection.pool_size" value="10" />
| </properties>
| </persistence-unit>
|
And here is the error I get
| ...
| Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
| at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
| at session.bean.ContactManagerBean.listContact(ContactManagerBean.java:72)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ... 81 more
| Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:329)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
|
Can anyone can explain me how to deal with the transaction strategy?
Is there a better way to dynamically change the database user?
Thanks by advance,
Anthony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042499#4042499
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042499
17 years, 4 months
[JBoss jBPM] - JBPM Timer Problem
by avivstav
Hi
I try to creater simple flow including Timer:
<process-definition name="testprocess3">
|
| <start-state name='start'>
| <transition to='wait' />
| </start-state>
|
| <state name='wait'>
| <timer name='reminder'
| duedate='5 seconds'
| repeat='5 seconds'
| transition='time out'>
| <action class=MyActionHandler' />
| </timer>
| <transition to='wait2'/>
| </state>
|
| <state name='wait2'>
| <transition to='end'/>
| </state>
|
| <end-state name='end' />
| </process-definition>
And run it from My Test class as follows:
public void processTimer() {
|
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
|
| GraphSession graphSession = jbpmContext.getGraphSession();
|
| ProcessDefinition processDefinition =
| graphSession.findLatestProcessDefinition("testprocess3");
|
| ProcessInstance processInstance =
| new ProcessInstance(processDefinition);
|
| Token token = processInstance.getRootToken();
| assertEquals("start", token.getNode().getName());
|
| token.signal();
|
| token.signal();
| }
| finally {
| jbpmContext.close();
| }
| }
The action class is implemented as follows:
public class MyActionHandler implements ActionHandler {
|
| public void execute(ExecutionContext executionContext) {
| System.out.println("Inside Action handler...");
| }
| }
The first signal() advance from start to wait state which suppose to activate the Timer task every 5 seconds and run the Action class
It looks the Timer is never activated at all.
Any Idea why?
How exactlly Timers works, is it forked from the main process?
I add to jbpm.cfg.xml the following entries:
<jbpm-configuration>
| <jbpm-context>
| <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory"/>
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| </jbpm-context>
|
| <!--configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
| <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
| <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
| <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
| <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
| <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
| <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
| <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
|
| <long name="jbpm.msg.wait.timout" value="5000" singleton="true" />
| <int name="jbpm.byte.block.size" value="1024" singleton="true" />
| <string name="mail.smtp.host" value="localhost" />
| <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
| <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
| <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singelton="true" />
|
| </jbpm-configuration>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042498#4042498
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042498
17 years, 4 months
[Performance Tuning] - Re: JBoss AS Performance (with EJB 3.0)
by PeterJ
A few thoughts:
Having the GC statistics options (such as verbose:gc) on is good if you plan to collect and analyze the statistics. But you should not have them on during production (or even to evaluate the actual performance of your app).
Be aware that UseConcMarkSweepGC is good if you want to guarantee consistent response times. However, it dramatically reduces your throughput. I suggest running both with and without it to see what works best. Considering the heap size you set I don't think you want to suffer through a full garbage, so perhaps having UseConcMarkSweepGC set is best.
The AggressiveOpts option resets a whole set of options (not sure if it resets UseConcMarkSweepGC, I could look at the code but I'm being lazy right now). I recommend testing with and without it, and if you must set it, set it first.
Finally, since every app is different and has different requirements. And each app tends to run on very different hardware, you must spend some time to drive the system, analyze the performance results (including the GC statistics), tweak the settings, and then repeat until you have acceptable performance. I have gone though this cycle for multiple customers, and it takes a significant investment in time and resources. That, of course, is something that cannot be done in a free forum, hence a good reason to buy support.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042493#4042493
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042493
17 years, 4 months
[JBoss Seam] - Re: Mathematical captcha & Email obfuscator
by petemuir
"Homer J." wrote : as parent for s:email I agree with you that it would be conceptually correct / better, but I don't like it because the user would be forced to write more. Further the text (not only the value) get´s obfuscated because, normally, one not only uses a mailto link but also shows the email address in the body of the tag. Therefore further distinction would be required to distinguish normal text and - e.g. - a picture. Last but not least the email tag relies on some stuff in the obfuscator tag to keep the code dry.
Hmm, I see what you mean - I'll think about it :) I can just see this being a cause of confusion down the line to users...
anonymous wrote : However: I stumbled upon a pretty strange behavior when using value binding and ui:repeat - e.g:
| <ui:repeat value="#{newMembers}" var="newMember">
| | <s:obfuscator value="#{newMember.memberName}" /><br />
| | </ui:repeat>
| results in:
| Mona<br />
| | obfuscationOf(Mona)<br />
| | obfuscationOf(obfuscationOf(Mona))<br />
| | ...
| This happens because the value is not renewed for 2nd+ iterations which seems to happen because the name of the value binding is the same. I worked around that by manually setting value=null in encodeEnd but this seems to be quite an ugly hack. Further it works fine for h:outputText.
|
| Is this a bug in JSF or am I missing the obvious? How is this normally solved?
Post an updated patch and I'll look - this *normally* works with no tricks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042491#4042491
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042491
17 years, 4 months