tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis MONTEIRO <jean-louis.monte...@atosorigin.com>
Subject Re: Where to place my third party jars ?
Date Tue, 24 Nov 2009 15:06:54 GMT



Martin Elkjær wrote:
> 
> Hi,
> 
> Just started using OpenEJB last week - but so far I'm very satisfied!
> I've migrated an web application running on Tomcat with GWT on top an
> Hibernate in the bottom. So far every things seems to be running, but I
> need
> some advice for fine-tuning. I've read through the documentation, but some
> questions still keeps coming... :-)
> 
Thanks for that!

Martin Elkjær wrote:
> 
> 1. Where should I place 3rd party libs for my application ? If I put them
> in
> WEB-INF/lib the openEJB startup is very very slow - guess it is because
> it's
> scanning all the jars - if I put them in the openEJB/lib folder it starts
> very fast. So my question is: Is there a way to tell OpenEJB not to scan
> the
> whole WEB-INF/lib folder but only WEB-INF/classes ??
> 
IMO, you should not put your jars in openejb/lib. It's better to fit servlet
API and put your jars in WEB-INF/lib
By the way, you can exclude jars to avoid full application scanning. By
default, OpenEJB scans all jars.
In the last release (or may be in the trunk), we added a set of jars to
exclude, but you can definitely exclude/include whatever you want.

https://issues.apache.org/jira/browse/OPENEJB-1107
https://issues.apache.org/jira/browse/OPENEJB-1107  --> builtin exclude list

If you need to exclude/include some jars, have a look here 
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.html
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.html .

Don't forget the note at the bottom of the page.


Martin Elkjær wrote:
> 
> 2. I'm planning to use JMS in the near future.
> My plan is to use ActiveMQ in embedded mode, mostly because of the simple
> setup and speed (same JVM). But is this OK ?
> I've done some testing trying to use MySQL for storing messages, but it
> doesn't seem to work (no tables are created in the database scheme?!?!) My
> setup is :
> -------------------------------------------------------------
> <Resource id="My JMS Resource Adapter" type="ActiveMQResourceAdapter">
>   # Broker configuration URI as defined by ActiveMQ
>   # see http://activemq.apache.org/broker-configuration-uri.html
> 
>   BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false
> 
>   # Broker address
> 
>   ServerUrl vm://localhost?async=true
> 
>   # DataSource for persistence messages
> 
>   DataSource jmsDatabase
> </Resource>
> 
> <Resource id="jmsDatabase" type="DataSource">
>   JdbcDriver com.mysql.jdbc.Driver
>   JdbcUrl jdbc:mysql://localhost:3306/jms
>   UserName jms
>   Password jms
>   ValidationQuery select 1
>   MinIdle 2
>   MaxIdle 10
>   MaxActive 50
>   MaxWait 10000
>   InitialSize 2
>   JtaManaged false
> </Resource>
> 
> Best regards
> Martin
> 

It should work.
Do you have a runnable example?
If so, can you send us a sample to reproduce the issue?

Hope it helps,
Jean-Louis


-- 
View this message in context: http://old.nabble.com/Where-to-place-my-third-party-jars---tp26495607p26497483.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message