[javaee-spec users] Re: [ejb-spec users] Transactional _at_Singleton @Startup lifecycle

From: reza_rahman <>
Date: Mon, 16 Jan 2017 10:26:37 -0500

No one has been assigned to be the EJB specification lead for quite some time now. The best place to forward this question for now might be the Java EE platform expert group and Linda specifically.
Hope this helps.
Sent via the Samsung Galaxy S7, an AT&T 4G LTE smartphone
-------- Original message --------From: Stefan Zwanenburg <> Date: 1/13/17 6:22 PM (GMT-05:00) To: Subject: [ejb-spec users] Transactional @Singleton @Startup lifecycle
Hello everyone, 
Let me start off by saying I can't pretend to understand the entirety of the EJB specifications. Despite this, I've found myself in a bit of a bind. 
A short description of said bind: we use the container product of one of the members of the expert group developing this spec, and I believe it to not be fulfilling one of its responsibilities. In particular the way in which it handles @Startup singletons. What I have is one such singleton, and within its @PostConstruct callback, it publishes a message to a queue, and it does this transactionally. This works when I deploy the singleton on a running container, as that means all it needs to complete the transaction is up and running. However, if I restart the container, it'll run the @PostConstruct callback before being able to commit the transaction successfully. 
Now, I've been looking at the section of the spec pertaining to transactions in relation to these lifecycle callbacks, and my takeaway is that the container ought to support my usecase. My question to you, then, is this: is that indeed the intent behind section 4.8.3? If it is, is it possible that section 4.8.1 gives just a bit too much leeway to the implementation when it says:     The container must initialize all such startup-time singleton session beans before any external client requests (that is, client requests originating outside of the application) are delivered to any enterprise bean components in the application.To me, it's not entirely clear if my usecase and that but of text are at odds with one another. Is a transaction an "external client request"?
I could not find a test case in the source repository for this particular case. Is it left up to the interpretation of the implemented whether or not my case should be supported? 
Thanks for reading this far, and thanks in advance for taking the time to send me a reply! 
Stefan Zwanenburg