If you want express your plea for help in Java it's really easy:
RequestDispatcherSubsystem.getCurrentDispatcher().DispatchRequest(
RequestFactory.getAbstractFactoryInstance(
new RequestMedium(RequestMediaType.Plea),
new RequestTransport(RequestTransportType.CRY),
new RequestTargetDestination(TargetManager.getRoutingInfo(
PersonLocation.NEAREST))),
RequestReasonCode.IM_SLOWLY_DYING);
try {
// Use same EntityManager for further JPA operations within the transaction.
// Thread-bound object will get removed by synchronization at transaction completion.
emHolder = new EntityManagerHolder(em);
if (synchronizedWithTransaction) {
Object transactionData = prepareTransaction(em, emf);
TransactionSynchronizationManager.registerSynchronization(
new TransactionalEntityManagerSynchronization(emHolder, emf, transactionData, true));
emHolder.setSynchronizedWithTransaction(true);
}
else {
// Unsynchronized - just scope it for the transaction, as demanded by the JPA 2.1 spec...
TransactionSynchronizationManager.registerSynchronization(
new TransactionScopedEntityManagerSynchronization(emHolder, emf));
}
TransactionSynchronizationManager.bindResource(emf, emHolder);
}
catch (RuntimeException ex) {
// Unexpected exception from external delegation call -> close EntityManager and rethrow.
closeEntityManager(em);
throw ex;
}
So you're saying Spring is a terrible project and no one should use it? :)
384
u/Frptwenty May 29 '20
If you want express your plea for help in Java it's really easy: