The external JNDI factory must implement the javax.naming.spi.InitialContextFactory interface.
Ensure that the server is running.
Remote subcommands require a running server.
Register an external JNDI resource by using the create-jndi-resource(1) subcommand.
Information on properties for the subcommand is contained in this help page.
Restart GlassFish Server.
See To Restart a Domain.
In This example sample_jndi_resource is registered.
asadmin> create-jndi-resource --jndilookupname sample_jndi --restype queue --factoryclass sampleClass --description "this is a sample jndi resource" sample_jndi_resource Command create-jndi-resource executed successfully
You can also view the full syntax and options of the subcommand by typing asadmin help create-jndi-resource at the command line.