Difference in the overloaded createConnection() methods in javax.jms.ConnectionFactory
This is the first thing you do when you work with JMS — Get a connection.
ConnectionFactory factory = (ConnectionFactory)ic.lookup("MyConnectionFactory");
conn = factory.createConnection(); // You call either this
conn = factory.createConnection(userName, password); // or this.
But, what is this “username” and “password” in your connection, when you have already
logged into your application server and there are no provisions to use them in the configured ConnectionFactory either.
Every server has a default (active) security realm.
A security realm is a container that includes users, groups, security roles,
security policies, and security providers, that are used to protect WebLogic resources.
A realm can have one or more users and these users can belong to one or more groups.
WebLogic Server has the following groups:
* Administrators
* Deployers
* Operators
* Monitors
* App Testers
Your login information for the admin server console is managed in this default security realm.
The user who logs in to the server console is the default administrator. He belongs to the group
“Administrators”.
I have a scenario, wherein a wholesaler and retailer are going to make use of the JMS Server for interchanging
their messages on their sales deals.
Neither the wholesaler nor the retailer is the owner of the JMS Server.
They are just guests who make use of this USERNAME and PASSWORD, passed in the
factory.createConnection(userName, password) to create a connection to their destination(Topic/Queue).
This is a way in which clients are authorized to access their relevant destinations.
In other words, only those clients who are authorized can have access to the destinations.
Here is how you configure users and groups in the security realm of Weblogic 9.2




