tomee-emdedded,rest and jaas test

2014-03-13 Thread hwaastad
Hi, I have a project using a custom jaas module an I'm protecting my rest resources (and ejb's) via @rolesallowed and securityconstraints in web.xml etc. I't working as supposed to. However, is it possible to use tomee embedded for doing end-to-end testing? i.e, catalina_opts

Re: tomee-emdedded,rest and jaas test

2014-03-13 Thread Romain Manni-Bucau
The property needs to be setup before any JAAS usage is done, depending what you use of JAAS it can work if passed to tomee properties. The best way to validate you are in a good case or not is to test ;) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn:

Re: Problem with ActiveMQ in TomEE...

2014-03-13 Thread Romain Manni-Bucau
either remove amq from your app or add in conf/system.properties openejb.classloader.forced-skip=org.apache.activemq Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-13

Re: tomee-emdedded,rest and jaas test

2014-03-13 Thread hwaastad
OK, I made some tests and adding login.config to src/test/resources and: System.setProperty(java.security.auth.login.config, src/test/resources/login.config); and in webapp-root/META-INFO/context.xml adding jaasrealm info. Then I can do a complete end-to-end test including JAAS. ...learning

Re: tomee-emdedded,rest and jaas test

2014-03-13 Thread Romain Manni-Bucau
yeah, globally while you don't use jaas before (JavaSE JAAS tests) it works fine. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-13 12:49 GMT+01:00 hwaastad

Re: Problems loading context.xml with a LifecycleListener

2014-03-13 Thread ihunter
I've followed the advice from Romain about trying to use place holders, and set up a LifecycleListener (see 2 posts down). However, whenever I try to load context.xml with my listener in, it is either getting ClassNotFoundException (I assume because its in the wrong place for the right

Problems loading context.xml with a LifecycleListener

2014-03-13 Thread ihunter
[Re-posted because I wasnt sure if it would be clear that it follows on from this issue] I've followed the advice from Romain about trying to use place holders in the Resource section of resources.xml, and set up a LifecycleListener (see here

Re: Problems loading context.xml with a LifecycleListener

2014-03-13 Thread Trevor Stevens
Are you talking about a Tomcat context file? I believe it should be located at /META-INF/context.xml and not /WEB-INF/classes/META-INF/context.xml. Trevor Stevens tstev...@me.com On Mar 13, 2014, at 10:26 AM, ihunter ihun...@hotmail.com wrote: I've followed the advice from Romain about

Re: Problems loading context.xml with a LifecycleListener

2014-03-13 Thread ihunter
Yes, if I place it there, for me I get 'ClassNotFound' for my Listener. So what I'm trying to achieve (as per Romains suggestion) is to load a Listener which can then inject DB properties acquired from a known file. He also suggested creating a custom DataSourceCreator. If I cant use context.xml,

RE: MDB not invoked

2014-03-13 Thread Gobi Selvaraj
Hi, Can you explain how and where did you configure the QCF and Queues and Listener ports in the Tomee server? -- View this message in context: http://openejb.979440.n4.nabble.com/MDB-not-invoked-tp4548110p4668190.html Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Problems loading context.xml with a LifecycleListener

2014-03-13 Thread Romain Manni-Bucau
classnotfound doesn't make sense here, can you reproduce it in a sample you share? Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-13 16:28 GMT+01:00 ihunter

Re: EJB in custom JAAS LoginModule

2014-03-13 Thread John D. Ament
Hmmm.. I don't know if the JAAS spec or EE specs either state that you can inject into login modules. On Thu, Mar 13, 2014 at 12:42 PM, Piercarlo Alberto Beghetto - Diennea piercarlo.beghe...@diennea.com wrote: I still have problem in integration with LoginModule and EJBs. What i've done

Re: EJB in custom JAAS LoginModule

2014-03-13 Thread Romain Manni-Bucau
not by spec, we have a lazy realm supporting cdi in tomee btw Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-13 17:46 GMT+01:00 John D. Ament john.d.am...@gmail.com:

Re: EJB in custom JAAS LoginModule

2014-03-13 Thread Romain Manni-Bucau
Hi actually we were supporting injections in tomcat realm ( http://rmannibucau.wordpress.com/2012/08/27/tomee-put-your-realm-in-your-webapp/ ) not login modules, can be a nice enhancement actually. PS: can be easily achived using deltaspike BeanProvider too Romain Manni-Bucau Twitter:

Re: EJB in custom JAAS LoginModule

2014-03-13 Thread Romain Manni-Bucau
FYI https://issues.apache.org/jira/browse/TOMEE-1140 Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-13 19:12 GMT+01:00 Romain Manni-Bucau rmannibu...@gmail.com: Hi

RE: MDB not invoked

2014-03-13 Thread Johnny Guo
Hi, I was using Tomcat instead of Tomee. And for the QCF and Queues, the resources were placed in Sever.xml and resource-link in context.xml. Both files are common Tomcat configuration files and the configuration was standard activeMQ configuration which can be found on its website. From: