Re: [hibernate-dev] HTTPS for Bean Validation

2018-06-19 Thread Emmanuel Bernard
On Tue 18-06-19 16:36, Sanne Grinovero wrote:
>On Tue, 19 Jun 2018 at 16:32, Emmanuel Bernard  wrote:
>>
>> On Tue 18-06-19 15:13, Sanne Grinovero wrote:
>> >On Mon, 18 Jun 2018 at 21:48, Emmanuel Bernard  
>> >wrote:
>> >>
>> >>
>> >>
>> >> > On 18 Jun 2018, at 17:49, Sanne Grinovero  wrote:
>> >> >
>> >> > I was experimenting with "let's encrypt" but then you told me that I
>> >> > wasn't allowed to use that service.
>> >>
>> >> I don’t remember saying that. Knowing me I surely gave you a reason :)
>> >
>> >Yes, you did :)
>>
>> What was it?
>
>Preference to use the existing certificate authority.

Yes ok, that's the one I could reconstruct from first principle. Plus it
would give us EV which is better. But if that becomes a hurdle and slow
down the project by 2 months, then better start with a let's encrypt
one.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] HTTPS for Bean Validation

2018-06-19 Thread Sanne Grinovero
On Tue, 19 Jun 2018 at 16:32, Emmanuel Bernard  wrote:
>
> On Tue 18-06-19 15:13, Sanne Grinovero wrote:
> >On Mon, 18 Jun 2018 at 21:48, Emmanuel Bernard  
> >wrote:
> >>
> >>
> >>
> >> > On 18 Jun 2018, at 17:49, Sanne Grinovero  wrote:
> >> >
> >> > I was experimenting with "let's encrypt" but then you told me that I
> >> > wasn't allowed to use that service.
> >>
> >> I don’t remember saying that. Knowing me I surely gave you a reason :)
> >
> >Yes, you did :)
>
> What was it?

Preference to use the existing certificate authority.

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

[hibernate-dev] NoORM IRC meeting minutes

2018-06-19 Thread Guillaume Smet
Hi everyone,

Here are the minutes of our NoORM IRC meeting:

15:59 < jbott> Minutes:
http://transcripts.jboss.org/meeting/irc.freenode.org/hibernate-dev/2018/hibernate-dev.2018-06-19-13.07.html
15:59 < jbott> Minutes (text):
http://transcripts.jboss.org/meeting/irc.freenode.org/hibernate-dev/2018/hibernate-dev.2018-06-19-13.07.txt
15:59 < jbott> Log:
http://transcripts.jboss.org/meeting/irc.freenode.org/hibernate-dev/2018/hibernate-dev.2018-06-19-13.07.log.html

Cheers,

-- 
Guillaume
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] HTTPS for Bean Validation

2018-06-19 Thread Emmanuel Bernard
On Tue 18-06-19 15:13, Sanne Grinovero wrote:
>On Mon, 18 Jun 2018 at 21:48, Emmanuel Bernard  wrote:
>>
>>
>>
>> > On 18 Jun 2018, at 17:49, Sanne Grinovero  wrote:
>> >
>> > I was experimenting with "let's encrypt" but then you told me that I
>> > wasn't allowed to use that service.
>>
>> I don’t remember saying that. Knowing me I surely gave you a reason :)
>
>Yes, you did :)

What was it?
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] HTTPS for Bean Validation

2018-06-19 Thread Sanne Grinovero
On Mon, 18 Jun 2018 at 21:48, Emmanuel Bernard  wrote:
>
>
>
> > On 18 Jun 2018, at 17:49, Sanne Grinovero  wrote:
> >
> > I was experimenting with "let's encrypt" but then you told me that I
> > wasn't allowed to use that service.
>
> I don’t remember saying that. Knowing me I surely gave you a reason :)

Yes, you did :)

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

[hibernate-dev] Backport caching ValueBinders and ValueExtractors for a SqlTypeDescriptor from 6.0 to 5.x

2018-06-19 Thread Steve Ebersole
Today, when either `SqlTypeDescriptor#getBinder` or
`SqlTypeDescriptor#getExtractor` are called we build/calculate the
binder/extractor each and every time.  In 6.0 we added code that caches
these binders and extractors as they are requested.

IMO we should backport the idea of caching these to 5.x.  Any volunteers?

The code on 6.0 is still local to my machine, but the code in general looks
like[1]:

public interface SqlTypeDescriptor {
...

JdbcValueMapper getJdbcValueMapper(BasicJavaDescriptor
javaTypeDescriptor);

@Remove
default  JdbcValueBinder getBinder(BasicJavaDescriptor
javaTypeDescriptor) {
return getJdbcValueMapper( javaTypeDescriptor ).getJdbcValueBinder();
}

@Remove
default  JdbcValueExtractor getExtractor(BasicJavaDescriptor
javaTypeDescriptor) {
return getJdbcValueMapper( javaTypeDescriptor ).getJdbcValueExtractor();
}
}

public abstract class AbstractSqlTypeDescriptor implements
SqlTypeDescriptor {
private final Map,JdbcValueMapper>
valueMapperCache = new ConcurrentHashMap<>();

protected  JdbcValueMapper determineValueMapper(
JavaTypeDescriptor javaTypeDescriptor,
Function,JdbcValueMapper> creator) {
return (JdbcValueMapper) valueMapperCache.computeIfAbsent(
javaTypeDescriptor,
javaTypeDescriptor1 -> creator.apply( javaTypeDescriptor )
);
}
}

public abstract class AbstractTemplateSqlTypeDescriptor extends
AbstractSqlTypeDescriptor {
@Override
public  JdbcValueMapper getJdbcValueMapper(BasicJavaDescriptor
javaTypeDescriptor) {
return determineValueMapper(
javaTypeDescriptor,
jtd -> {
final JdbcValueBinder binder = createBinder( javaTypeDescriptor );
final JdbcValueExtractor extractor = createExtractor( javaTypeDescriptor
);

return new JdbcValueMapperImpl<>( javaTypeDescriptor, this, extractor,
binder );
}
);
}

protected abstract  JdbcValueBinder
createBinder(BasicJavaDescriptor javaTypeDescriptor);

protected abstract  JdbcValueExtractor
createExtractor(BasicJavaDescriptor javaTypeDescriptor);
}


[1] In 6.0 ValueBinder is replaced by JdbcValueBinder and ValueExtractor is
replaced by JdbcValueExtractor - the new variants serve the same basic
purposes but in different ways related to the other changes  in 6.0.
JdbcValueMapper is a new contract that combines a JavaTypeDescriptor
(specifically a BasicJavaDescriptor since all JDBC types are "basic"),
SqlTypeDescriptor, JdbcValueBinder and JdbcValueExtractor
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev