Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
joram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joram
joram
Commits
bcbcfa4f
Commit
bcbcfa4f
authored
May 24, 2019
by
Andre Freyssinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes.
parent
9aa719e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
54 deletions
+35
-54
joram/joram/client/jca/src/main/java/org/objectweb/joram/client/connector/ManagedConnectionFactoryImpl.java
.../joram/client/connector/ManagedConnectionFactoryImpl.java
+11
-11
joram/joram/client/jca/src/main/java/org/objectweb/joram/client/connector/OutboundConnectionFactory.java
...web/joram/client/connector/OutboundConnectionFactory.java
+4
-7
joram/joram/client/jca/src/main/java/org/objectweb/joram/client/connector/OutboundSession.java
...org/objectweb/joram/client/connector/OutboundSession.java
+2
-2
joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/XAConnection.java
...ain/java/org/objectweb/joram/client/jms/XAConnection.java
+2
-3
joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/XAResource.java
.../main/java/org/objectweb/joram/client/jms/XAResource.java
+16
-31
No files found.
joram/joram/client/jca/src/main/java/org/objectweb/joram/client/connector/ManagedConnectionFactoryImpl.java
View file @
bcbcfa4f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2004 - 201
2
ScalAgent Distributed Technologies
* Copyright (C) 2004 - 201
9
ScalAgent Distributed Technologies
* Copyright (C) 2004 - 2006 Bull SA
*
* This library is free software; you can redistribute it and/or
...
...
@@ -210,8 +210,7 @@ public class ManagedConnectionFactoryImpl extends ManagedConnectionFactoryConfig
if
(!
(
cxRequest
instanceof
ConnectionRequest
))
{
if
(
out
!=
null
)
out
.
print
(
"Provided ConnectionRequestInfo instance is not a JORAM object."
);
throw
new
ResourceException
(
"Provided ConnectionRequestInfo instance "
+
"is not a JORAM object."
);
throw
new
ResourceException
(
"Provided ConnectionRequestInfo instance is not a JORAM object."
);
}
userName
=
((
ConnectionRequest
)
cxRequest
).
getUserName
();
...
...
@@ -260,8 +259,7 @@ public class ManagedConnectionFactoryImpl extends ManagedConnectionFactoryConfig
public
final
ManagedConnection
matchManagedConnections
(
Set
connectionSet
,
Subject
subject
,
ConnectionRequestInfo
cxRequest
)
throws
ResourceException
{
ConnectionRequestInfo
cxRequest
)
throws
ResourceException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" matchManagedConnections("
+
connectionSet
+
", "
+
subject
+
", "
+
cxRequest
+
")"
);
...
...
@@ -275,8 +273,7 @@ public class ManagedConnectionFactoryImpl extends ManagedConnectionFactoryConfig
else
{
if
(!
(
cxRequest
instanceof
ConnectionRequest
))
{
out
.
print
(
"Provided ConnectionRequestInfo instance is not a JORAM object."
);
throw
new
ResourceException
(
"Provided ConnectionRequestInfo instance "
+
"is not a JORAM object."
);
throw
new
ResourceException
(
"Provided ConnectionRequestInfo instance is not a JORAM object."
);
}
if
(
cxRequest
instanceof
QueueConnectionRequest
)
...
...
@@ -296,7 +293,8 @@ public class ManagedConnectionFactoryImpl extends ManagedConnectionFactoryConfig
int
serverPort
=
getServerPort
();
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" hostName = "
+
hostName
+
", serverPort = "
+
serverPort
);
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" hostName = "
+
hostName
+
", serverPort = "
+
serverPort
);
if
(
isCollocated
())
{
hostName
=
"localhost"
;
serverPort
=
-
1
;
...
...
@@ -306,14 +304,16 @@ public class ManagedConnectionFactoryImpl extends ManagedConnectionFactoryConfig
try
{
managedCx
=
(
ManagedConnectionImpl
)
it
.
next
();
matching
=
managedCx
.
matches
(
hostName
,
serverPort
,
userName
,
mode
);
}
catch
(
ClassCastException
exc
)
{
}
catch
(
ClassCastException
exc
)
{
logger
.
log
(
BasicLevel
.
WARN
,
this
+
" matchManagedConnections managedCx = "
+
managedCx
,
exc
);
}
}
if
(
matching
)
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" matchManagedConnections managedCx = "
+
managedCx
);
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" matchManagedConnections managedCx = "
+
managedCx
);
managedCx
.
setLogWriter
(
out
);
return
managedCx
;
}
...
...
joram/joram/client/jca/src/main/java/org/objectweb/joram/client/connector/OutboundConnectionFactory.java
View file @
bcbcfa4f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2004 - 201
6
ScalAgent Distributed Technologies
* Copyright (C) 2004 - 201
9
ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
*
* This library is free software; you can redistribute it and/or
...
...
@@ -90,8 +90,7 @@ public class OutboundConnectionFactory implements javax.jms.ConnectionFactory,
* is not reachable.
* @exception JMSException Generic exception.
*/
public
javax
.
jms
.
Connection
createConnection
()
throws
JMSException
{
public
javax
.
jms
.
Connection
createConnection
()
throws
JMSException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" createConnection()"
);
...
...
@@ -108,12 +107,10 @@ public class OutboundConnectionFactory implements javax.jms.ConnectionFactory,
* @exception JMSException Generic exception.
*/
public
javax
.
jms
.
Connection
createConnection
(
String
userName
,
String
password
)
throws
JMSException
{
createConnection
(
String
userName
,
String
password
)
throws
JMSException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" createConnection("
+
userName
+
", "
+
password
+
")"
);
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
" createConnection("
+
userName
+
", "
+
password
+
")"
);
try
{
ConnectionRequest
cxRequest
=
null
;
...
...
joram/joram/client/jca/src/main/java/org/objectweb/joram/client/connector/OutboundSession.java
View file @
bcbcfa4f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 - 201
3
ScalAgent Distributed Technologies
* Copyright (C) 2012 - 201
9
ScalAgent Distributed Technologies
* Copyright (C) 2004 - Bull SA
*
* This library is free software; you can redistribute it and/or
...
...
@@ -425,7 +425,7 @@ public class OutboundSession implements javax.jms.Session {
/*
* This session is shared by all the outbound sessions.
* This session will be closed on outboud connection close.
* This session will be closed on outbou
n
d connection close.
*/
sess
=
null
;
}
...
...
joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/XAConnection.java
View file @
bcbcfa4f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 201
2
ScalAgent Distributed Technologies
* Copyright (C) 2001 - 201
9
ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
* Copyright (C) 1996 - 2000 Dyade
*
...
...
@@ -36,8 +36,7 @@ import javax.jms.JMSException;
* programs are strongly encouraged to use the transactional support available
* in their environment, rather than use these XA interfaces directly.
*/
public
class
XAConnection
extends
Connection
implements
javax
.
jms
.
XAConnection
{
public
class
XAConnection
extends
Connection
implements
javax
.
jms
.
XAConnection
{
/** Resource manager instance. */
private
XAResourceMngr
rm
;
...
...
joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/XAResource.java
View file @
bcbcfa4f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 20
08
ScalAgent Distributed Technologies
* Copyright (C) 2001 - 20
19
ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
* Copyright (C) 1996 - 2000 Dyade
*
...
...
@@ -69,15 +69,13 @@ public class XAResource implements javax.transaction.xa.XAResource {
* transaction, or if the RM fails to enlist the
* resource.
*/
public
void
start
(
Xid
xid
,
int
flag
)
throws
XAException
{
public
void
start
(
Xid
xid
,
int
flag
)
throws
XAException
{
if
(
enlisted
)
throw
new
XAException
(
"Resource already enlisted."
);
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
": start("
+
xid
+
", "
+
flag
+
")"
);
this
+
": start("
+
xid
+
", "
+
flag
+
")"
);
rm
.
start
(
xid
,
flag
,
sess
);
...
...
@@ -92,16 +90,13 @@ public class XAResource implements javax.transaction.xa.XAResource {
* transaction, or if the RM fails to delist the
* resource.
*/
public
void
end
(
Xid
xid
,
int
flag
)
throws
XAException
{
public
void
end
(
Xid
xid
,
int
flag
)
throws
XAException
{
if
(!
enlisted
||
!
xid
.
equals
(
currentXid
))
throw
new
XAException
(
"Resource is not enlisted in specified"
+
" transaction."
);
throw
new
XAException
(
"Resource is not enlisted in specified transaction."
);
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
": end("
+
xid
+
", "
+
flag
+
")"
);
this
+
": end("
+
xid
+
", "
+
flag
+
")"
);
rm
.
end
(
xid
,
flag
,
sess
);
...
...
@@ -114,8 +109,7 @@ public class XAResource implements javax.transaction.xa.XAResource {
*
* @exception XAException If the RM fails to prepare the resource.
*/
public
int
prepare
(
Xid
xid
)
throws
XAException
{
public
int
prepare
(
Xid
xid
)
throws
XAException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
...
...
@@ -148,9 +142,7 @@ public class XAResource implements javax.transaction.xa.XAResource {
*
* @exception XAException If the RM fails to roll the resource back.
*/
public
void
rollback
(
Xid
xid
)
throws
XAException
{
public
void
rollback
(
Xid
xid
)
throws
XAException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
": rollback("
+
xid
+
")"
);
...
...
@@ -178,40 +170,35 @@ public class XAResource implements javax.transaction.xa.XAResource {
*
* @exception XAException Always thrown.
*/
public
void
forget
(
Xid
xid
)
throws
XAException
{
public
void
forget
(
Xid
xid
)
throws
XAException
{
throw
new
XAException
(
"Non implemented method."
);
}
/**
* Returns <code>false</code> as timeout feaure is not supported.
* Returns <code>false</code> as timeout fea
t
ure is not supported.
*
* @exception XAException Never thrown.
*/
public
boolean
setTransactionTimeout
(
int
seconds
)
throws
XAException
{
public
boolean
setTransactionTimeout
(
int
seconds
)
throws
XAException
{
return
false
;
}
/**
* Returns 0 as timeout feaure is not supported.
* Returns 0 as timeout fea
t
ure is not supported.
*
* @exception XAException Never thrown.
*/
public
int
getTransactionTimeout
()
throws
XAException
{
public
int
getTransactionTimeout
()
throws
XAException
{
return
0
;
}
/**
* Checks
wether
this resource shares the same resource manager
* Checks
if
this resource shares the same resource manager
* (XAConnection) with an other resource.
*
* @exception XAException Never thrown.
*/
public
boolean
isSameRM
(
javax
.
transaction
.
xa
.
XAResource
o
)
throws
XAException
{
public
boolean
isSameRM
(
javax
.
transaction
.
xa
.
XAResource
o
)
throws
XAException
{
if
(!
(
o
instanceof
org
.
objectweb
.
joram
.
client
.
jms
.
XAResource
))
return
false
;
...
...
@@ -219,9 +206,7 @@ public class XAResource implements javax.transaction.xa.XAResource {
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
this
+
": isSameRM other.rm = "
+
other
.
rm
+
", this.rm = "
+
this
.
rm
+
", equals = "
+
this
.
rm
.
equals
(
other
.
rm
));
this
+
": isSameRM other.rm = "
+
other
.
rm
+
", this.rm = "
+
this
.
rm
+
", equals = "
+
this
.
rm
.
equals
(
other
.
rm
));
return
this
.
rm
.
equals
(
other
.
rm
);
}
...
...
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