[EJB 3.0] - Re: Web Beans + JPA
by epbernard
https://anonsvn.jboss.org/repos/hibernate/core/trunk/entitymanager/src/ma...
is your best shot.
Enumeration<URL> xmls = Thread.currentThread()
| .getContextClassLoader()
| .getResources( "META-INF/persistence.xml" );
| if ( ! xmls.hasMoreElements() ) {
| log.info( "Could not find any META-INF/persistence.xml file in the classpath");
| }
| while ( xmls.hasMoreElements() ) {
| URL url = xmls.nextElement();
| log.trace( "Analysing persistence.xml: {}", url );
| List<PersistenceMetadata> metadataFiles = PersistenceXmlLoader.deploy(
| url,
| integration,
| cfg.getEntityResolver(),
| PersistenceUnitTransactionType.JTA ); //might be RESOURCE_LOCAL in EE?
| for ( PersistenceMetadata metadata : metadataFiles ) {
| String provider = metadata.getProvider(); //could be used for a shortcut if Hibernate
| List<String> classes = metadata.getClasses();
| //same for mappingFiles can be orm.xml or hbm.xml with Hibernate
| Set<String> jarFiles = ...; //need to scan these for @Entity @Embedded @MappedSuperclass
| boolean exclude = metadata.getExcludeUnlistedClasses();
| //if exclude == true => do not scan @Entity @Embedded @MappedSuperclass in the *main* jar
|
| }
| }
you will also need orm.xml parsing and check for , <mapped-superclass > and
consider as the default package.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224062#4224062
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224062
17 years
[Performance Tuning] - Re: JBoss Performance Problems with SPECjAppServer2004
by Frank.Feinbube
I tried a lot in solving the problem.
My current guess is, that it has to do with the MySQL 5.1 Database Management System.
M1:0: Error occured in scheduleWorkOrderjava.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: javax.ejb.TransactionRolledbackLocalException: javax.ejb.FinderException: Could not create connection; - nested throwable: (java.sql.SQLException: null, message from server: "Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: null, message from server: "Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"))
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224056#4224056
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224056
17 years
[Performance Tuning] - JBoss Performance Problems with SPECjAppServer2004
by Frank.Feinbube
I am benchmarking JBoss with the SPECjAppServer2004-Benchmark for my master thesis.
When I use an Injectionrate of 30 (which is really low) or higher, I get lots of connection problems on the driver side. These lead to a very poor Benchmark result.
I am working on my master thesis on comparison of J2EE app servers using the SPECjAppServer2004 benchmark. I am using the JBoss SPECj kit and the current version of the benchmark (1.08).
I finally made it run, but there are still lots of error message which result in a very bad performance.
Here is the problem:
On the server-side:
10:18:19,952 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCompletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@29917
07:24:09,895 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa]
Could not find new XAResource to use for recovering non-serializable XAResource
< 131075, 31, 29, 1--53efe8f4:bf4:4990ac87:24f9b5-53efe8f4:bf4:4990ac87:24f9cd
>
On the client-side:
Error: Connection: IOException: java.net.ConnectException: Connection refused: connect
Error: Connection: BindException: java.net.BindException: Address already in use: connect
I hope you can help me make the JBoss perform well in the Benchmark.
Best regards,
Frank Feinbube
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224055#4224055
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224055
17 years