[jboss-user] [JCA/JBoss] - Re: Passing current user identity to the back-end database

adrian@jboss.org do-not-reply at jboss.com
Thu Jul 12 15:43:40 EDT 2007


One "belt and braces" way to do it (if you want further guidance ask in the security forum)
is to not deploy your application via hot deployment.

Instead you would deploy an mbean that does the deployment programmatically.
e.g. something like  (pseudo code)

  | public class DeployWebApp implements DeployWebAppMBean
  | {
  |    public void start() throws Exception
  |    {
  |        loginUsingClientLoginModule(user, password);
  |        try
  |        {
  |            // really a JMX invocation
  |            MainDeployer.deploy(urlToWebApp);
  |        }
  |        finally
  |        {
  |            logout();
  |        }
  |    }
  | 
  |    public void stop() throws Exception
  |    {
  |         // Really JMX
  |         MainDeployer.undeploy(urlToWebApp);
  |    }
  | }
  | 

But there's some subtle issues like making your mbean
depend on the JBossWEB (Tomcat) deployer so it doesn't try to deploy the url
before Tomcat is available.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063701#4063701

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063701



More information about the jboss-user mailing list