Re: Custom Authenticator Valve in Tomee

2015-11-18 Thread Romain Manni-Bucau
EJB model and web model are still distinct. Agree with you on this one. CDI everywhere will kind of make it obsolete soon. Le 18 nov. 2015 20:18, "Patrick Sansoucy" a écrit : > Yes, did'nt notice it earlier, my bad. But I noticed that I had to add my > security-role's in the web.xml to make it wo

Re: Custom Authenticator Valve in Tomee

2015-11-18 Thread Patrick Sansoucy
Yes, did'nt notice it earlier, my bad. But I noticed that I had to add my security-role's in the web.xml to make it work, since the BaseAuthenticator would throw me a 403 if only using the @DeclaredRoles on my EJB's. I thought it was two different ways of doing the same job ?!? Anyway been messing

Re: Custom Authenticator Valve in Tomee

2015-11-18 Thread Romain Manni-Bucau
CombinedRealm as class or as entry point debugging? TomEERealm is a CombinedRealm IIRC and is an expected wrapper of any realm. Romain Manni-Bucau @rmannibucau | Blog | Github | LinkedIn | Tomitriber 2015-11-18 18:01 GMT-08:00 Patrick Sansoucy : > Thanks for the reply, > I have a weird behaviou

Re: Custom Authenticator Valve in Tomee

2015-11-18 Thread Patrick Sansoucy
Thanks for the reply, I have a weird behaviour, I have specified the following in my context.xml My CustomAuthenticator is basically just a copy of the BasicAuthenticator valve (for testing purposes). What seems weird is that the following code: Principal principal = context.getRealm().authenti

Re: Getting CacheManager from CacheResolverFactory

2015-11-18 Thread Steve Goldsmith
OK, great, thanks for the tip! On Wed, Nov 18, 2015 at 4:42 PM, Romain Manni-Bucau wrote: > add a @Produces for cacheManager and get directly the CacheManager > injected ;) > > CacheBean is then just the producer bean completely hidden from the > other parts of app :) > > Allows to keep the life

Re: Getting CacheManager from CacheResolverFactory

2015-11-18 Thread Romain Manni-Bucau
add a @Produces for cacheManager and get directly the CacheManager injected ;) CacheBean is then just the producer bean completely hidden from the other parts of app :) Allows to keep the lifecycle handling in CacheBean (close() calls) Romain Manni-Bucau @rmannibucau | Blog | Github | LinkedIn

Re: Getting CacheManager from CacheResolverFactory

2015-11-18 Thread sgjava
I used: @Inject public JCacheResolverFactory(final CacheBean cacheBean) { cacheManager = cacheBean.getCacheManager(); } Then it can share the same CacheManager from the CacheBean: @PostConstruct public void init() { cachingProvider = Caching.getCachingProvider

Re: Getting CacheManager from CacheResolverFactory

2015-11-18 Thread Romain Manni-Bucau
the factory just delegates to the JCache API to get the manager: provider = Caching.getCachingProvider(classLoader); manager = provider.getCacheManager(provider.getDefaultURI(), classLoader, configuration.getProperties()); // custom config is there you can add one indirection to get it injected -

Getting CacheManager from CacheResolverFactory

2015-11-18 Thread sgjava
So I created my own CacheResolverFactory, so I can created named caches configured via configuration file and have the JCache annotations use that CacheManager, etc. The problem is that I do not see a way to get the CacheManager from the CacheResolverFactory. I see in https://rmannibucau.wordpress.

Re: Properties in web.xml

2015-11-18 Thread Romain Manni-Bucau
2015-11-18 9:00 GMT-08:00 Lars-Fredrik Smedberg : > Thanks Romain > > Guess I will go for the filter solution as Anatole (and you) suggests... > but it would be nice to learn more about the Authenticator Tomcat API, do > you have any pointers? > Yep: https://tomcat.apache.org/tomcat-7.0-doc/api/o

Re: Properties in web.xml

2015-11-18 Thread Lars-Fredrik Smedberg
Thanks Romain Guess I will go for the filter solution as Anatole (and you) suggests... but it would be nice to learn more about the Authenticator Tomcat API, do you have any pointers? The services are also exposed using JAX-WS so if I go for the JAX-RS filter I would need a JAX-WS handler as well

Re: Resource lookup from EJB

2015-11-18 Thread Romain Manni-Bucau
the same kind of binding exists for EJB and would have made it working in the MDB, that said since you configure a name to build the jndi lookup name, configuring the full name is as simple IMHO. Romain Manni-Bucau @rmannibucau | Blog | Github | LinkedIn | Tomitriber 2015-11-18 8:07 GMT-08:00 m

Re: Properties in web.xml

2015-11-18 Thread Romain Manni-Bucau
Hi tomcat external web.xml (in conf//... typically) is a good one but then if you want a really dynamic solution you will need some code A filter looks good to stay portable but an Authenticator - tomcat API for higher level filters - would allow you to reuse existing authenticators (delegate patt

Properties in web.xml

2015-11-18 Thread Lars-Fredrik Smedberg
Hi! I have a possible use-case where I need to have different configurations in the web.xml depending on the environment deployed to. In the first test environment I cannot enforce any security constraints, in the other test environments and in production I would of course like to run with securit

Re: Resource lookup from EJB

2015-11-18 Thread mean_bcp
Thank you for the quick response. The lookup by openejb:Resource/${dsName} worked in both spots! (Although java:openejb/Resource/${dsName} threw a NameNotFoundException) Maybe bound to comp/env because I had this tag in my web.xml (now removed): dolleeDb javax.sql.DataSource

Re: Configuring ActiveMQ console in tomee

2015-11-18 Thread Romain Manni-Bucau
The pifall of invm is it handles a single broker. Maybe check you dont have multiple ones - jmx can be a first easy check for that. If it is not enough activate debug logs for activemq, you will then get all the needed information I guess - alternative is to debug BrokerRegistry#findFirst if you f

Re: Resource lookup from EJB

2015-11-18 Thread Romain Manni-Bucau
How did you bind dsName in comp/env - this is not the default? A quick solution for you is to configure the full jndi path instead of just the ds name and lookup openejb:Resource/dsName or java:openejb/Resource/dsName. Le 18 nov. 2015 07:44, "mean_bcp" a écrit : > I'm having a problem very simil

Resource lookup from EJB

2015-11-18 Thread mean_bcp
I'm having a problem very similar to http://tomee-openejb.979440.n4.nabble.com/JNDI-Global-resources-and-EJB-JAR-td4663113.html, however I am not explicitly creating Threads. I'm using a MDB in the ejb.jar, and within the MDB attempting to do a DB resource lookup which is failing. This same resour

Re: Configuring ActiveMQ console in tomee

2015-11-18 Thread mean_bcp
Ah, yes - I followed the instructions here: https://rmannibucau.wordpress.com/2014/03/06/tomee-and-activemq-webconsole/ So my system.properties in tomee/conf has: webconsole.type = invm I did not add the other classloader properties mentioned in your blog, because of the comment that it would b

Re: Customize generated ORM file for one-to-many relationship

2015-11-18 Thread Romain Manni-Bucau
Hi Hou can define a cmp persistence unit with the mapping you want - starting from the dumped generated one is often easier. Le 18 nov. 2015 04:15, "seenu.atluri" a écrit : > Hi Romain, > > Could you please answer my query? > > Thanks! > Srinivas > > > > -- > View this message in context: > http

Re: Customize generated ORM file for one-to-many relationship

2015-11-18 Thread seenu.atluri
Hi Romain, Could you please answer my query? Thanks! Srinivas -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/Customize-generated-ORM-file-for-one-to-many-relationship-tp4676821p4676833.html Sent from the TomEE Users mailing list archive at Nabble.com.

RE: References of TomEE popular deployments

2015-11-18 Thread Yann BLAZART
+1 -Original Message- From: prasadkgvs [mailto:prasad.k...@gmail.com] Sent: mercredi 18 novembre 2015 10:06 To: users@tomee.apache.org Subject: Re: References of TomEE popular deployments Hi Steven and Jonathan, Thanks for your response and the shared information. It is encouraging to s

Re: References of TomEE popular deployments

2015-11-18 Thread prasadkgvs
Hi Steven and Jonathan, Thanks for your response and the shared information. It is encouraging to see that TomEE is capable of getting deployed with huge production cluster with 150+ instances and also capable of processing "Millions of transactions a day". It will be good if I can get some names