Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Alex Soto
Hi, Yes that example works but if I do something like @Path(sc) public static class Res { @Context private SecurityContext sc; @GET @RolesAllowed(therole) public boolean f() { return sc.isUserInRole(therole); } } Note that in

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Romain Manni-Bucau
Well, in your sample @RolesAllowed is ignored since that's not an EJB. Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-12 9:57 GMT+01:00 Alex Soto asot...@gmail.com: Hi, Yes that example works but if I do

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Alex Soto
:( I thought that this standard annotation could be used in standalone JAXRS endpoint. Well then I will need to do some kind of interceptor. 2014-11-12 10:06 GMT+01:00 Romain Manni-Bucau rmannibu...@gmail.com: Well, in your sample @RolesAllowed is ignored since that's not an EJB. Romain

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Romain Manni-Bucau
Don't loose too much time on it ;) org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-12 10:11 GMT+01:00 Alex Soto asot...@gmail.com: :( I thought

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Alex Soto
I cannot relay on cxf :( 2014-11-12 10:15 GMT+01:00 Romain Manni-Bucau rmannibu...@gmail.com: Don't loose too much time on it ;) org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Romain Manni-Bucau
Oh I forgot. So yes you are on your own excepted if you use an EJB ;). Then you have 2 solutions for the impl: - cdi interceptor with SecurityContext injected - JAXRS filter with priority AUTHORIZATION Second one will be called before first one but not sure it is a big deal Romain Manni-Bucau

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Alex Soto
hehehe yeah currently I am implementing the second one. Basically I want to implement a portable solution, the good news is that I can implement this logic, add it in some kind of jaxrs-common project in company repo and that's all everybody needs to import it to use security. Maybe this should

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Romain Manni-Bucau
I guess it is part of JavaEE 8 scope (making EJB services available to CDI beans) but it is not yet finalized. Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-12 10:32 GMT+01:00 Alex Soto asot...@gmail.com:

tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread SKR
I thought I'm doing something very simple, but my deployment doesn't work. I build a ROOT.war with a demo JAX-RS application. I unpacked a fresh apache-tomee-1.7.1-plus.tar.gz and deleted all dirs and files from webapps/. When I drop by ROOT.war into webapps/ and start tomEE all things go fine.

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread Romain Manni-Bucau
Hi I think it was fixed on the SNAPSHOT. basically conf/xxx/yyy was not well supported. Configuring it from server.xml or tomee.xml should be fine Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github:

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread hwaastad
You might also do it like this: http://www.aschua.de/blog/pairing-angularjs-and-javaee-for-authentication/ br hw -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE2-JAXRS-Security-Context-tp4672828p4672851.html Sent from the TomEE Users mailing list archive at

Re: TomEE2 JAXRS Security Context

2014-11-12 Thread Alex Soto
that's awesome thank you so much, 2014-11-12 11:45 GMT+01:00 hwaastad he...@waastad.org: You might also do it like this: http://www.aschua.de/blog/pairing-angularjs-and-javaee-for-authentication/ br hw -- View this message in context:

EJB EAR Multicast

2014-11-12 Thread falcon
Hi everyone, I've deployed an EAR which contains an EJB inside in TomEE /apps folder, by now, I manage to connect with the EJB from an standalone client (main java class out of the server context). But I need one more step, making this EAR clustered and I'm not be able to do because I get this

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread SKR
Thanks for the answer! when I configure it in server.xml Host name=localhost appBase=/opt/app/myapp/tomcat/webapps unpackWARs=true autoDeploy=true the behavior is the same. I get ClassNotFoundExceptions. I don't see a possibility to configure it via tomee.xml. Do you have a hint for me? For

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread Romain Manni-Bucau
2014-11-12 14:06 GMT+01:00 SKR k...@cosma-consult.de: Thanks for the answer! when I configure it in server.xml Host name=localhost appBase=/opt/app/myapp/tomcat/webapps unpackWARs=true autoDeploy=true the behavior is the same. I get ClassNotFoundExceptions. I don't see a possibility to

testing with eclipselink.

2014-11-12 Thread Ron Smits
I have a small application that uses eclipselink and sqlite. This works perfectly except for the testing. I have no clue how to tell EJBContainer to use eclipselink as provider. It is setup in persistence.xml: persistence-unit name=evedb transaction-type=JTA

Re: testing with eclipselink.

2014-11-12 Thread Romain Manni-Bucau
Hi are you sure you use the persistence.xml you think? setting provider you shouldn't have any issue. Site note: we have an openejb-core-eclipselink replacing openejb-core which comes with eclipselink out of the box Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/

Re: EJB EAR Multicast

2014-11-12 Thread Romain Manni-Bucau
Hi are you sure of your host? Doesn't it work with locahost instead of your IP? Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-12 12:27 GMT+01:00 falcon manuelfalcondam...@gmail.com: Hi everyone, I've

Re: testing with eclipselink.

2014-11-12 Thread Ron Smits
ok sorry to have bothered the list. There was a second persistence.xml lurking around. After cleaning my shit (and in the meantime cleaning my pom) all started working the way I want. Thanks Romain for pointing me to the right direction. Ron On Wed Nov 12 2014 at 3:21:01 PM Romain Manni-Bucau

Re: testing with eclipselink.

2014-11-12 Thread Romain Manni-Bucau
We all did it ;) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-11-12 15:59 GMT+01:00 Ron Smits ron.sm...@gmail.com: ok sorry to have bothered the list. There was a

Re: testing with eclipselink.

2014-11-12 Thread Howard W. Smith, Jr.
On Wed, Nov 12, 2014 at 9:20 AM, Romain Manni-Bucau rmannibu...@tomitribe.com wrote: Site note: we have an openejb-core-eclipselink replacing openejb-core which comes with eclipselink out of the box Was openejb-core-eclipselink added for Plume (mojarra/eclipselink)? what version of

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread SKR
Hi Romain, thanks for the hint. I double checked the config in server.xml. I think I had a typo. Using server.xml config works! Do you know, if there will be a tomEE 1.7.2 with the conf/Catalina/host fix? Or is tomEE 2.0.0 the next release? Thanks and regards SKR -- View this message in

Re: testing with eclipselink.

2014-11-12 Thread Romain Manni-Bucau
2014-11-12 16:11 GMT+01:00 Howard W. Smith, Jr. smithh032...@gmail.com: On Wed, Nov 12, 2014 at 9:20 AM, Romain Manni-Bucau rmannibu...@tomitribe.com wrote: Site note: we have an openejb-core-eclipselink replacing openejb-core which comes with eclipselink out of the box Was

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread Romain Manni-Bucau
If you can test the snapshot I'm sure you'll know pretty quick ;). If the fix I'm fixing about solves it then it will be in 1.7.2. That said it was not exactly the same so not sure at 100% it solves it. Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread SKR
I tried the 2.0.0-SNAPSHOT. Is this the right one or is there a 1.7.2 SNAPSHOT? exact revision I tried is: apache-tomee-2.0.0-20141112.040853-107-plus sadly I cannot say, if the issue is fixes, because I'm getting other problems with CDI support :( But it seems tag the issue is not fixed. see

Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException

2014-11-12 Thread Romain Manni-Bucau
Hi this is highly possible it is not fixed. IIRC the fix was related to virtual webapp loaders. What I don't get is if tomcat deploys it we should get the right path as well. Are you able to share a sample showing it doesn 't worj with mvn tomee:run? Side note: there is a 1.7.2-SNAPSHOT but the