[jboss-jira] [JBoss JIRA] Commented: (JBASM-4) Server interface is missing some getters

Michael Musgrove (JIRA) jira-events at lists.jboss.org
Thu Jul 31 05:05:26 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBASM-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12423163#action_12423163 ] 

Michael Musgrove commented on JBASM-4:
--------------------------------------

It would be better for the getSysProperty call to return one of the properties set on the server via the addSysProperty(Property property) call, ie
    public String getSysProperty(String key)
    {
        for (Property property : sysProperties)
            if (key.equals(property.getKey()))
                return property.getValue();

        return null;
    }

The server knows what the naming context should be so I was expecting something like:
    public Context getNamingContext() throws NamingException
    {
        if (namingContext == null)
        {
            Properties properties = new Properties();

            properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, ("org.jboss.naming.NamingContextFactory"));
            properties.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
            properties.setProperty(Context.PROVIDER_URL, "jnp://"+ getHost() + ':' + getRmiPort());

            setNamingContext(new InitialContext(properties));
        }

        return namingContext;
    }


> Server interface is missing some getters
> ----------------------------------------
>
>                 Key: JBASM-4
>                 URL: https://jira.jboss.org/jira/browse/JBASM-4
>             Project: JBoss AS Server Manager
>          Issue Type: Feature Request
>    Affects Versions: 0.1.1.GA 
>            Reporter: Michael Musgrove
>            Assignee: Shelly McGowan
>         Attachments: Server.java
>
>
> JBossTM AS crash testing needs access to some of the Server object state. We need the following additions:
> public String getSysProperty(String key)
> public Integer getHttpPort()
> public Context getNamingContext() throws NamingException
> public void setNamingContext(Context namingContext) // in case the default is inadequate

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list