java backed webscripts or spring dependency injection

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2014 01:36 AM
Hi every one
Im using spring in my application and also needs to use alfresco services in my application , Im confused that how I Use spring Injection to get alfresco services?is spring injection as same as java backed web scripts or not?
can I use alfresco services in my application directly or I should add my codes as an amp file to alfresco?
thanks
Im using spring in my application and also needs to use alfresco services in my application , Im confused that how I Use spring Injection to get alfresco services?is spring injection as same as java backed web scripts or not?
can I use alfresco services in my application directly or I should add my codes as an amp file to alfresco?
thanks
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2014 07:13 AM
If you want to use alfresco services your my application directly ,you should embed Alfresco into your application,make your application and Alfresco reside in the same process.It is not recommended ,you should consider other remote apis(opencmis,webscript)
If you really want to embed alfresco in to your application
There are many options you can inject alfresco services to you bean.
You can just inject alfresco service bean you want to refer to
for example authenticationService
Or you can inject ServiceRegistry to you bean ,from ServiceRegistry you can get all public service api.this option is recommended
If you really want to embed alfresco in to your application
There are many options you can inject alfresco services to you bean.
You can just inject alfresco service bean you want to refer to
for example authenticationService
in your java class import org.alfresco.service.cmr.security.AuthenticationService <bean id="yourbeanid" class="com.**.YourClass" > <property name="authenticationService" ref="authenticationService" />.. </bean>
Or you can inject ServiceRegistry to you bean ,from ServiceRegistry you can get all public service api.this option is recommended
in your java clss import org.alfresco.service.ServiceRegistry;in spring configuration file config bean <bean id="yourbeanid" class="com.**.YourClass" > <property name="serviceRegistry" ref="ServiceRegistry" /> </bean>

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2014 03:08 AM
thanks a lot for your answer
as I see you mean If I want to use alfresco services directly I can use ServiceRegistry or Spring dependency injection , then I should make an AMP file of my codes and embed it in my alfresco war file
if I want to use services remotely I should use other remote APIs like opencmis or webscripts
as I see you mean If I want to use alfresco services directly I can use ServiceRegistry or Spring dependency injection , then I should make an AMP file of my codes and embed it in my alfresco war file
if I want to use services remotely I should use other remote APIs like opencmis or webscripts
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2014 06:52 PM
Yes that is it
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 02:25 PM
I'm trying to instantiate Alfresco-Spring-Context embedded in my Spring project. I did as #kaynezhang suggested but I couldn't get it working. I'm having problems with jars dependencies in eclipse. How should I build dependencies with SDK Alfresco-Embedded ?
Thx for any help.
Thx for any help.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 05:06 AM
You can refer to http://wiki.alfresco.com/wiki/Alfresco_SDK_4.0 on how to set up alfresco eclipse project for embedded use.
