bx-orm-transactions — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited bx-orm-transactions (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
transaction {} Block// All entitySave/entityDelete calls within the block are committed atomically.
// On uncaught exception: automatic rollback
// On clean exit: automatic commit
transaction {
var user = entityNew( "User" )
user.setUsername( "alice" )
user.setEmail( "[email protected]" )
entitySave( user )
}transaction {
try {
var order = entityLoadByPK( "Order", orderId )
order.setStatus( "processed" )
entitySave( order )
var payment = entityNew( "Payment" )
payment.setOrder( order )
payment.setAmount( order.getTotal() )
entitySave( payment )
transactionCommit()
} catch ( any e ) {
transactionRollback()
rethrow
}
}transactionCommit() and transactionRollback()// Manual commit within a transaction block
transactionCommit() // explicitly commit now (can use again later)
// Manual rollback (rolls back everything since last commit or start)
transactionRollback()
// Rollback to a named savepoint
transactionRollback( "mySavepoint" )transaction {
// Save base state
entitySave( user )
// Set a savepoint after first operation
transactionSetSavePoint( "afterUserSave" )
try {
entitySave( profile )
entitySave( settings )
transactionCommit()
} catch ( any e ) {
// Partial rollback — only undo after the savepoint
transactionRollback( "afterUserSave" )
// user is still saved, profile/settings are not
transactionCommit()
}
}ORMFlush() — Explicit Flush// ORMFlush() writes pending session changes to the DB within the current
// transaction, without committing. Useful to force ordering or get generated IDs.
transaction {
var parent = entityNew( "Category" )
parent.setName( "Electronics" )
entitySave( parent )
// Flush to get the auto-generated ID of parent
ORMFlush()
var child = entityNew( "Product" )
child.setName( "Laptop" )
child.setCategory( parent ) // parent.getId() is now available
entitySave( child )
}// Reload entity from DB (discards in-memory changes)
entityReload( entity )
// Clear the entire session (detach all entities)
ORMClearSession()
// Force close the session early (usually not needed)
ORMCloseSession()
ORMCloseAllSessions() // close all datasource sessions// Specify datasource on the transaction block
transaction datasource="secondaryDB" {
entitySave( archiveRecord )
}
// Each datasource is its own independent transaction
transaction datasource="primaryDB" {
entitySave( user )
}
transaction datasource="auditDB" {
entitySave( auditLog )
}// BoxLang joins existing transactions by default (does NOT create a new transaction)
transaction {
doMainWork()
// This joins the outer transaction — NOT a separate transaction
transaction {
doSubWork()
}
// Commit covers both main and sub work
}class UserService {
function createUserWithProfile( userData, profileData ) {
transaction {
try {
var user = entityNew( "User" )
entityPopulate( user, userData )
entitySave( user )
// Flush so profile can reference the new user ID
ORMFlush()
var profile = entityNew( "Profile" )
entityPopulate( profile, profileData )
profile.setUser( user )
entitySave( profile )
transactionCommit()
return user
} catch ( any e ) {
transactionRollback()
throw( type: "UserService.CreateFailed", message: e.message, cause: e )
}
}
}
function bulkUpdate( ids, status ) {
transaction {
for ( var id in ids ) {
var entity = entityLoadByPK( "User", id )
if ( !isNull( entity ) ) {
entity.setStatus( status )
entitySave( entity )
}
}
}
}
}Most JPA/Hibernate setups default to the database-level isolation. You can influence this via Hibernate's session settings if needed, but for most use-cases rely on the database default (typically READ COMMITTED).
entitySave() or entityDelete() outside a transaction {} block — changes may not persist reliablytransactionCommit() inside a catch block without a prior transactionRollback() will commit the bad statetransactionRollback() BEFORE re-throwing in catch blocksORMFlush() to get auto-generated IDs before relating them to child entitiestransaction {} blocks JOIN the outer transaction — they do not create a new isolated transactiontransactionSetSavePoint() for partial-rollback logic within a larger transactionORMClearSession() inside a transaction without flushing first will silently discard pending changes~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.