dojolava wrote:
>
> Hi all,
>
> I am trying to configure my own SecurityService, as I want to use an own
> Callbackhandler for the default Authentication.
>
> I specified the following:
>
> in META-INF/service-jar.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ServiceJar>
> <ServiceProvider
> id="My Security Service"
> service="SecurityService"
> types="SecurityService"
> class-name="com.mydomain.security.MySecurityServiceImpl" />
> </ServiceJar>
>
> in the openejb.xml:
>
> <SecurityService id="My Security Service" provider="My Security Service"/>
>
> I get this error:
>
> org.apache.openejb.OpenEJBException: Failed Configuring Service(id=My
> Security Service): Cannot find the ServiceProvider id My Security Service
> in the service-jar.xml at My Security Service. Check that your OpenEJB
> configuration file is point to the right ServiceProvider id."
> at
> org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:726)
> at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:290)
> at
> org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:297)
> at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:276)
>
> Can anybody tell me what I am doing wrong?
>
> Thanx,
> Mathis
>
The location of the service-jar.xml is a little tricky: it must be in a
specific folder in a META-INF directory and accessible from the classpath.
I've done the same and it worked for me.
Can you try the following changes ?
in META-INF/com.mydomain.security/service-jar.xml
(Be careful to the location)
<?xml version="1.0" encoding="UTF-8"?>
<ServiceJar>
<ServiceProvider
id="My Security Service"
service="SecurityService"
types="SecurityService"
class-name="com.mydomain.security.MySecurityServiceImpl" />
</ServiceJar>
in the openejb.xml:
<SecurityService id="Custom Security Service"
provider="com.mydomain.security#My Security Service"/>
Regards,
Jean-Louis
--
View this message in context:
http://www.nabble.com/Define-Custom-SecurityService---configure-service-jar.xml-tp22699295p22703305.html
Sent from the OpenEJB User mailing list archive at Nabble.com.