[arquillian-issues] [JBoss JIRA] Updated: (ARQ-592) Bind CommandRunner to JNDI when GlassFish Embedded Container starts

Magnus Smith (JIRA) jira-events at lists.jboss.org
Tue Sep 13 11:28:26 EDT 2011


     [ https://issues.jboss.org/browse/ARQ-592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Magnus Smith updated ARQ-592:
-----------------------------

        Description: 
It would be really useful if the Glassfish CommandRunner could be bound to jndi when the embedded container is started.
 
Looks like it would just be a case of adding
{code:java|borderStyle=solid} 
CommandRunner commandRunner = glassfish.getCommandRunner();
new InitialContext().bind("org.glassfish.embeddable.CommandRunner", commandRunner);
{code} 
 
 
to the start method on the GlassfishContainer and then unbinding it on the stop method.
 
Then in the test class we could use
{code:java|borderStyle=solid} 
@Resource(mappedName = "org.glassfish.embeddable.CommandRunner")
CommandRunner commandRunner;
{code}
 
 
This would open up all the glassfish admin commands from test classes.

api [http://embedded-glassfish.java.net/nonav/apidocs/org/glassfish/embeddable/CommandRunner.html]
asadmin [http://download.oracle.com/docs/cd/E18930_01/html/821-2416/giobi.html#scrolltoc]

  was:
It would be really useful if the Glassfish CommandRunner could be bound to jndi when the embedded container is started.
 
Looks like it would just be a case of adding
{code:title=Bar.java|borderStyle=solid} 
CommandRunner commandRunner = glassfish.getCommandRunner();
new InitialContext().bind("org.glassfish.embeddable.CommandRunner", commandRunner);
{code} 
 
 
to the start method on the GlassfishContainer and then unbinding it on the stop method.
 
Then in the test class we could use
{code:title=Bar.java|borderStyle=solid} 
@Resource(mappedName = "org.glassfish.embeddable.CommandRunner")
CommandRunner commandRunner;
{code}
 
 
This would open up all the glassfish admin commands from test classes.

api [http://embedded-glassfish.java.net/nonav/apidocs/org/glassfish/embeddable/CommandRunner.html]
asadmin [http://download.oracle.com/docs/cd/E18930_01/html/821-2416/giobi.html#scrolltoc]

    Forum Reference: http://community.jboss.org/thread/172221?tstart=0  (was: http://community.jboss.org/thread/172221?tstart=0)


> Bind CommandRunner to JNDI when GlassFish Embedded Container starts
> -------------------------------------------------------------------
>
>                 Key: ARQ-592
>                 URL: https://issues.jboss.org/browse/ARQ-592
>             Project: Arquillian
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>            Reporter: Magnus Smith
>
> It would be really useful if the Glassfish CommandRunner could be bound to jndi when the embedded container is started.
>  
> Looks like it would just be a case of adding
> {code:java|borderStyle=solid} 
> CommandRunner commandRunner = glassfish.getCommandRunner();
> new InitialContext().bind("org.glassfish.embeddable.CommandRunner", commandRunner);
> {code} 
>  
>  
> to the start method on the GlassfishContainer and then unbinding it on the stop method.
>  
> Then in the test class we could use
> {code:java|borderStyle=solid} 
> @Resource(mappedName = "org.glassfish.embeddable.CommandRunner")
> CommandRunner commandRunner;
> {code}
>  
>  
> This would open up all the glassfish admin commands from test classes.
> api [http://embedded-glassfish.java.net/nonav/apidocs/org/glassfish/embeddable/CommandRunner.html]
> asadmin [http://download.oracle.com/docs/cd/E18930_01/html/821-2416/giobi.html#scrolltoc]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list