Websocket examples using
- JSR 356 (part of Java EE7)
- Spring Boot
- Apache Spark microservices framework
>>>ITwacht<<<
Websocket examples using
After 19 years the second edition of Martin Fowler's refactoring book sees print.
Here's an overview of the changes.
After 8 years and +300 votes this feature has been implemented in the 2018.3 edition of JetBrains IntelliJ
The spring data release trains are named after famous computer scientists, some of them living! The release train is a bundle of recent compatibe Spring Data subprojects (JPA, Redis, MongoDB, Solr, REST...). Basically they all refer to the same Spring Data Commons version. The names are ordered alphabetically, clearly inspired by Android's alphabetically ordered releases named after candy, Here's the list up to this day:
2013-02: Arora
2014-02: Babbage
2014-03: Codd
2014-05: Dijkstra
2014-09: Evans
2015-03: Fowler
2015-09: Gosling
2016-04: Hopper
2017-01: Ingalls
2017-10: Kay
2018-09: Lovelace
2019-10 : Moore
: Neumann
Google drive file stream is now adding an real-time presence to your Microsoft Office documents.
In the bottom right corner of your documents you see a Safe to edit message to indicate no one else is working in the file.
You will also see who is editing and be able to merge after simultaneous editing.
You need to have the Drive File Stream Client installed for this feature to be active. Google is doing this without any Office plugin. When you launch the office document from your synced drive the Drive Client monitors it and displays the messages on top. Nice work Google!
When calling a method with arguments using the <evaluate> tag in a spring webflow XML definition I get the error SpelEvaluationException: EL1004E: Method call: xxx cannot be found.
I am using Spring Boot Devtools for automatic server restart upon changes.
The embedded LiveReload server uses two classloaders, and thinks the the classes of the parameters supplied by spel in the XML are different from the (same) classes in your Java code.
Hence the method is not found, and an exception is thrown.
Possible Solutions:
Sometimes I work in a powerpoint where the text in the notes view is too small or too big.
Setting the font size does nothing.
Moving the zoom slider does nothing (I wish Microsoft would fix this).
The solution: while positioning your cursor in the notes pane, you have to select the View > Zoom menu, that one works.
When you save a powerpoint as PDF, transparent parts of images (e.g. png) appear as black regions in the PDF.
The solution?
There are two kinds of Master
Documents: Those that are corrupt and those that will be corrupt
soon.
John McGie
With GDPR in operation, a lot of sites refer to youronlinechoices.com to manage your advertising cookies. On the homepage of the site you can select your country and language and then go to your advertising preferences. Sometimes you are directed to the preferences page directly.
The site lists (for me) 116 advertising sites, with for each company an on/off status. The site is a self-regulating, industry funded site.
Only... it does not work. For the 116 sites, only 14 show a response, the rest time out.
The site allows you to switch advertising on/off for individual companies. As it is not practical to click 116 buttons, there is a handy option to switch them all on or off.
Only... it does not work. Just like you could expect, the operation times out.
Most companies have an edaa certified label. You can click on the label to see the certification the advertising company received.
Only... it does not work. This is what you get:
Sorry, the page you are looking for either doesn't exist or something has gone wrong. Please go back to the home page and try again. Thank you.
private static Map<Integer,Publisher> publisherDao = new HashMap<Integer,Publisher>();
<detail> <canNotCreatePublisher > <reason>No address</reason> <reason>No name</reason> <canNotCreatePublisher> </detail>Note: the canNotCreatePublisher element may contain some extra namespace information.
private ErrorInfo faultInfo;
private static Map<String,Order> orderDao = new HashMap<String,Order>();
Make a copy of the project you made in module08 and work in that copy.
Add a SOAPHandler that logs every message to System.out for the BookWS webservice.
context.getMessage().writeTo(System.out);
com.sun.xml.ws.transport.http.HttpAdapter.dump=true
Create a JAX-RS 2 REST client application for your createAuthor and findAuthorById service.
public class MyClient { public static void main(String[] args) { System.out.println("What's the name of this author?: "); String authorId = new Scanner(System.in).next(); Client client = ClientBuilder.newClient(); WebTarget resource = client.target("http://localhost:8080/myrest/webresources"); Response response = resource .path("author") .path(authorId) .request(MediaType.APPLICATION_JSON) .get(); // historically getStatus returns an int, not a Response.Status if (response.getStatus() == Response.Status.OK.getStatusCode()) { Author author = response.readEntity(Author.class); System.out.println("Found author: " + author.getFirstName() + " " + author.getLastName()); }else{ String body = response.readEntity(String.class); System.out.println("Not correct (" + response.getStatusInfo().getReasonPhrase() + ")\n " +body); } } }
To provide your own conversion implementation of a JAXB property, annotate the property in your JAXB class with javax.xml.bind.annotation.adapters.@XmlJavaTypeAdapter:
@XmlJavaTypeAdapter(MyAdapter.class)
public
void setFrom(LocalDate
from)
{
this.from = from;
}
Then write your Adapter marshalling your LocalDate attribute to an XML value String and unmarshalling it:
public
class MyDateAdapter
extends XmlAdapter<String,
LocalDate>
{
public
LocalDate
unmarshal(String
myString)
throws Exception
{
return LocalDate.parse(myString);
}
public
String marshal(LocalDate
myDate)
throws Exception
{
return myDate.toString();
}
}
By default glassfish does not add timestamps to console logging messages and that allways leaves me wondering wether I'm looking at an old message or a new one.
To add timestamps edit $GLASSFISH_INSTALL/glassfish/domains/domain1/config/logging.properties
Replace domain1 with the domain your domainin the above, if you are not using the default domain.
change:
java.util.logging.ConsoleHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter
to:
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
The default format is fine for me, but you can customize the format using:
java.util.logging.SimpleFormatter.format="your %format string"
The javadoc contains some format string examples.
Then (re)start the server.
The table below lists the components in latest versions of the Java Enterprise Edition.
Many of the Java EE projects live on github.
After Java EE8, Java EE is moving to the EE4J project (Eclipse Enterprise For Java) aka Jakarta.
Technologies | 151 J2EE 1.4 2003 |
244 Java EE5 2006 | 316 Java EE6 2009 | 342 Java EE7 4/2013 | 366 Java EE8 |
Java SE | 59 1.4 | 176 5 | 270 6 | 336 7 | 337 8 |
EJB | 153 2.1 | 220 3.0 | 318 3.1 | 345 3.2 | |
Servlet/JSP | 2.4 | 2.5 | 3.0 | 3.1 | 4.0 |
EE Management | 77 1.0 | ||||
JMS | 914 1.1 | 343 2.0 | 368 2.1 | ||
JTA 907 | 1.0 | 1.1 | 1.2 | ||
JavaMail 919 | 1.3 | 1.4 | 1.5 | 1.6 | |
Connector (JCA) | 112 1.5 | 1.5 | 322 1.6 | 1.7 | |
Java Activation Framework (JAF) 925 | 1.0 | 1.1 | SE:1.1.1 | ||
Web Services 109 | 1.1 | 1.2 | 1.3 | 1.4 | |
Web Services Metadata 181 | 2.0 | SE | SE:2.1 | ||
JAX-WS (SOAP) | 101 JAX-RPC 1.1 | 224 2.0 | SE:2.0 | SE:2.2 | |
JAX-RS (REST) | 311 1.1 | 339 2.0 | 370 2.1 | ||
JAXB 222 | 2.0 | SE:2.2 | |||
JSON-P | 353 1.0 | 3741.1 | |||
JSON-B 367 | 1.0 | ||||
JAXR (UDDI Registry) | 1.0 | [1.0] | x | ||
SOAP w attachments (SAAJ) 67 | 1.2 | 1.3 | SE | ||
StAX 173 | 1.0 | SE | |||
JMX | 1.2 | SE | SE | ||
container authorisation (JACC) 115 | 1.0 | 1.1 | 1.4 | 1.5 | |
container authentication (JASPIC) 196 | 1.0 | 1.1 | |||
Security 375 | 1.0 | ||||
Common annotations 250 | 1.0 | 1.1 | 1.2 | 1.3 | |
Java Persistence (JPA) | 1.0 | 317 2.0 | 338 2.1 | 2.2 | |
Bean Validation | 303 1.0 | 349 1.1 | 380 2.0 | ||
Managed Beans | 1.0 | ||||
Interceptors | 1.0 | 1.1 | 1.2 | ||
CDI for Java EE | 299 1.0 | 346 1.1 | 365 2.0 | ||
DI for Java 330 | 1.0 | ||||
Concurrency utilities 236 | 1.0 | ||||
State management 350 | 1.0 | ||||
Batch 352 | 1.0 | 1.1 | |||
Servers | |||||
Sun JSAS | 8 | 9.1 | |||
Glassfish | 2 | 3 (12/09) | 4 (5/13) | 5 (9/17) | |
JBoss / WildFly | 4 | 5 | 7 (7/11) | 8 (2/14) | 12 (2/18) |
IBM Websphere | 6 | 7 | 8 (6/11) | 9 (10/17) | |
Oracle Weblogic | 9 | 10 | 12.1.1 (12/11) | 12.2.1 (11/15) | |
Apache Geronimo | 1 | 2 | 3 (7/12) | - | |
Apache Tommee+ | 1.5 (9/12) | 7 (3/16) |
You can use a link on your webpage to open a page from another site in another tab, using
<a ref="https://othersite/otherpage.html" target="_blank"> to other page </a>Your browser typically opens the other page in a new tab, but this page retains a relation with your webpage and can do some priviliged actions like redirecting the tab of your webpage to another URL.
<a ref="https://othersite/otherpage.html" target="_blank" rel ="noopener noreferer"> to other page </a>more...
JSR numbers are included as links.
Servers are webcontainers.Take care, web containers do not include JSF. You have to add it yourself or use an enterprise application server. Enterprise application servers are included in the
complete Java EE version overview.
Java EE | servlet | JSP | EL | JSTL | JSF | WebSocket | MVC | Server | What’s new |
2.1
|
1.0
| iPlanet jetty 1 |
ServletContext, RequestDispatcher
| ||||||
1.2
|
2.2
|
1.1
| tomcat 3.3 jetty 3 |
war
| |||||
1.3
|
53 2.3
|
53 1.2
| tomcat 4.1 jetty 4 |
filters
| |||||
1.4
|
154 2.4
|
152 2.0
|
1.0
|
52 1.1
| tomcat 5.5 jetty 5 | ||||
5
|
2.5
|
245 2.1
|
2.1
|
1.2
| 127 1.2 | tomcat 6 jetty 6 |
annotations
| ||
6
|
315 3.0
|
2.2
|
2.2
| 314 2.0 | tomcat 7 jetty 8 |
asynchronous servlets, EL method calls, more...
| |||
7
| 340 3.1 | 344 2.2 |
356 1.0
| tomcat 8 jetty 9.1 | HTML 5, non blocking (Listener) servlet IO | ||||
8
| 369 4.0 | 372 2.3 | 371 1.0 | tomcat 9 | HTTP/2 |
When I'm late filling in my timesheets, it always is a headache to remember which hours I spent working. My windows event viewer (eventvwr.msc) can be a help but the logs are too crowded.
The events related to logon/logoff are polluted with plenty of events from system services.
So I ventured to create a filter only showing the events relating to my user. This requires XML filtering based on XPATH.
<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[( EventID=4624 or EventID=4634 or EventID=4647)] and EventData[Data[@Name='TargetUsername']='jan']] </Select> </Query> </QueryList>