Skip to content

Instantly share code, notes, and snippets.

View abhirockzz's full-sized avatar
👋
fmt.Println(hello, world!)

Abhishek Gupta abhirockzz

👋
fmt.Println(hello, world!)
View GitHub Profile
@abhirockzz
abhirockzz / ProgrammaticSSEClient.java
Last active July 27, 2017 11:05
JAX-RS 2.1 SSE Client API support in Java EE 8
@Singleton
@Startup
public class ProgrammaticSSEClient {
Client sseClient;
WebTarget target;
@Resource
TimerService tsvc;
@abhirockzz
abhirockzz / StatefulEJBInWebSocket_2.txt
Created February 14, 2017 03:53
Stateful EJB In WebSocket (2/2)
@Stateful
public class ClientChatState {
...
@Remove
public void dispose(){
//this can just be a marker method
}
@PreDestroy
public void closeResources(){
//close connections, resources etc.
@mortezaadi
mortezaadi / persistence.xml
Last active March 13, 2023 10:54
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->