users@glassfish.java.net

[gf-users] Re: JSR-352 within OSGi EJB or WAR failes to execute batch job

From: <forums_at_java.net>
Date: Thu, 25 Sep 2014 10:49:37 -0500 (CDT)

Ok I got it to work! It seems like that the OSGi-CDI (CDI in particular)
environment of Glassfish respects the export-package statement in the
manifiest file of an OSGi-Bundle. Thats the reason why the actual batch
artifact (in my case a Batchlet) didn't get executed. I didn't expect this
kind of behaviour. I thought the JobOperator, which I get from the Batch-Api
would run in the context of the bundle and would have access to all packages
within the bundle, including injecting via CDI. Why the JobOperator has
access to the resources like META-INF/batch-jobs or
WEB-INF/classes/META-INF/batch-jobs, but not to the private packages confuses
me ? Maybe someone with more knowledge about the Glassfish OSGi platform
could explain this behaviour?

--
[Message sent by forum member 'kewlmain']
View Post: http://forums.java.net/node/930735