You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ilya Obshadko <il...@gmail.com> on 2014/06/12 21:32:11 UTC

live class reloading for custom package

Hey guys,

Could anyone explain - is that possible to enable live class reloading for
user-defined packages?

For example, I would like to implement live reloading for Hibernate
entities and enum classes that I use in my application (the former probably
requires Hibernate re-initialization, while the latter might require
reloading of any other dependent classes). Is it possible to do that?

Thanks in advance.

-- 
Ilya Obshadko

Re: live class reloading for custom package

Posted by Lance Java <la...@googlemail.com>.
FYI jrebel is not really introducing a framework. It's a jvm agent (command
line argument) that you only use during development.

Jrebel won't be running in production.
On 13 Jun 2014 06:39, "Ilya Obshadko" <il...@gmail.com> wrote:

> Thanks Lance!
>
> I was supposing something like this.
>
> JRebel looks very promising, but well, I don't need this feature that much;
> it might be just a convenient addition, but introducing another framework
> to achieve the result looks like an overkill.
>
>
> On Fri, Jun 13, 2014 at 1:24 AM, Lance Java <la...@googlemail.com>
> wrote:
>
> > I think you'll have troubles getting that to work. Tapestry's been built
> > from the ground up to support live class reloading.
> >
> > Have you seen jrebel? It's a java agent that will do what you want. Nb
> it's
> > not free
> >
> > http://zeroturnaround.com/software/jrebel/
> > On 12 Jun 2014 20:33, "Ilya Obshadko" <il...@gmail.com> wrote:
> >
> > > Hey guys,
> > >
> > > Could anyone explain - is that possible to enable live class reloading
> > for
> > > user-defined packages?
> > >
> > > For example, I would like to implement live reloading for Hibernate
> > > entities and enum classes that I use in my application (the former
> > probably
> > > requires Hibernate re-initialization, while the latter might require
> > > reloading of any other dependent classes). Is it possible to do that?
> > >
> > > Thanks in advance.
> > >
> > > --
> > > Ilya Obshadko
> > >
> >
>
>
>
> --
> Ilya Obshadko
>

Re: live class reloading for custom package

Posted by "Juan E. Maya" <ma...@gmail.com>.
You could also try spring -loaded.
https://github.com/spring-projects/spring-loaded
Notice you don't need to be using spring to get advantage of it

On Fri, Jun 13, 2014 at 7:39 AM, Ilya Obshadko <il...@gmail.com>
wrote:

> Thanks Lance!
>
> I was supposing something like this.
>
> JRebel looks very promising, but well, I don't need this feature that much;
> it might be just a convenient addition, but introducing another framework
> to achieve the result looks like an overkill.
>
>
> On Fri, Jun 13, 2014 at 1:24 AM, Lance Java <la...@googlemail.com>
> wrote:
>
> > I think you'll have troubles getting that to work. Tapestry's been built
> > from the ground up to support live class reloading.
> >
> > Have you seen jrebel? It's a java agent that will do what you want. Nb
> it's
> > not free
> >
> > http://zeroturnaround.com/software/jrebel/
> > On 12 Jun 2014 20:33, "Ilya Obshadko" <il...@gmail.com> wrote:
> >
> > > Hey guys,
> > >
> > > Could anyone explain - is that possible to enable live class reloading
> > for
> > > user-defined packages?
> > >
> > > For example, I would like to implement live reloading for Hibernate
> > > entities and enum classes that I use in my application (the former
> > probably
> > > requires Hibernate re-initialization, while the latter might require
> > > reloading of any other dependent classes). Is it possible to do that?
> > >
> > > Thanks in advance.
> > >
> > > --
> > > Ilya Obshadko
> > >
> >
>
>
>
> --
> Ilya Obshadko
>

Re: live class reloading for custom package

Posted by Ilya Obshadko <il...@gmail.com>.
Thanks Lance!

I was supposing something like this.

JRebel looks very promising, but well, I don't need this feature that much;
it might be just a convenient addition, but introducing another framework
to achieve the result looks like an overkill.


On Fri, Jun 13, 2014 at 1:24 AM, Lance Java <la...@googlemail.com>
wrote:

> I think you'll have troubles getting that to work. Tapestry's been built
> from the ground up to support live class reloading.
>
> Have you seen jrebel? It's a java agent that will do what you want. Nb it's
> not free
>
> http://zeroturnaround.com/software/jrebel/
> On 12 Jun 2014 20:33, "Ilya Obshadko" <il...@gmail.com> wrote:
>
> > Hey guys,
> >
> > Could anyone explain - is that possible to enable live class reloading
> for
> > user-defined packages?
> >
> > For example, I would like to implement live reloading for Hibernate
> > entities and enum classes that I use in my application (the former
> probably
> > requires Hibernate re-initialization, while the latter might require
> > reloading of any other dependent classes). Is it possible to do that?
> >
> > Thanks in advance.
> >
> > --
> > Ilya Obshadko
> >
>



-- 
Ilya Obshadko

Re: live class reloading for custom package

Posted by Lance Java <la...@googlemail.com>.
I think you'll have troubles getting that to work. Tapestry's been built
from the ground up to support live class reloading.

Have you seen jrebel? It's a java agent that will do what you want. Nb it's
not free

http://zeroturnaround.com/software/jrebel/
On 12 Jun 2014 20:33, "Ilya Obshadko" <il...@gmail.com> wrote:

> Hey guys,
>
> Could anyone explain - is that possible to enable live class reloading for
> user-defined packages?
>
> For example, I would like to implement live reloading for Hibernate
> entities and enum classes that I use in my application (the former probably
> requires Hibernate re-initialization, while the latter might require
> reloading of any other dependent classes). Is it possible to do that?
>
> Thanks in advance.
>
> --
> Ilya Obshadko
>

Re: live class reloading for custom package

Posted by Barry Books <tr...@gmail.com>.
You can't do exactly what you asked but you can just make your hibernate
object just a wrapper for your database schema then build a Tapestry
service for the business logic. If you make a schema change or an interface
change you'll have to restart but otherwise not. I often merge the DTO and
business logic into the same service. I'm sure there is some reason why
that's a bad idea but it works pretty well with Tapestry class reloading.

Also my hibernate objects also tend to have at least 5 annotations per
field. They look pretty ugly and this way I rarely have to see them,


On Fri, Jun 13, 2014 at 8:56 AM, Dmitry Gusev <dm...@gmail.com>
wrote:

> JRebel is not the only option, there are some open source alternatives:
>
> http://stackoverflow.com/questions/7998669/redeploy-alternatives-to-jrebel
>
>
> On Fri, Jun 13, 2014 at 5:18 PM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
> > On Thu, 12 Jun 2014 16:32:11 -0300, Ilya Obshadko <
> ilya.obshadko@gmail.com>
> > wrote:
> >
> >  Hey guys,
> >>
> >
> > Hi!
> >
> >
> >  Could anyone explain - is that possible to enable live class reloading
> >> for user-defined packages?
> >>
> >
> > No. Tapestry and Tapestry-IoC can only do that due to having their own
> > classloaders, so classes are changed when loading. It only works when and
> > because Tapestry or Tapestry-IoC are instantiating the classes to be
> > live-class-reloaded.
> >
> >
> >  For example, I would like to implement live reloading for Hibernate
> >> entities and enum classes that I use in my application (the former
> >> probably requires Hibernate re-initialization, while the latter might
> >> require
> >> reloading of any other dependent classes). Is it possible to do that?
> >>
> >
> > Nope. Tapestry's and Tapestry-IoC's live class reloading are very
> specific
> > to their own context (proxied services in Tapestry-IoC, pages, components
> > and mixins in Tapestry). Doing that in a generic way is a way more
> complex
> > problem. As Lance said, JRebel is the way to go for whole JVM live class
> > reloading.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>

Re: live class reloading for custom package

Posted by Dmitry Gusev <dm...@gmail.com>.
JRebel is not the only option, there are some open source alternatives:

http://stackoverflow.com/questions/7998669/redeploy-alternatives-to-jrebel


On Fri, Jun 13, 2014 at 5:18 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Thu, 12 Jun 2014 16:32:11 -0300, Ilya Obshadko <il...@gmail.com>
> wrote:
>
>  Hey guys,
>>
>
> Hi!
>
>
>  Could anyone explain - is that possible to enable live class reloading
>> for user-defined packages?
>>
>
> No. Tapestry and Tapestry-IoC can only do that due to having their own
> classloaders, so classes are changed when loading. It only works when and
> because Tapestry or Tapestry-IoC are instantiating the classes to be
> live-class-reloaded.
>
>
>  For example, I would like to implement live reloading for Hibernate
>> entities and enum classes that I use in my application (the former
>> probably requires Hibernate re-initialization, while the latter might
>> require
>> reloading of any other dependent classes). Is it possible to do that?
>>
>
> Nope. Tapestry's and Tapestry-IoC's live class reloading are very specific
> to their own context (proxied services in Tapestry-IoC, pages, components
> and mixins in Tapestry). Doing that in a generic way is a way more complex
> problem. As Lance said, JRebel is the way to go for whole JVM live class
> reloading.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Re: live class reloading for custom package

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 12 Jun 2014 16:32:11 -0300, Ilya Obshadko  
<il...@gmail.com> wrote:

> Hey guys,

Hi!

> Could anyone explain - is that possible to enable live class reloading  
> for user-defined packages?

No. Tapestry and Tapestry-IoC can only do that due to having their own  
classloaders, so classes are changed when loading. It only works when and  
because Tapestry or Tapestry-IoC are instantiating the classes to be  
live-class-reloaded.

> For example, I would like to implement live reloading for Hibernate
> entities and enum classes that I use in my application (the former  
> probably requires Hibernate re-initialization, while the latter might  
> require
> reloading of any other dependent classes). Is it possible to do that?

Nope. Tapestry's and Tapestry-IoC's live class reloading are very specific  
to their own context (proxied services in Tapestry-IoC, pages, components  
and mixins in Tapestry). Doing that in a generic way is a way more complex  
problem. As Lance said, JRebel is the way to go for whole JVM live class  
reloading.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org