Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
5 subscribers
Views
1931 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
As per Appian's best practices, unlike Functions and Servlets, the initial c
mayankk718
over 10 years ago
As per Appian's best practices, unlike Functions and Servlets, the initial context must not be initiated directly in Smart Services; it should only be acquired through injection. Why ?
OriginalPostID-144324
OriginalPostID-144324
Discussion posts and replies are publicly visible
0
sayedh
over 10 years ago
The documentation says that the context that is injected will have access to the entire JNDI tree while a new InitialContext() will not. From a best practice perspective, since your plugin is running as part of a container, then it makes sense to look to the container to provide the context.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mayankk718
over 10 years ago
Thanks Sayed. Just 1 more query. It should go same for expression functions as well, but the documentation tells us to follow the injection mechanism for smart service and not expression function. Any specific reasons ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sayedh
over 10 years ago
The documentation does not specify but I don't believe naming context will be injected into expression functions; only the services available as part of the public API can be injected to the expression functions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel