JSR commonly refers to Java Specification Requests, formal standards for the Java platform.
Questions tagged [jsr]
147 questions
3
votes
1 answer
Can an object's reference be set before its constructor finishes?
JMM (Java Memory Model) is free to reorder statements.
Of course, this is especially tricky when dealing with multithreading environment.
JMM rules precised that volatile and final variables are always fully initialized before constructor finishes…

Mik378
- 21,881
- 15
- 82
- 180
3
votes
1 answer
EJB 3.1 JSR definition
In the EJB 3.1 JSR it states in section 16.3.4
The container must ensure that the enterprise bean instances have
only read access to their environment variables. The container must
throw the javax.naming.OperationNotSupportedException from all…

Marthin
- 6,413
- 15
- 58
- 95
2
votes
2 answers
@Size annotation to validate a field
I need to validate a field - secPhoneNumber (secondary phone #). I need to satisfy below conditions using JSR validation
The field can be empty/null
Otherwise, the data must be of length 10.
I tried the code below. The field is always getting…

Andy
- 31
- 1
- 1
- 3
2
votes
2 answers
Type annotation (JSR 308) with Java 7?
Can we use JSR 308 type annotions in Java 7 project (like @NonNull, ...) ? If yes, what is the related maven dependency ?

Aure77
- 3,034
- 7
- 33
- 53
2
votes
0 answers
Submitting JSR to JCP?
Say I want to submit the JSR where I want to request some new API or some optimization in existing API
Went through https://jcp.org/en/procedures/overview. Looks like any user can not submit JSR. It can be initiated by community members.
Right ?
I…

user3198603
- 5,528
- 13
- 65
- 125
2
votes
0 answers
Java sign XML document using JSR 105 with HSM private key
I need to sign XML document using JSR 105 api. I have already figured out, how to do it using standard provider, but now I need my code to support HSM. And this is problem.
If I initialize signing like this:
XMLSignatureFactory fac;
fac =…

Josef Bureš
- 125
- 1
- 11
2
votes
3 answers
Overflow @QueryParams Integer in Jersey
Java, Jersey
@GET
@Path("/path1")
public String getFunction(
@QueryParam("param1") Integer intParam1
) {
...
}
send get request
http://domain.cc/path1?param1=1222534625474 // overflow Int
http://domain.cc/path1?param1=qweqwe
How to…

couatl
- 416
- 4
- 14
2
votes
1 answer
JSR cross filed validation
I have a question on JSR cross filed validation.
I have a rest based service for get and post. So I have something like
@GET
ItemOfferId getItem(String)
other is that
@Post
boolean setItem(ItemOfferId)
In the ItemOfferId class I have class level…

swati
- 2,099
- 6
- 19
- 23
2
votes
0 answers
Spring MVC Date Validation jsr303 today or greater than today
I have a field :
private Date effectiveDate;
I intend to use jsr303 validation and need to validate that the date is today or greater than today.
I was unable to find an annotation for this.
I came across @Past and @Future but I need something like…

souser
- 796
- 2
- 8
- 25
2
votes
1 answer
Is it possible to assess Jackrabbit repository using plain HTTP?
As I understand it should be natively available in Jackrabbit 1.6 (I've found this blog entry http://dev.day.com/microsling/content/blogs/main/jrnativehttp.html) but I can not find any example configuration.

Łukasz Koniecki
- 564
- 1
- 6
- 14
2
votes
3 answers
JSR 303 - Name of the annotated field in the custom validator
I have a question about custom annotations. More precisely, do I have access to the name of the annotated field inside the custom validator ?
If yes, how do I access this?
Thanks

TheRock3t
- 628
- 9
- 22
2
votes
1 answer
Java Data Objects Specification using only Runtime Exceptions?
We are evaluating JDO for using as the Data Management Layer in our application . The requirement is to have a well abstracted Data management with zero dependencies with any of the Data stores.
We found JDO very promising and is understanding the…

arunvg
- 1,209
- 1
- 20
- 31
2
votes
0 answers
scala, jsr 223 & compiling
I successfully set up small test app using scala via jsr 223 apis (scala 2.8.1 and sling JSR 223 implementation). However, when checked if ScriptEngine implements javax.script.Compilable, i got that is is not.
final ScriptEngine eng = new…

user124
- 1,632
- 1
- 11
- 11
1
vote
2 answers
JSR 256 battery events
How can I detect whenever the power cord is unplugged from electrical socket using JSR 256?

Attilah
- 17,632
- 38
- 139
- 202
1
vote
2 answers
Are JSR specifications good learning resources from the developer's point of view?
Today, reading Servlet 3.0 specification, I've come across a sentence:
We emphasize that this specification is not a user’s guide for servlet developers and
is not intended to be used as such.
I've started reading it because I felt like most of…

Maciej Ziarko
- 11,494
- 13
- 48
- 69