manage-java

Implement OFBiz Java services with transaction management and coding patterns.

175|216|Updated Mar 5, 2017
One-click install
npx skills add https://github.com/apache/ofbiz-plugins --skill manage-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: manage-java
Source: https://github.com/apache/ofbiz-plugins/tree/main/ai-agent-skills/manage-java
Command: npx skills add https://github.com/apache/ofbiz-plugins --skill manage-java

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide for implementing robust, transaction-aware business logic in Java for Apache OFBiz services, ensuring maintainability and adherence to best practices.

Core Features & Use Cases

  • Java Service Implementation: Develop core business logic in Java for OFBiz.
  • Transaction Management: Handle transactions effectively for reliable data operations.
  • Pattern Adherence: Follows established patterns for logging, localization, and error handling.
  • Use Case: When building a new feature in OFBiz that requires complex calculations or integrations with external Java libraries, this skill guides the developer through creating a performant and secure Java service.

Quick Start

Implement a new Java service by creating a public static method in a Java class and registering it in services.xml with engine="java".

Frequently Asked Questions about manage-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement an OFBiz Java service with proper transaction management?

To implement an OFBiz Java service, create a public static method in a Java class and register it in services.xml with engine="java". This ensures your business logic adheres to established transaction management and coding patterns for reliable data operations.

What is the standard method signature for an OFBiz Java service?

The standard method signature for an OFBiz Java service uses a public static method structure that accepts core tools for locale and timezone awareness. This established pattern ensures robust business logic execution and proper error handling within the framework.

How do I expose a Java service in OFBiz using XML?

You expose a Java service in OFBiz by registering it in the services.xml file with the attribute engine="java". This maps your Java class method to the framework so it can be invoked as a standard OFBiz service.

What are common bad practices and coding guardrails for OFBiz Java development?

Common bad practices in OFBiz Java development include neglecting transaction boundaries, ignoring locale/timezone awareness, and bypassing standard logging patterns. Adhering to framework guardrails prevents these issues and ensures maintainable, secure service code.

Does OFBiz Java service development support locale and timezone awareness?

Yes, OFBiz Java service development explicitly supports locale and timezone awareness. By utilizing the framework's core tools within your standard method signatures, you ensure business logic processes regional data correctly across different user contexts.

When should I use Java services instead of other options in OFBiz?

You should use Java services in OFBiz when building features that require complex calculations or integrations with external Java libraries. This approach provides performant, secure, and transaction-aware business logic execution within the established framework patterns.