Correct Scope for vaadin 8 and spring












0















I have a project, work with Vaadin 8.6 and Spring 5, and vaadin-spring 3.1.1
In this, there is MainUI extends UI that a bean with scope="prototype" initialized in web-application-context.xml



Problem: when we connect to project from more than one client (browser), there is only one session available.



we search and find some manuals, but we can not use it in our project



<bean id="mainUI" class="ir.fanap.fanitoring.ui.MainUI" scope="prototype">


Vaadin Spring Add-on



how can we solve this problem? we did not use annotations for beans and all beans initialized in web-application-context.xml










share|improve this question


















  • 2





    "we did not use annotations for beans and all beans initialized in web-application-context.xml", I am curious to know why? Normally UI class is annotated with @SpringUI annotation, which also implies UIScope.

    – Tatu Lund
    Dec 31 '18 at 10:09











  • it's mean that remove bean from web-application-context and add annotation? and autowire all other beans that passed to it?

    – Alireza
    Dec 31 '18 at 10:34











  • Basically yes, that is the way we usually do it.

    – Tatu Lund
    Jan 1 at 15:07
















0















I have a project, work with Vaadin 8.6 and Spring 5, and vaadin-spring 3.1.1
In this, there is MainUI extends UI that a bean with scope="prototype" initialized in web-application-context.xml



Problem: when we connect to project from more than one client (browser), there is only one session available.



we search and find some manuals, but we can not use it in our project



<bean id="mainUI" class="ir.fanap.fanitoring.ui.MainUI" scope="prototype">


Vaadin Spring Add-on



how can we solve this problem? we did not use annotations for beans and all beans initialized in web-application-context.xml










share|improve this question


















  • 2





    "we did not use annotations for beans and all beans initialized in web-application-context.xml", I am curious to know why? Normally UI class is annotated with @SpringUI annotation, which also implies UIScope.

    – Tatu Lund
    Dec 31 '18 at 10:09











  • it's mean that remove bean from web-application-context and add annotation? and autowire all other beans that passed to it?

    – Alireza
    Dec 31 '18 at 10:34











  • Basically yes, that is the way we usually do it.

    – Tatu Lund
    Jan 1 at 15:07














0












0








0








I have a project, work with Vaadin 8.6 and Spring 5, and vaadin-spring 3.1.1
In this, there is MainUI extends UI that a bean with scope="prototype" initialized in web-application-context.xml



Problem: when we connect to project from more than one client (browser), there is only one session available.



we search and find some manuals, but we can not use it in our project



<bean id="mainUI" class="ir.fanap.fanitoring.ui.MainUI" scope="prototype">


Vaadin Spring Add-on



how can we solve this problem? we did not use annotations for beans and all beans initialized in web-application-context.xml










share|improve this question














I have a project, work with Vaadin 8.6 and Spring 5, and vaadin-spring 3.1.1
In this, there is MainUI extends UI that a bean with scope="prototype" initialized in web-application-context.xml



Problem: when we connect to project from more than one client (browser), there is only one session available.



we search and find some manuals, but we can not use it in our project



<bean id="mainUI" class="ir.fanap.fanitoring.ui.MainUI" scope="prototype">


Vaadin Spring Add-on



how can we solve this problem? we did not use annotations for beans and all beans initialized in web-application-context.xml







spring vaadin vaadin8 view-scope






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 31 '18 at 9:44









AlirezaAlireza

73111




73111








  • 2





    "we did not use annotations for beans and all beans initialized in web-application-context.xml", I am curious to know why? Normally UI class is annotated with @SpringUI annotation, which also implies UIScope.

    – Tatu Lund
    Dec 31 '18 at 10:09











  • it's mean that remove bean from web-application-context and add annotation? and autowire all other beans that passed to it?

    – Alireza
    Dec 31 '18 at 10:34











  • Basically yes, that is the way we usually do it.

    – Tatu Lund
    Jan 1 at 15:07














  • 2





    "we did not use annotations for beans and all beans initialized in web-application-context.xml", I am curious to know why? Normally UI class is annotated with @SpringUI annotation, which also implies UIScope.

    – Tatu Lund
    Dec 31 '18 at 10:09











  • it's mean that remove bean from web-application-context and add annotation? and autowire all other beans that passed to it?

    – Alireza
    Dec 31 '18 at 10:34











  • Basically yes, that is the way we usually do it.

    – Tatu Lund
    Jan 1 at 15:07








2




2





"we did not use annotations for beans and all beans initialized in web-application-context.xml", I am curious to know why? Normally UI class is annotated with @SpringUI annotation, which also implies UIScope.

– Tatu Lund
Dec 31 '18 at 10:09





"we did not use annotations for beans and all beans initialized in web-application-context.xml", I am curious to know why? Normally UI class is annotated with @SpringUI annotation, which also implies UIScope.

– Tatu Lund
Dec 31 '18 at 10:09













it's mean that remove bean from web-application-context and add annotation? and autowire all other beans that passed to it?

– Alireza
Dec 31 '18 at 10:34





it's mean that remove bean from web-application-context and add annotation? and autowire all other beans that passed to it?

– Alireza
Dec 31 '18 at 10:34













Basically yes, that is the way we usually do it.

– Tatu Lund
Jan 1 at 15:07





Basically yes, that is the way we usually do it.

– Tatu Lund
Jan 1 at 15:07












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53985942%2fcorrect-scope-for-vaadin-8-and-spring%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53985942%2fcorrect-scope-for-vaadin-8-and-spring%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas