Payara Micro Embedded inject objects from outside

24 views
Skip to first unread message

Richard Simon

unread,
Apr 15, 2021, 6:43:30 PM4/15/21
to Payara Forum
Hello guys,

I have a question concerning Payara Micro Embedded. I have a Main class where I deloy a war programmatically like this

final PayaraMicroRuntime payaraRuntime = PayaraMicro.getInstance()
.addDeployment("my.war")
.setHttpPort(8000).bootStrap();

In the Main class I also create a complex object, let's call it Control.
Inside the "my.war" I want to @Inject this Control object.
Is there any possibility to hand over this complex object, which cannot be created inside the WAR from outside?

Thanks in advance!

Best Regards

Rich
Reply all
Reply to author
Forward
0 new messages