History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: HJMS-63
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Colin Crist
Reporter: Colin Crist
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Provide a Hermes.createContext() call

Created: 10/Jan/08 05:07 AM   Updated: 10/Jan/08 05:45 AM
Component/s: GUI
Affects Version/s: 1.12
Fix Version/s: 1.13

Environment: All

 Description  « Hide
Hermes.createContext() is useful to give python and plugin users easier access to the JNDI context configured in Hermes.

 All   Comments   Change History      Sort Order:
Colin Crist [10/Jan/08 05:34 AM]

The context is available from the Hermes bean:

>>> hermes = browser.getContext().lookup("JBM")
>>> ctx = hermes.createContext()
>>> ctx
>>> ctx.lookup("queue/A")
>>> ctx.close()

It is also available from the browser frame:

>>> ctx = browser.createContext("JBM")
>>> ctx.lookup("queue/A")
>>> ctx.close()

Colin Crist [10/Jan/08 05:45 AM]
Note that when creating the context from the browser frame, it is the context named in the browser tree that gets created and has nothing to do with any Hermes sessions of the same name.