Skip to main content

Posts

Showing posts from October, 2013

Sheesh kebab recipe

Serving : 4 Lamb    : 1.5 lb Yogurt  : 1 cup Black pepper: 1 tsp Olive oil       : 3 tbsp Kothmir       : 3 tbsp Garlic          : 2 cloves Salt              : 1 tsp Onion          : 1 Oregano      : Red pepper flakes : 2 tsp 6 garlic cloves, crushed 3 tablespoons extra-virgin olive oil, plus more for brushing 3 tablespoons fresh lemon juice 1 teaspoon kosher salt 1 teaspoon freshly ground pepper 1 teaspoon dried mint 1 teaspoon dried oregano 1 1/2 pounds trimmed boneless leg of lamb, cut into 1 1/2-inch cubes 1 small bunch of fresh mint 1 large red onion, cut into 2-inch pieces 1 large yellow bell pepper, cut into 2-inch pieces 1 large green bell pepper, cut into 2-inch pieces Vegetable oil, for the grill

Java Transactions

ACID: Atomicity: Either should commit all rollback all of its updates in a single unit of work. Consistency: database should never be left in inconsistent state Isolation: How protected is uncommitted changes from other transactions, isolation decreases concurrency. Durability: changes are permanent. interfaces UserTransaction begin(), commit(), rollback(), getStatus() TransactionManager suspend(), resume(), setRollbackOnly(), Status ACTIVE, COMMITTED, COMMITING, MARKED_ROLLBACK, NO_TRANSACTION, PREPARED, PREPARING, ROLLEDBACK, ROLLING_BACK, UNKNOWN. Transaction Models 1. Local 2. Programatic 3. Declarative Local Transaction Model: Resource manager manages transactions. Developer manages connections. e.g. conn.setAutoCommit(false); try {   stmt.executeUpdate(sql1);   stmt.executeUpdate(sql1);   conn.commit() } catch (Exception e) {   conn.rollback(); } Programatic Transaction Model Uses JTA, developer uses UserTransaction begin(), com...

JVM internals

JRE has JVM, Garbage collector, JIT compiler JVM - young generation, old generation, permanent generation (metaspace). Garbage collector - Serial, Multithreaded, CMS, G1 Serial           - single threaded stop the world young generation collector           - single threaded stop the world old generation collector Throughput/Parallel/Multithreaded -          - Multithreaded stop the world young generation collector          - Single/multi threaded stop the world old generation collector CMS        - Server class machine default collector        - Multithreaded young & old generation collector        - 2 GB        - 2 Virtual CPU's        - One exception is on Windows 32 bit the default is the serial collector. G1      - Supported as of Java HotSpot...