Skip to content

Conversation

@fax4ever
Copy link
Contributor

Comment on lines 92 to 96
ServiceRegistry serviceRegistry = metadata.getMetadataBuildingOptions().getServiceRegistry();
ConfigurationService service = HibernateOrmSpiUtils.serviceOrFail(
serviceRegistry, ConfigurationService.class );
String entityDefinition = AGENT_ENTITY_MAPPING.get(
AllAwareConfigurationPropertySource.fromMap( (Map<String, ?>) service.getSettings() ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need to pass additional parameters (like the configuration source) to the mapping producers, it would probably be better to give up on implementing AdditionalJaxbMappingProducer and use a custom interface. I'll push an additional commit.

Comment on lines 90 to 94
ServiceRegistry serviceRegistry = metadata.getMetadataBuildingOptions().getServiceRegistry();
ConfigurationService service = HibernateOrmSpiUtils.serviceOrFail(
serviceRegistry, ConfigurationService.class );
String entityDefinition = OUTBOXEVENT_ENTITY_MAPPING.get(
AllAwareConfigurationPropertySource.fromMap( (Map<String, ?>) service.getSettings() ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I'll push an additional commit.

import org.hibernate.service.Service;
import org.hibernate.service.ServiceRegistry;

public final class HibernateOrmSpiUtils {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should disappear with my additional commit.

@yrodiere
Copy link
Member

Looks good, thanks. As I said above, I pushed an additional commit to simplify how the configuration property source is accessed.

Let's merge once CI agrees.

@yrodiere yrodiere added the Waiting for CI Ready to merge once CI passes label Jan 11, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
No Duplication information No Duplication information

@yrodiere yrodiere merged commit 21984ed into hibernate:main Jan 11, 2022
@fax4ever fax4ever deleted the HSEARCH-4330 branch January 11, 2022 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for CI Ready to merge once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants