- 
        1. Re: Configuration DynamicLoginConfigstarksm64 Nov 23, 2004 3:25 PM (in response to karink)It has to be a resource on the deployment classpath. For the given configuration this would need to be placed into the WEB-INF/classes directory of the war. 
- 
        2. Re: Configuration DynamicLoginConfigkarink Dec 3, 2004 10:55 AM (in response to karink)Hi Scott, 
 thanx for your answer.
 If I put the file myloginconfig.xml in the WEB-INF/classes directory,
 it cannot be found when I start JBoss the first time.
 Then I redeployed the service.xml and the file myloginconfig.xml is found.
 So I does not work properly. Is this a bug?
 It would be also cool, to get the login config from somewhere on the
 filesystem (not as part of the web application).
 I tried to do it with the following configuration.<server> <classpath codebase="file:///C:/somedir/etc"/> <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="jboss.security:applicational=SecurityConfig"> <attribute name="AuthConfig">myloginconfig.xml</attribute> <depends optional-attribute-name="LoginConfigService"> jboss.security:service=XMLLoginConfig </depends> <depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager </depends> </mbean> <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner" name="jboss.deployment.tcsample:type=DeploymentScanner,flavor=URL"> <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends> <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute> <attribute name="Filter">org.jboss.deployment.scanner.DeploymentFilter</attribute> <attribute name="ScanPeriod">5</attribute> <attribute name="URLs"> file:///C:/jboss-4.0/TomcatSampleServlets_jboss/deploy/ </attribute> <attribute name="RecursiveSearch">True</attribute> </mbean> </server> 
 The file myloginconfig.xml is located inside the directory specified in the codebase (C:/somedir/etc). Jboss was not able to locate the file (not even during redeployment). Does anybody know how the configuration must look.
 By the way I use JBoss [Zion] 4.0.0 on Win (jdk 1.4.2).
 Regards Karin
- 
        3. Re: Configuration DynamicLoginConfigstarksm64 Dec 7, 2004 7:29 PM (in response to karink)Its not a bug. You cannot deploy a service from the conf/jboss-service.xml file and have that see classes or resources from anything but the server/lib directory and server/conf directory. The web app needs to be deployed as a war that includes a seperate service configuration for the DynamicLoginConfig service. 
- 
        4. Re: Configuration DynamicLoginConfigkarink Dec 8, 2004 2:52 AM (in response to karink)Hi Scott, 
 you misunderstood me. I do not use the conf/jboss-service.xml file
 to configure this. I have a file called TomcatSample-service.xml file, which
 is located in the deploy directory of JBoss. This file references
 a directory C:/jboss-4.0/TomcatSampleServlets_jboss/deploy/
 where my exploded WAR-file is located.
 But anyway. I do not know where I can define such things as a DynamicLoginConfig service inside a WAR file. Is this really
 such a great idea. I mean normally a WAR
 file should correspond to the J2EE standard and it should
 not matter in which container it is running. I think, container dependent
 things should be defined somewhere else.
 Regards
 Karin
- 
        5. Re: Configuration DynamicLoginConfigstarksm64 Dec 8, 2004 1:22 PM (in response to karink)A war file cannot contain anything but servlets. You need to use an ear to bundle a war with other deployment types like services and ejbs. 
 In terms of your example, your simply missing the trailing '/' in the TomcatSample-service.xml classpath. The following works fine for me:<server> <classpath codebase="file:///C:/tmp/etc/"/> <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="jboss.security:applicational=SecurityConfig"> <attribute name="AuthConfig">myloginconfig.xml</attribute> <depends optional-attribute-name="LoginConfigService"> jboss.security:service=XMLLoginConfig </depends> <depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager </depends> </mbean> <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner" name="jboss.deployment.tcsample:type=DeploymentScanner,flavor=URL"> <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends> <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute> <attribute name="Filter">org.jboss.deployment.scanner.DeploymentFilter</attribute> <attribute name="ScanPeriod">5</attribute> <attribute name="URLs"> file:///C:/tmp/TomcatSampleServlets_jboss/deploy/ </attribute> <attribute name="RecursiveSearch">True</attribute> </mbean> </server> 
 Note that we have not tested multiple deployments of the URLDeploymentScanner so there may be some multi-threaded issue with your war deployments. The URLs property accepts a comma seperated list so the second deploy directory can be specified in the conf/jboss-service.xml like:<mbean code="org.jboss.deployment.scanner.URLDeploymentScanner" name="jboss.deployment:type=DeploymentScanner,flavor=URL"> ... <attribute name="URLs"> deploy/,file:///C:/tmp/TomcatSampleServlets_jboss/deploy/ </attribute> ... 
- 
        6. Re: Configuration DynamicLoginConfigkarink Dec 16, 2004 9:01 AM (in response to karink)Hi Scott, 
 thanks for your answer.
 Now it works fine. Also thanks for the hint regarding deploying the
 UrlDeploymentScanner multiple times. We will not
 use this in a production (possibly only during development).
 Regards Karin
 
    