cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Jco integration - issue spring

0 Kudos

Hi All,

We stumble upon an issue having a JCo integration setup. As we followed the guides on wiki/help, we still have issue initializing our beans, resulting in Hybris failing to startup.

This is how our spring definition looks like:

  <bean id="calendarService" class="somepackage.implbean" scope="sapSession" parent="sapCoreBackendObjectJCo"/>

This is how our bean definition looks like:

 @BackendType("CRM")
 public class CalendarServiceImpl extends BackendBusinessObjectBaseJCo implements CalendarService {

We have all necessary extensions defined in local.extensions and the extensioninfo. However, this service bean never gets initiated and is used as a property reference for another bean (eg. Cronjob). and thus Hybris fails to startup.

Anyone an idea? Are we missing something?

Thanks! Wesley

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

you cant directly inject this bean to other bean as calendarService is session scope. use genericfactory to inject this bean into other beans. Example : see this oob implementation DefaultBolOrderFacade and see this method protected Search getSearch() { return genericFactory.getBean(SapordermgmtbolConstants.ALIAS_BO_SEARCH); } dont inject it in xml file.

0 Kudos

We should be capable of injecting this bean, there are dozens of examples in OOTB implementations, however to no prevail at this time. As you mentioned as a workaround, we are using the genericfactory to fetch the bean @runtime, not the nicest solution but it works. Thanks.