* @param relating
* xbType like Constants.RELATING_CLIENT
* @return
*/
public StorageId createStorageId(String relating) {
StorageId storageId = null;
if (getStorageIdStr() != null && getStorageIdStr().length() > 0) {
// client code forces a named client side storageId -
// dangerous if the name conflicts with server name in same DB
storageId = new StorageId(glob, serverNodeId, relating, getStorageIdStr());
} else {
if (getPublicSessionId() == 0) {
// having no public sessionId we need to generate a unique
// queue name
storageId = new StorageId(glob, serverNodeId, relating, getId() + System.currentTimeMillis()
+ Global.getCounter());
} else {
SessionName ses = getSessionName();
if (ses != null)
storageId = new StorageId(glob, serverNodeId, relating, ses);
else
storageId = new StorageId(glob, serverNodeId, relating, getId() + System.currentTimeMillis()
+ Global.getCounter());
}
}
return storageId;
}