faa-swim / jms-client

Provides a very basic JMS Client that simplifies connecting and consuming from FAA SWIM.
Apache License 2.0
9 stars 2 forks source link

Appropriate setup and value for "Initial_Context_Factory_Class" #2

Open BlueCloudDev opened 2 years ago

BlueCloudDev commented 2 years ago

Assuming I have no idea what JNDI is, how can I run this example client? The example fails because I can't seem to supply the right packages and value for this property.

solidity-software commented 1 year ago

In the context of Java Message Service (JMS), the JNDI (Java Naming and Directory Interface) context factory is a component responsible for creating and managing the initial context required for JMS operations. JMS uses JNDI to look up and retrieve the necessary resources, such as connection factories and destinations, for sending and receiving messages.

The JNDI context factory class is specific to the JMS provider you are using. It provides an implementation of the javax.naming.spi.InitialContextFactory interface, which is responsible for creating the initial context.

When working with JMS, you typically need to configure the JNDI context factory class as part of your application's configuration. The specific class name and configuration details depend on the JMS provider you are using.

SWIM and SCDS currently uses Solace as their JMS solution. So to configure the client for connecting to SWIM you need to set the JNDI Context Factory to "com.solacesystems.jndi.SolJNDIInitialContextFactory" (https://docs.solace.com/API/Solace-JMS-API/Initial-Context-Property.htm).