geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weberjn <webe...@gmail.com>
Subject Re: API for nested subjects?
Date Thu, 19 Jul 2012 14:24:37 GMT
OK, let's put it diffently:

How can I call the EJB below from a standalone Java Client with three
different Users (let's say round-robin), but without having to open a new
InitialContext for each call?

Thanks,
Juergen

@Stateless
public class PrincipalEJB
{
	@Resource
    private EJBContext context;

    public String info() 
    {
    	String s = context.getCallerPrincipal().getName();
    	System.out.println(s);
        return s;
    }
}


--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/API-for-nested-subjects-tp3985483p3985495.html
Sent from the Users mailing list archive at Nabble.com.

Mime
View raw message