Skip to content

Instantly share code, notes, and snippets.

View jpa-second-level-cache-test.java
// Testing the jpa (hibernate) second level cache by running different way of findById method
public UserSession findById(String id) {
System.out.println("Running UserSession.findById");
Session session = getEntityManager().unwrap(Session.class);
SessionFactory sessionFactory = session.getSessionFactory();
String rName = "test.ear/model.jar#model.com.test.app.authentication.model.UserSession";
long oldMissCount = sessionFactory.getStatistics().getSecondLevelCacheStatistics(rName).getMissCount();
long oldHitCount = sessionFactory.getStatistics().getSecondLevelCacheStatistics(rName).getHitCount();
@ramsrib
ramsrib / some_links.md
Last active Aug 29, 2015 — forked from rponte/some_links.md
Some interesting articles about JPA/Hibernate Multi-Tenancy
View essential-javascript-links.md
View node-folder-structure-options.md

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
View wildfly-build.log
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wildfly-process-controller ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /run/media/sriram/Backup/jboss-as-src/jboss-as/process-controller/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wildfly-process-controller ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 37 source files to /run/media/sriram/Backup/jboss-as-src/jboss-as/process-controller/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
View split_bootimg.pl
#!/usr/bin/perl
######################################################################
#
# File : split_bootimg.pl
# Author(s) : William Enck <enck@cse.psu.edu>
# Description : Split appart an Android boot image created
# with mkbootimg. The format can be found in
# android-src/system/core/mkbootimg/bootimg.h
#
# Thanks to alansj on xda-developers.com for