What are different scopes in Hybris?

The scope can be defined as a virtual space, situation or time line, under which a particular activity is valid or possible. In terms of Hybris, the scope is the time for which a bean is available for performing business logic.

In addition to Spring scopes, Hybris has defined below scopes.

1) Tenant : This is equivalent  to singleton scope of spring. The only difference is that here Hybris limit the instance of bean in question to a particular tenant.

Hybris has deprecated this scope in version 5.0.

2) yrequest : This scope is equivalent to request scope. But this is used out side the web application context. It means that you can access these beans even in absence of a web application. These are basically used in back end processes, where we don’t want to expose our services on web, but still want to use them from outside of our project.

Once a session is invalidated, the scope ceases to exist, and instances are destroyed.

2 thoughts on “What are different scopes in Hybris?

  1. For yrequest :

    If we don’t want to expose our services on web then how can we use them from outside of our project??
    Please explain.

    Thanks in advance!!!

    Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s