cancel
Showing results for 
Search instead for 
Did you mean: 

getting JSR170 interface in Dialog

m0n
Champ in-the-making
Champ in-the-making
Hi All
Im new to Alfresco and currently trying to implement CustomDialog.
To work with nodes I'd like to use JSR-170 interface.
But problem is that i cannot get Session object from Dialog.

I tried following code to get Repository which throws exception (
java.lang.IllegalArgumentException: a beanFactoryReference already exists for key jbpm_configuration):

ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
ctx.getBean("JCR.Repository");

for the following code…:

WebApplicationContextUtils.getWebApplicationContext(ServletContext sc);
… I don't know how to get ServletContext reference Smiley Happy

As I understand ideally would be to get reference to current reference to repository Session object.

Thanks in Advance!
5 REPLIES 5

rdanner
Champ in-the-making
Champ in-the-making
Hi All
Im new to Alfresco and currently trying to implement CustomDialog.
To work with nodes I'd like to use JSR-170 interface.
But problem is that i cannot get Session object from Dialog.

I tried following code to get Repository which throws exception (
java.lang.IllegalArgumentException: a beanFactoryReference already exists for key jbpm_configuration):

ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
ctx.getBean("JCR.Repository");

for the following code…:

WebApplicationContextUtils.getWebApplicationContext(ServletContext sc);
… I don't know how to get ServletContext reference Smiley Happy

As I understand ideally would be to get reference to current reference to repository Session object.

Thanks in Advance!

Are you trying to create a Custom Dialog inside Alfresco or a custom application – outside alfresco using JCR to communicate with it?

m0n
Champ in-the-making
Champ in-the-making
Inside Alfresco…
Just want to make it clear for myself: is it possible to use jsr170 inside, or I have to use foundation services for working with nodes etc..

rdanner
Champ in-the-making
Champ in-the-making
Inside Alfresco…
Just want to make it clear for myself: is it possible to use jsr170 inside, or I have to use foundation services for working with nodes etc..

Yep!  You can even use them (The JCR and the foundation services together)

m0n
Champ in-the-making
Champ in-the-making
Yep!  You can even use them (The JCR and the foundation services together)

How I would then get a Session reference in Custom Dialog?

tak
Champ in-the-making
Champ in-the-making
I would like to know how to get the Session..