QueueTcpConnectionFactory.create("localhost", 16010);
javax.jms.TopicConnectionFactory tcf =
TopicTcpConnectionFactory.create("localhost", 16010);
Topic tOrders = Topic.create(0);
Queue qItems = Queue.create(0);
Queue qCheck = Queue.create(0);
Queue qChecked = Queue.create(0);
Queue qBills = Queue.create(0);
Queue qDelivery = Queue.create(0);
// Setting access permissions:
tOrders.setWriter(web);
tOrders.setReader(billing);
tOrders.setReader(inventory);
tOrders.setReader(customer);
qCheck.setWriter(billing);
qCheck.setReader(control);
qChecked.setWriter(control);
qChecked.setReader(billing);
qBills.setWriter(billing);
qBills.setReader(customer);
qItems.setWriter(inventory);
qItems.setReader(customer);
qDelivery.setWriter(customer);
qDelivery.setReader(delivery);
// Binding objects in JNDI:
javax.naming.Context jndiCtx = new javax.naming.InitialContext();
jndiCtx.bind("qcf", qcf);
jndiCtx.bind("tcf", tcf);