Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
joram
joram
Commits
4bf3fe04
Commit
4bf3fe04
authored
Aug 18, 2005
by
afreyssin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixe: cnxPendingTimer is not stored in JNDI Reference.
parent
a701672e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
29 deletions
+40
-29
joram/src/org/objectweb/joram/client/jms/ConnectionFactory.java
...src/org/objectweb/joram/client/jms/ConnectionFactory.java
+10
-17
joram/src/org/objectweb/joram/client/jms/XAConnectionFactory.java
...c/org/objectweb/joram/client/jms/XAConnectionFactory.java
+12
-12
joram/src/org/objectweb/joram/client/jms/admin/ObjectFactory.java
...c/org/objectweb/joram/client/jms/admin/ObjectFactory.java
+18
-0
No files found.
joram/src/org/objectweb/joram/client/jms/ConnectionFactory.java
View file @
4bf3fe04
...
...
@@ -41,7 +41,6 @@ public abstract class ConnectionFactory
/** Object containing the factory's parameters. */
protected
FactoryParameters
params
;
/**
* Constructs a <code>ConnectionFactory</code> dedicated to a given server.
*
...
...
@@ -60,17 +59,14 @@ public abstract class ConnectionFactory
/**
* Constructs an empty <code>ConnectionFactory</code>.
*/
public
ConnectionFactory
()
{}
public
ConnectionFactory
()
{}
/** Returns a string view of the connection factory. */
public
String
toString
()
{
public
String
toString
()
{
return
"CF:"
+
params
.
getHost
()
+
"-"
+
params
.
getPort
();
}
/**
* API method, implemented according to the communication protocol.
*
...
...
@@ -93,27 +89,24 @@ public abstract class ConnectionFactory
return
createConnection
(
"anonymous"
,
"anonymous"
);
}
/** Returns the factory's configuration parameters. */
public
FactoryParameters
getParameters
()
{
public
FactoryParameters
getParameters
()
{
return
params
;
}
/** Sets the naming reference of a connection factory. */
public
Reference
getReference
()
throws
NamingException
{
Reference
ref
=
super
.
getReference
();
ref
.
add
(
new
StringRefAddr
(
"cFactory.host"
,
params
.
getHost
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.port"
,
(
new
Integer
(
params
.
getPort
())
)
.
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.cnxT"
,
(
new
Integer
(
params
.
connectingTimer
)).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.
tx
T"
,
(
new
Integer
(
params
.
t
xPendingTimer
)
)
.
toString
()));
new
Integer
(
params
.
getPort
()).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.cnxT"
,
new
Integer
(
params
.
connectingTimer
).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.txT"
,
new
Integer
(
params
.
txPendingTimer
).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.
cnxP
T"
,
new
Integer
(
params
.
cn
xPendingTimer
).
toString
()));
return
ref
;
}
...
...
joram/src/org/objectweb/joram/client/jms/XAConnectionFactory.java
View file @
4bf3fe04
...
...
@@ -58,12 +58,10 @@ public abstract class XAConnectionFactory
}
/** Returns a string view of the connection factory. */
public
String
toString
()
{
public
String
toString
()
{
return
"XACF:"
+
params
.
getHost
()
+
"-"
+
params
.
getPort
();
}
/**
* API method, implemented according to the communication protocol.
*
...
...
@@ -86,11 +84,8 @@ public abstract class XAConnectionFactory
return
createXAConnection
(
"anonymous"
,
"anonymous"
);
}
/**
* Returns the factory's configuration parameters.
*/
public
FactoryParameters
getParameters
()
{
/** Returns the factory's configuration parameters. */
public
FactoryParameters
getParameters
()
{
return
params
;
}
...
...
@@ -100,10 +95,13 @@ public abstract class XAConnectionFactory
Reference
ref
=
super
.
getReference
();
ref
.
add
(
new
StringRefAddr
(
"cFactory.host"
,
params
.
getHost
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.port"
,
(
new
Integer
(
params
.
getPort
())).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.cnxT"
,
(
new
Integer
(
params
.
connectingTimer
)).
toString
()));
new
Integer
(
params
.
getPort
()).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.cnxT"
,
new
Integer
(
params
.
connectingTimer
).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.txT"
,
new
Integer
(
params
.
txPendingTimer
).
toString
()));
ref
.
add
(
new
StringRefAddr
(
"cFactory.cnxPT"
,
new
Integer
(
params
.
cnxPendingTimer
).
toString
()));
return
ref
;
}
...
...
@@ -116,6 +114,8 @@ public abstract class XAConnectionFactory
h
.
put
(
"host"
,
params
.
getHost
());
h
.
put
(
"port"
,
new
Integer
(
params
.
getPort
()));
h
.
put
(
"connectingTimer"
,
new
Integer
(
params
.
connectingTimer
));
h
.
put
(
"txPendingTimer"
,
new
Integer
(
params
.
txPendingTimer
));
h
.
put
(
"cnxPendingTimer"
,
new
Integer
(
params
.
cnxPendingTimer
));
return
h
;
}
...
...
joram/src/org/objectweb/joram/client/jms/admin/ObjectFactory.java
View file @
4bf3fe04
...
...
@@ -131,11 +131,13 @@ public class ObjectFactory implements javax.naming.spi.ObjectFactory
String
port
=
(
String
)
ref
.
get
(
"cFactory.port"
).
getContent
();
String
cnxTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxT"
).
getContent
();
String
txTimer
=
(
String
)
ref
.
get
(
"cFactory.txT"
).
getContent
();
String
cnxPendingTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxPT"
).
getContent
();
ConnectionFactory
cnxFact
=
new
TcpConnectionFactory
(
host
,
(
new
Integer
(
port
)).
intValue
());
FactoryParameters
params
=
cnxFact
.
getParameters
();
params
.
connectingTimer
=
(
new
Integer
(
cnxTimer
)).
intValue
();
params
.
txPendingTimer
=
(
new
Integer
(
txTimer
)).
intValue
();
params
.
cnxPendingTimer
=
(
new
Integer
(
cnxPendingTimer
)).
intValue
();
return
cnxFact
;
}
else
if
(
ref
.
getClassName
().
equals
(
tcpQCF
))
{
...
...
@@ -143,11 +145,13 @@ public class ObjectFactory implements javax.naming.spi.ObjectFactory
String
port
=
(
String
)
ref
.
get
(
"cFactory.port"
).
getContent
();
String
cnxTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxT"
).
getContent
();
String
txTimer
=
(
String
)
ref
.
get
(
"cFactory.txT"
).
getContent
();
String
cnxPendingTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxPT"
).
getContent
();
QueueConnectionFactory
cnxFact
=
new
QueueTcpConnectionFactory
(
host
,
(
new
Integer
(
port
)).
intValue
());
FactoryParameters
params
=
cnxFact
.
getParameters
();
params
.
connectingTimer
=
(
new
Integer
(
cnxTimer
)).
intValue
();
params
.
txPendingTimer
=
(
new
Integer
(
txTimer
)).
intValue
();
params
.
cnxPendingTimer
=
(
new
Integer
(
cnxPendingTimer
)).
intValue
();
return
cnxFact
;
}
else
if
(
ref
.
getClassName
().
equals
(
tcpTCF
))
{
...
...
@@ -155,41 +159,55 @@ public class ObjectFactory implements javax.naming.spi.ObjectFactory
String
port
=
(
String
)
ref
.
get
(
"cFactory.port"
).
getContent
();
String
cnxTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxT"
).
getContent
();
String
txTimer
=
(
String
)
ref
.
get
(
"cFactory.txT"
).
getContent
();
String
cnxPendingTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxPT"
).
getContent
();
TopicConnectionFactory
cnxFact
=
new
TopicTcpConnectionFactory
(
host
,
(
new
Integer
(
port
)).
intValue
());
FactoryParameters
params
=
cnxFact
.
getParameters
();
params
.
connectingTimer
=
(
new
Integer
(
cnxTimer
)).
intValue
();
params
.
txPendingTimer
=
(
new
Integer
(
txTimer
)).
intValue
();
params
.
cnxPendingTimer
=
(
new
Integer
(
cnxPendingTimer
)).
intValue
();
return
cnxFact
;
}
else
if
(
ref
.
getClassName
().
equals
(
tcpXACF
))
{
String
host
=
(
String
)
ref
.
get
(
"cFactory.host"
).
getContent
();
String
port
=
(
String
)
ref
.
get
(
"cFactory.port"
).
getContent
();
String
cnxTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxT"
).
getContent
();
String
txTimer
=
(
String
)
ref
.
get
(
"cFactory.txT"
).
getContent
();
String
cnxPendingTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxPT"
).
getContent
();
XAConnectionFactory
cnxFact
=
new
XATcpConnectionFactory
(
host
,
(
new
Integer
(
port
)).
intValue
());
FactoryParameters
params
=
cnxFact
.
getParameters
();
params
.
connectingTimer
=
(
new
Integer
(
cnxTimer
)).
intValue
();
params
.
txPendingTimer
=
(
new
Integer
(
txTimer
)).
intValue
();
params
.
cnxPendingTimer
=
(
new
Integer
(
cnxPendingTimer
)).
intValue
();
return
cnxFact
;
}
else
if
(
ref
.
getClassName
().
equals
(
tcpXAQCF
))
{
String
host
=
(
String
)
ref
.
get
(
"cFactory.host"
).
getContent
();
String
port
=
(
String
)
ref
.
get
(
"cFactory.port"
).
getContent
();
String
cnxTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxT"
).
getContent
();
String
txTimer
=
(
String
)
ref
.
get
(
"cFactory.txT"
).
getContent
();
String
cnxPendingTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxPT"
).
getContent
();
XAQueueConnectionFactory
cnxFact
=
new
XAQueueTcpConnectionFactory
(
host
,
(
new
Integer
(
port
)).
intValue
());
FactoryParameters
params
=
cnxFact
.
getParameters
();
params
.
connectingTimer
=
(
new
Integer
(
cnxTimer
)).
intValue
();
params
.
txPendingTimer
=
(
new
Integer
(
txTimer
)).
intValue
();
params
.
cnxPendingTimer
=
(
new
Integer
(
cnxPendingTimer
)).
intValue
();
return
cnxFact
;
}
else
if
(
ref
.
getClassName
().
equals
(
tcpXATCF
))
{
String
host
=
(
String
)
ref
.
get
(
"cFactory.host"
).
getContent
();
String
port
=
(
String
)
ref
.
get
(
"cFactory.port"
).
getContent
();
String
cnxTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxT"
).
getContent
();
String
txTimer
=
(
String
)
ref
.
get
(
"cFactory.txT"
).
getContent
();
String
cnxPendingTimer
=
(
String
)
ref
.
get
(
"cFactory.cnxPT"
).
getContent
();
XATopicConnectionFactory
cnxFact
=
new
XATopicTcpConnectionFactory
(
host
,
(
new
Integer
(
port
)).
intValue
());
FactoryParameters
params
=
cnxFact
.
getParameters
();
params
.
connectingTimer
=
(
new
Integer
(
cnxTimer
)).
intValue
();
params
.
txPendingTimer
=
(
new
Integer
(
txTimer
)).
intValue
();
params
.
cnxPendingTimer
=
(
new
Integer
(
cnxPendingTimer
)).
intValue
();
return
cnxFact
;
}
else
if
(
ref
.
getClassName
().
equals
(
localCF
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment