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
c78bd2c4
Commit
c78bd2c4
authored
Oct 04, 2017
by
afreyssin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential synchronization issues.
parent
cfafcb19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
joram/joram/tools/rest/jms/src/main/java/org/objectweb/joram/tools/rest/jms/JndiService.java
.../java/org/objectweb/joram/tools/rest/jms/JndiService.java
+8
-7
No files found.
joram/joram/tools/rest/jms/src/main/java/org/objectweb/joram/tools/rest/jms/JndiService.java
View file @
c78bd2c4
...
@@ -117,7 +117,7 @@ public class JndiService {
...
@@ -117,7 +117,7 @@ public class JndiService {
@HEAD
@HEAD
@Path
(
"/{destName}"
)
@Path
(
"/{destName}"
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
public
Response
lookupDestination
(
public
synchronized
Response
lookupDestination
(
@Context
HttpHeaders
headers
,
@Context
HttpHeaders
headers
,
@PathParam
(
"destName"
)
String
destName
,
@PathParam
(
"destName"
)
String
destName
,
@Context
UriInfo
uriInfo
)
{
@Context
UriInfo
uriInfo
)
{
...
@@ -190,7 +190,7 @@ public class JndiService {
...
@@ -190,7 +190,7 @@ public class JndiService {
@Path
(
"/{destName}/"
+
JmsService
.
JMS_CREATE_PROD
)
@Path
(
"/{destName}/"
+
JmsService
.
JMS_CREATE_PROD
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
@Consumes
(
MediaType
.
TEXT_PLAIN
)
@Consumes
(
MediaType
.
TEXT_PLAIN
)
public
Response
createProducer
(
public
synchronized
Response
createProducer
(
@Context
HttpHeaders
headers
,
@Context
HttpHeaders
headers
,
@PathParam
(
"destName"
)
String
destName
,
@PathParam
(
"destName"
)
String
destName
,
@QueryParam
(
"client-id"
)
String
clientID
,
@QueryParam
(
"client-id"
)
String
clientID
,
...
@@ -270,7 +270,7 @@ public class JndiService {
...
@@ -270,7 +270,7 @@ public class JndiService {
@POST
@POST
@Path
(
"/{destName}/"
+
JmsService
.
JMS_CREATE_CONS
)
@Path
(
"/{destName}/"
+
JmsService
.
JMS_CREATE_CONS
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
public
Response
createConsumer
(
public
synchronized
Response
createConsumer
(
@Context
HttpHeaders
headers
,
@Context
HttpHeaders
headers
,
@PathParam
(
"destName"
)
String
destName
,
@PathParam
(
"destName"
)
String
destName
,
@QueryParam
(
"client-id"
)
String
clientID
,
@QueryParam
(
"client-id"
)
String
clientID
,
...
@@ -296,7 +296,6 @@ public class JndiService {
...
@@ -296,7 +296,6 @@ public class JndiService {
Response
.
ResponseBuilder
builder
=
null
;
Response
.
ResponseBuilder
builder
=
null
;
try
{
try
{
String
consId
=
null
;
String
consId
=
null
;
try
{
try
{
// lookup the destination
// lookup the destination
...
@@ -351,7 +350,7 @@ public class JndiService {
...
@@ -351,7 +350,7 @@ public class JndiService {
@Path
(
"/{name}"
)
@Path
(
"/{name}"
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
@Produces
(
MediaType
.
TEXT_PLAIN
)
@Consumes
(
MediaType
.
TEXT_PLAIN
)
@Consumes
(
MediaType
.
TEXT_PLAIN
)
public
Response
closeSessionCtx
(
public
synchronized
Response
closeSessionCtx
(
@Context
HttpHeaders
headers
,
@Context
HttpHeaders
headers
,
@PathParam
(
"name"
)
String
ctxName
,
@PathParam
(
"name"
)
String
ctxName
,
@Context
UriInfo
uriInfo
)
{
@Context
UriInfo
uriInfo
)
{
...
@@ -384,11 +383,13 @@ public class JndiService {
...
@@ -384,11 +383,13 @@ public class JndiService {
builder
=
Response
.
status
(
Response
.
Status
.
OK
);
builder
=
Response
.
status
(
Response
.
Status
.
OK
);
// link jndi
// link jndi
UriBuilder
nextBuilder
=
UriBuilder
.
fromUri
(
uriInfo
.
getBaseUri
()).
path
(
JNDI
);
//TODO
UriBuilder
nextBuilder
=
UriBuilder
.
fromUri
(
uriInfo
.
getBaseUri
()).
path
(
JNDI
);
// TODO: Adds more links?
builder
.
link
(
nextBuilder
.
build
(),
JNDI
);
builder
.
link
(
nextBuilder
.
build
(),
JNDI
);
// link jms
// link jms
nextBuilder
=
UriBuilder
.
fromUri
(
uriInfo
.
getBaseUri
()).
path
(
JmsService
.
JMS
);
//TODO
nextBuilder
=
UriBuilder
.
fromUri
(
uriInfo
.
getBaseUri
()).
path
(
JmsService
.
JMS
);
// TODO: Adds more links?
builder
.
link
(
nextBuilder
.
build
(),
JmsService
.
JMS
);
builder
.
link
(
nextBuilder
.
build
(),
JmsService
.
JMS
);
return
builder
.
build
();
return
builder
.
build
();
...
...
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