blob: c064f60b00cbb82f701467e3473b9bb30a51d423 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<context:component-scan base-package="org.apache.usergrid.services"/>
<import resource="classpath:/usergrid-core-context.xml"/>
<!-- scan for security -->
<context:component-scan base-package="org.apache.usergrid.security.crypto"/>
<!--
<bean id="cacheManager" class="org.apache.shiro.cache.MemoryConstrainedCacheManager"/>
-->
<bean id="injector"
class="org.apache.usergrid.corepersistence.GuiceFactory">
</bean>
<bean id="cacheManager" class="org.apache.usergrid.security.shiro.ShiroCacheManager">
<constructor-arg name="injector" ref="injector"/>
<constructor-arg name="properties" ref="properties"/>
</bean>
<bean id="realm" class="org.apache.usergrid.security.shiro.Realm">
<property name="name" value="realm"/>
<property name="cacheManager" ref="cacheManager"/>
</bean>
<bean id="securityManager" class="org.apache.shiro.mgt.DefaultSecurityManager">
<property name="realm" ref="realm"/>
</bean>
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod"
value="org.apache.shiro.SecurityUtils.setSecurityManager"/>
<property name="arguments" ref="securityManager"/>
</bean>
<bean id="taskExecutor" class="org.springframework.core.task.SyncTaskExecutor"/>
<bean id="tokenService" class="org.apache.usergrid.security.tokens.cassandra.TokenServiceImpl">
<property name="cassandraService" ref="cassandraService"/>
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<bean id="managementService" class="org.apache.usergrid.management.cassandra.ManagementServiceImpl">
<property name="saltProvider" ref="saltProvider"/>
<constructor-arg ref="injector"/>
</bean>
<bean id="saltProvider" class="org.apache.usergrid.security.salt.NoOpSaltProvider"/>
<bean id="serviceManagerFactory" class="org.apache.usergrid.services.ServiceManagerFactory">
<constructor-arg ref="entityManagerFactory"/>
<constructor-arg ref="properties"/>
<constructor-arg ref="schedulerService"/>
<constructor-arg ref="injector"/>
<constructor-arg ref="queueManagerFactory"/>
</bean>
<bean id="applicationCreator"
class="org.apache.usergrid.management.cassandra.ApplicationCreatorImpl">
<constructor-arg ref="entityManagerFactory"/>
<constructor-arg ref="managementService"/>
</bean>
<bean id="signInProviderFactory" class="org.apache.usergrid.security.providers.SignInProviderFactory">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
<property name="managementService" ref="managementService"/>
</bean>
<bean id="exportService" class="org.apache.usergrid.management.export.ExportServiceImpl">
<property name="managementService" ref="managementService"/>
<property name="emf" ref="entityManagerFactory"/>
<property name="sch" ref="schedulerService"/>
</bean>
<bean id="exportJob" class="org.apache.usergrid.management.export.ExportJob"/>
<bean id="serviceModule" class="org.apache.usergrid.services.guice.ServiceModuleImpl"/>
<bean id="notificationsQueueListener" class="org.apache.usergrid.services.notifications.QueueListener">
<constructor-arg name="emf" ref="entityManagerFactory"/>
<constructor-arg name="props" ref="properties"/>
<constructor-arg name="smf" ref="serviceManagerFactory"/>
</bean>
<bean id="importService" class="org.apache.usergrid.management.importer.ImportServiceImpl">
<property name="managementService" ref="managementService"/>
<property name="emf" ref="entityManagerFactory"/>
<property name="sch" ref="schedulerService"/>
</bean>
<!--<bean id="importQueueListener" class="org.apache.usergrid.services.queues.ImportQueueListener"-->
<!--scope="singleton">-->
<!--<constructor-arg orgAppName="emf" ref="entityManagerFactory" />-->
<!--<constructor-arg orgAppName="metricsService" ref="metricsFactory" />-->
<!--<constructor-arg orgAppName="smf" ref="serviceManagerFactory" />-->
<!--<constructor-arg orgAppName="props" ref="properties" />-->
<!--</bean>-->
<bean id="importJob" class="org.apache.usergrid.management.importer.ImportJob"/>
<bean id="fileImportJob" class="org.apache.usergrid.management.importer.FileImportJob"/>
</beans>