Posts

Showing posts with the label hibernate

Observability Done Right: Best Practices and Anti-Patterns for Effective System Monitoring

Image
  WHAT Observability is a concept that refers to the ability to gain insights into the behavior and performance of complex systems. In the context of software engineering, observability involves the collection, analysis, and visualization of data from software applications, infrastructure, and other components of a system. In the animal kingdom, observability plays a critical role in survival, allowing animals to monitor their surroundings, detect threats, and find food. Dolphins use echolocation to observe their surroundings. They emit high-frequency sounds that bounce off objects, allowing them to create a 3D map of their environment. Thanks for reading Knowledge Cafe! Subscribe for free to receive new posts and support my work. Subscribed WHY In today's era, architectures are becoming increasingly large, complex, and fast-paced due to the faster development and deployment of software by distributed teams with the help of DevOps, continuous delivery, and agile development methodo...

Hibernate-Object state transitions

Image
 Transient instances –instances of a persistent class instantiated with the new operator –transient, they have no persistent state –garbage collected if dereferenced by the application –have no database identity  Transient instances may be made persistent by –calling Session.save(object) –creating a reference from another instance that is already persistent  Persistent instances –include any instance retrieved with a query, lookup by identifier or navigation –are managed, changes are automatically flushed to the database –are transactional, changes can be rolled back in the database only –have database identity  Persistent instances may be made transient by –calling Session.delete(object) –“orphan delete” (later)  Detached instances –are instances with database identity that are not associated with any open Session –are no longer managed by Hibernate –represent database state, that is potentially stale  Persistent instances become detached by –calling Sessi...