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
Operations

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

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
javax.naming.InitialContext@d82990
>>> ctx.lookup("queue/A")
JBossQueue[A]
>>> ctx.close()

It is also available from the browser frame:

>>> ctx = browser.createContext("JBM")
>>> ctx.lookup("queue/A")
JBossQueue[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.