[hibernate-dev] Why do Services need to be Serializable?

2012-09-26 Thread Sanne Grinovero
I just found this comment on org.hibernate.service.Service:

/**
 * Marker interface for services.
 * 
 * NOTE : All services must be {@link Serializable}!
 *
 * @author Steve Ebersole
 */
public interface Service extends Serializable {


What kind of bad things will happen to us if violating this recommendation?

In OGM we have for example connection pools managed in a Service, we
can hardly serialize that.

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


Re: [hibernate-dev] Why do Services need to be Serializable?

2012-09-26 Thread Steve Ebersole
Hmm, not sure why I wrote that.  I don't think they have to actually 
given how we "serialize" the SessionFactory.

On 09/26/2012 07:24 AM, Sanne Grinovero wrote:
> I just found this comment on org.hibernate.service.Service:
>
> /**
>   * Marker interface for services.
>   * 
>   * NOTE : All services must be {@link Serializable}!
>   *
>   * @author Steve Ebersole
>   */
> public interface Service extends Serializable {
>
>
> What kind of bad things will happen to us if violating this recommendation?
>
> In OGM we have for example connection pools managed in a Service, we
> can hardly serialize that.
>
> Sanne
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>

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


Re: [hibernate-dev] Why do Services need to be Serializable?

2012-09-26 Thread Emmanuel Bernard
On Wed 2012-09-26 13:24, Sanne Grinovero wrote:
> I just found this comment on org.hibernate.service.Service:
> 
> /**
>  * Marker interface for services.
>  * 
>  * NOTE : All services must be {@link Serializable}!
>  *
>  * @author Steve Ebersole
>  */
> public interface Service extends Serializable {
> 
> 
> What kind of bad things will happen to us if violating this recommendation?
> 
> In OGM we have for example connection pools managed in a Service, we
> can hardly serialize that.

Well with a bit of work we could make such services serializable but it
seems the equivalent services for ORM are not necessarily making this
effort.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Why do Services need to be Serializable?

2012-09-26 Thread Sanne Grinovero
quoting IRC conversation:

 sannegrinovero: ah i remember why...
 Configuration
 we have tests that explicitly test serializing Configuration
 and services not being Serializable can cause those to fail
 of course thats a transitory concern
 like i said in the email prior to emmanuel's semi-harsh
reply... i dont think it is really necessary
 ah, if it's transitory would you accept a patch to
remove the comment and the "extends Serializable" ?
 I can replace the comment with a "soft requirement"
for some services explicitly needed in tests
 no, i would not accept such a patch...
 but you could make that change if you want
 :)
 just run the tests first
 you mean I should push it directly?
 yep

On 26 September 2012 13:38, Emmanuel Bernard  wrote:
> On Wed 2012-09-26 13:24, Sanne Grinovero wrote:
>> I just found this comment on org.hibernate.service.Service:
>>
>> /**
>>  * Marker interface for services.
>>  * 
>>  * NOTE : All services must be {@link Serializable}!
>>  *
>>  * @author Steve Ebersole
>>  */
>> public interface Service extends Serializable {
>>
>>
>> What kind of bad things will happen to us if violating this recommendation?
>>
>> In OGM we have for example connection pools managed in a Service, we
>> can hardly serialize that.
>
> Well with a bit of work we could make such services serializable but it
> seems the equivalent services for ORM are not necessarily making this
> effort.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev