How to access model class directly?

30 views
Skip to first unread message

tus...@omedix.com

unread,
Nov 28, 2013, 1:27:18 AM11/28/13
to induction...@googlegroups.com
Hi Adi,

We need to use our business logic (written in EJB) in batch processing. Now the problem is, all our session information and dependency injection of our model class is being done by Induction Framework. Hence, we can not call our EJB component directly as the DI is managed by Induction. We need to hit the URL for every job which increases load on server.

Is there any way to use business component directly?

Thanks.

Adi

unread,
Dec 1, 2013, 12:15:46 AM12/1/13
to induction...@googlegroups.com
I just wrote a reply to this, and somehow it looks like it did not post, so here goes again. To answer your question, correct, Induction's built-in DI system cannot be used from outside of Induction. However that said, you should not have an issue accessing your EJB based services from a batch context. Remember your services themselves have no dependency on Induction.

So basically you can instantiate an instance of your service EJBs the same way you do it in your Induction factory for the respective service. In fact, you may even choose to call the createModel(...) method of your factory class with the appropriate parameters to create an instance of your service.

Hope this helps.

Adi
Reply all
Reply to author
Forward
0 new messages