[JBoss JIRA] (AS7-1338) Remote JNDI support for AS7
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/AS7-1338?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak commented on AS7-1338:
-------------------------------------
Hi all,
I'm just adding some brief info from John about newly implemented remote jndi support and how to use it. As I understood everything what should be reachable in jndi from outside the server must be registered under "java:jboss/exported/" context.
As an example I used it in standalone jms client to get connection factory and queue from jndi:
{code}
// jms client code
// initialize context
final Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
Context context = new InitialContext(env);
// do lookups
ConnectionFactory cf = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
Queue queue = (Queue) context.lookup("jms/queue/test");
// do whatever you want
{code}
How are jms objects registered to jndi in messaging subsystem in standalone-ha.xml:
{code}
<jms-connection-factories>
...
<!-- configuration for connection factory -->
<connection-factory name="RemoteConnectionFactory">
<connectors>
<connector-ref connector-name="netty"/>
</connectors>
<entries>
<entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> <!- this is the important part -->
</entries>
</connection-factory>
...
</jms-connection-factories>
<jms-destinations>
...
<jms-queue name="testQueue">
<entry name="java:jboss/exported/jms/queue/test"/> <!- this is the important part -->
</jms-queue>
...
</jms-destinations>
{code}
Used libraries (in my simple client):
hornetq-core-2.2.11.Final.jar
hornetq-jms-2.2.11.Final.jar
jboss-as-naming-7.1.0.Final-SNAPSHOT.jar
jboss-jms-api_1.1_spec-1.0.0.Final.jar
jboss-logging-3.1.0.GA.jar
jboss-marshalling-1.3.6.GA.jar
jboss-marshalling-river-1.3.6.GA.jar
jboss-modules.jar
jboss-msc-1.0.2.GA.jar
jboss-remote-naming-1.0.0.Beta4.jar
jboss-remoting-3.2.0.CR9.jar
jboss-sasl-1.0.0.Beta9.jar
netty-3.2.6.Final.jar
xnio-api-3.0.0.GA.jar
xnio-nio-3.0.0.GA.jar
Note:
I had to add static block to my class so I could connect to server through remoting:
{code}
static {
Security.addProvider(new JBossSaslProvider());
}
{code}
Hopefully I didn't forget anything and this info will help.
Thanks for this cool feature,
Mirek
> Remote JNDI support for AS7
> ---------------------------
>
> Key: AS7-1338
> URL: https://issues.jboss.org/browse/AS7-1338
> Project: Application Server 7
> Issue Type: Task
> Components: Naming
> Reporter: Richard Opalka
> Assignee: John Bailey
> Priority: Critical
> Labels: eap6_prd_req
> Fix For: 7.1.0.Final
>
>
> Add support for remote JNDI after all. It was agreed that:
> * Remote JNDI would run over Remoting
> * Remote JNDI for EJB is strictly a legacy access protocol, deprecated in favor of "ejb:"
> * The Remote JNDI service would proxy to a specific Context of the server JNDI tree - maybe "java:jboss/shared", maybe something else
> * Server-side services would opt-in to Remote JNDI; initially we'd only support:
> ** Remote EJB interfaces
> ** HornetQ connection factories
> * In the future we may support:
> ** User bindings, so long as they're serializable
> * In the future we will never support:
> ** Proxied DataSources
> ** Proxied JMS invocations
> Initial project tree is at https://github.com/dmlloyd/jboss-remote-jndi for now.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[JBoss JIRA] (AS7-3462) Server instances in domain aren't running with '-server' argument out-of-the-box
by Rostislav Svoboda (JIRA)
Rostislav Svoboda created AS7-3462:
--------------------------------------
Summary: Server instances in domain aren't running with '-server' argument out-of-the-box
Key: AS7-3462
URL: https://issues.jboss.org/browse/AS7-3462
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Reporter: Rostislav Svoboda
Assignee: Brian Stansberry
Fix For: 7.1.0.Final
AS7-2491 fixed '-server' issue for PC and HC but server instances in domain aren't running with '-server' argument out-of-the-box. For standalone it's running out-of-the-box.
Please develop functionality to add '-server' argument automatically (if JVM enables that) during server instances initialization.
Currently user is forced to edit host.xml, section 'jvms':
{code}
<jvm name="default">
<heap size="64m" max-size="256m"/>
<permgen size="256m" max-size="256m"/>
<jvm-options>
<option value="-server"/>
</jvm-options>
</jvm>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[JBoss JIRA] (AS7-3540) jboss-cli --gui gives NPE
by Max Rydahl Andersen (JIRA)
Max Rydahl Andersen created AS7-3540:
----------------------------------------
Summary: jboss-cli --gui gives NPE
Key: AS7-3540
URL: https://issues.jboss.org/browse/AS7-3540
Project: Application Server 7
Issue Type: Bug
Components: CLI
Affects Versions: 7.1.0.Final
Reporter: Max Rydahl Andersen
Assignee: Alexey Loubyansky
Fix For: 7.1.0.Final
{code}
[max@greybeard ../jboss-as-7.1.0.Final-SNAPSHOT]$ bin/jboss-cli.sh --gui
java.lang.NullPointerException
at org.jboss.as.cli.gui.CommandExecutor.doCommand(CommandExecutor.java:52)
at org.jboss.as.cli.gui.ManagementModelNode.explore(ManagementModelNode.java:66)
at org.jboss.as.cli.gui.ManagementModel.makeTree(ManagementModel.java:57)
at org.jboss.as.cli.gui.ManagementModel.<init>(ManagementModel.java:52)
at org.jboss.as.cli.gui.GuiMain.makeTabbedPane(GuiMain.java:125)
at org.jboss.as.cli.gui.GuiMain.initJFrame(GuiMain.java:112)
at org.jboss.as.cli.gui.GuiMain.start(GuiMain.java:67)
at org.jboss.as.cli.impl.CliLauncher.processGui(CliLauncher.java:222)
at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:182)
at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:288)
{code}
Any operations I do is showing "null"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months