You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by chongma <ma...@nbmlaw.co.uk> on 2016/09/30 08:46:02 UTC

EJB Timer run as another user

I have a Timer running in the background successfully on a Singleton.  But it
runs into problems when it  makes rest calls which require authentication. 
Is there any way to run the Timer as a particular user?  Or assign the
system a role?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/EJB-Timer-run-as-another-user-tp4680258.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: EJB Timer run as another user

Posted by chongma <ma...@nbmlaw.co.uk>.
Thanks.  That works but in the end I had to pass the credentials anyway.

By the way I am converting my TomEE 1.7.4 projects to 7.0.1 and it is very
good.  JSF 2.2 is a big improvement.  I also moved to Plus from Plume and
MyFaces seems less buggy than Mojarra and I have had no problems with
OpenJPA yet.  Well done with all your hard work.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/EJB-Timer-run-as-another-user-tp4680258p4680264.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: EJB Timer run as another user

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

did you check @RunAs?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-09-30 10:46 GMT+02:00 chongma <ma...@nbmlaw.co.uk>:

> I have a Timer running in the background successfully on a Singleton.  But
> it
> runs into problems when it  makes rest calls which require authentication.
> Is there any way to run the Timer as a particular user?  Or assign the
> system a role?
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/EJB-Timer-run-as-another-user-tp4680258.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>