Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » TENEO problems on HOT redeploy
TENEO problems on HOT redeploy [message #880695] |
Sat, 02 June 2012 18:26 |
Cristian Prevedello Messages: 33 Registered: June 2011 |
Member |
|
|
We are using teneo to persist our data model.
The entire application is hosted inside a j2ee container (glassfish v3.1).
We are experiencing problems on hot redeploy. As soon we try to use any class from the model, we get a cast exception.
For each entity, we have an interface
public interface Dicitura extends EObject
and a corresponding implementation class
public class DicituraImpl extends EObjectImpl
and the exception we get is that DicituraImpl cannot be casted to Dicitura.
so we have to stop the application server and restart, that's pretty annoying and time wasteful.
anyone experiencing a similar issue?
UPDATE: After some more extended testing, on latest teneo version, we experienced different issues on hot redeploy (EClasses can't be found in the package).
So, my question is, how should be handled an hot redeploy? When an hot redeploy happens, it seems registered packages are gone.
So whenever i need to get a datastore i do something like this
hbds=HbHelper.INSTANCE.getDataStore("xx");
if (hbds == null )
{
hbds = (HbDataStore)HbHelper.INSTANCE.createRegisterDataStore("xx");
.
.
.
hbds.setEPackages(new EPackage[]{ DefaultnamePackage.eINSTANCE});
hbds.initialize();
}
But doing so it's not enough, since it seems newly registered package references somehow old classes,
Should i to call *public static DefaultnamePackage init() * somehow again?
What about the eInstance set on jvm startup?
thank you.
[Updated on: Sun, 03 June 2012 08:38] Report message to a moderator
|
|
|
Re: Cast exception on redeploy [message #880947 is a reply to message #880695] |
Sun, 03 June 2012 13:04 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Cristian,
I have not heard of this exception/use case before... I guess that the Dicitura interface is reloaded while the
DicituraImpl still holds a reference to an old Dicitura definition. I am not familiar with hot redeploy, I guess that
somehow there is still a reference to the 'previous' class hierarchy somewhere, maybe/probably from Teneo...
gr. Martin
On 06/02/2012 08:26 PM, Cristian Prevedello wrote:
>
> We are using teneo to persist our data model.
>
> The entire application is hosted inside a j2ee container (glassfish v3.1).
>
> We are experiencing problems on hot redeploy. As soon we try to use any class from the model, we get a cast exception.
>
> For each entity, we have an interface
> public interface Dicitura extends EObject
>
> and a corresponding implementation class
>
> public class DicituraImpl extends EObjectImpl
>
> and the exception we get is that DicituraImpl cannot be casted to Dicitura.
>
> so we have to stop the application server and restart, that's pretty annoying and time wastful.
>
> anyone experiencing a similar issue?
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| |
Re: Cast exception on redeploy [message #881293 is a reply to message #881284] |
Mon, 04 June 2012 09:40 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Cristian,
When doing hot redeploy are you also starting out with new Teneo data stores? Teneo caches classes in other locations
also, but if these 'other' places are redeployed also it should work fine. So the only starting point where things can
go wrong I guess is the datastore.
Texo roadmap, see this very small list:
http://wiki.eclipse.org/Texo#Future_Topics
Texo starts out as a server side logic but will move to the client more and more. Supporting both RCP as well as web
clients. My day-to-day work is in web-based ERP/business administration systems, so that's my main focus for Texo to
make EMF technology available for the web world (following standards common in the web-world).
Here are some Texo blog posts:
http://martintaal.wordpress.com/category/texo/
Incubation is indeed a scary word :-), just as the version number which is 0.1.. There are several people using Texo, I
am not sure if they have gone live already. But afaics the technology should be considered stable enough for production
usage, but that's just my opinion ofcourse...
Last week the test coverage of Texo has increased very much using now around 50 testmodels running through JPA/ORM and
JSON testcases. The number of testcases has gone up from 130 to 370+. If you have public models then I am happy to add
them to the Texo test framework.
See this relevant last post I did on Texo on the EMFT newsgroup:
http://www.eclipse.org/forums/index.php/m/880129/
One thing to remember is that Texo generates JPA/ORM standard java code, so if you don't want to do any 'model stuff' at
runtime then there are no Texo dependencies, making it even less risky than Teneo...
gr. Martin
On 06/04/2012 11:26 AM, Cristian Prevedello wrote:
> Thank you for your reply. Yes that's exactly what's happening (or the way around, the interface is cached, while the
> implementation is reloaded).
>
> But i have no clue how to fix it.
>
> We are pondering to move to Texo so, but we are a bit scared by the fact the project is still in incubation.
>
> is there a roadmap?
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: Cast exception on redeploy [message #881848 is a reply to message #881293] |
Tue, 05 June 2012 11:11 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Christian,
See this other post, the case/solution in there might also be relevant for your issue/problem:
http://www.eclipse.org/forums/index.php/mv/msg/358675/881824/#msg_881824
gr. Martin
On 06/04/2012 11:40 AM, Martin Taal wrote:
> Hi Cristian,
> When doing hot redeploy are you also starting out with new Teneo data stores? Teneo caches classes in other locations
> also, but if these 'other' places are redeployed also it should work fine. So the only starting point where things can
> go wrong I guess is the datastore.
>
> Texo roadmap, see this very small list:
> http://wiki.eclipse.org/Texo#Future_Topics
>
> Texo starts out as a server side logic but will move to the client more and more. Supporting both RCP as well as web
> clients. My day-to-day work is in web-based ERP/business administration systems, so that's my main focus for Texo to
> make EMF technology available for the web world (following standards common in the web-world).
>
> Here are some Texo blog posts:
> http://martintaal.wordpress.com/category/texo/
>
> Incubation is indeed a scary word :-), just as the version number which is 0.1.. There are several people using Texo, I
> am not sure if they have gone live already. But afaics the technology should be considered stable enough for production
> usage, but that's just my opinion ofcourse...
>
> Last week the test coverage of Texo has increased very much using now around 50 testmodels running through JPA/ORM and
> JSON testcases. The number of testcases has gone up from 130 to 370+. If you have public models then I am happy to add
> them to the Texo test framework.
>
> See this relevant last post I did on Texo on the EMFT newsgroup:
> http://www.eclipse.org/forums/index.php/m/880129/
>
> One thing to remember is that Texo generates JPA/ORM standard java code, so if you don't want to do any 'model stuff' at
> runtime then there are no Texo dependencies, making it even less risky than Teneo...
>
> gr. Martin
>
> On 06/04/2012 11:26 AM, Cristian Prevedello wrote:
>> Thank you for your reply. Yes that's exactly what's happening (or the way around, the interface is cached, while the
>> implementation is reloaded).
>>
>> But i have no clue how to fix it.
>>
>> We are pondering to move to Texo so, but we are a bit scared by the fact the project is still in incubation.
>>
>> is there a roadmap?
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| |
Re: Cast exception on redeploy [message #883013 is a reply to message #882994] |
Thu, 07 June 2012 16:33 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Christian,
No problem, you are correct with your remark about the pojos, the standard JPA/ORM persistence does not use Texo, EMF or
Teneo.
So you are completely right that Texo is much more thin than Teneo and there is no extra overhead compared to handcoding
pojos.
Only if you want to use the model layer at runtime, then you add overhead but that's usefull for json/xml serialization,
for just standard JPA/ORM this runtime Model layer is not used.
gr. Martin
On 06/07/2012 05:49 PM, Cristian Prevedello wrote:
> Sorry for the late reply, and thank You for your answer and the post forward. I'll take a look.
>
> About early adoption about Texo: correct me if i'm wrong, but Texo just generates entity beans, that are pojo, and in
> case of trouble they can by fixed by hands.
>
> Texo is much more thin than Teneo, and has basically no overhead and it's not built on a runtime framework. So as soon
> as the pojo classes are correctly annotated we should be good, right?
>
> or do you foresee any other areas of potential troubles? thank you for time and reply.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Goto Forum:
Current Time: Mon May 06 03:28:00 GMT 2024
Powered by FUDForum. Page generated in 0.04260 seconds
|