Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 31F532009E8 for ; Mon, 30 May 2016 14:49:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 30704160A19; Mon, 30 May 2016 12:49:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 76185160A16 for ; Mon, 30 May 2016 14:49:05 +0200 (CEST) Received: (qmail 95295 invoked by uid 500); 30 May 2016 12:49:04 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 95280 invoked by uid 99); 30 May 2016 12:49:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2016 12:49:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 900A71A11D9 for ; Mon, 30 May 2016 12:49:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.821 X-Spam-Level: X-Spam-Status: No, score=-0.821 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=objectstyle.org header.b=L3GwijC1; dkim=pass (1024-bit key) header.d=messagingengine.com header.b=BsxAOUcu Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id EgWrc0GEvlAU for ; Mon, 30 May 2016 12:49:01 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 819815F245 for ; Mon, 30 May 2016 12:49:01 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 9C4FD20366 for ; Mon, 30 May 2016 08:48:55 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 30 May 2016 08:48:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=objectstyle.org; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=qCf3axLtXWPAGIZAzzZRuA6NMU8=; b=L3Gwij C1Q34j+SE5LeMLgjqb10b1MRlz+Xei2N+XKVauGCPL87pUSmcaruiZvYkGpl+Fb2 ARIkp4B7TzglpjdnlAkfxKn53M2WGB8/r/M1v7Ul7Y9cvqoIi97mK+fTcu3gn/2Y ZKqfV4GnAcHt6t8xmHXzRHUcnzN951Qfc5eTw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=qCf3axLtXWPAGIZ AzzZRuA6NMU8=; b=BsxAOUcukZ3y1huKg9B/7VkIe8VpyJIEHfr15fJZatphlkR KHCtmDcKTpS2sR7/TGeq3ka0cP5NypoQVFEw9RIXj9ccxIkchenWz7v9GJZPTbm8 tzgbSa0Rxg0ACLUe1pezO2ReaphY9cojulM7JzyOuHzExwNF68WT11wmNPIE= X-Sasl-enc: brR7zjx7yqWbaR8b5DyKuoZPh7wEtfoTgq8zCtnwXWA6 1464612535 Received: from [192.168.1.29] (unknown [37.17.49.228]) by mail.messagingengine.com (Postfix) with ESMTPA id 1CF48F2A57 for ; Mon, 30 May 2016 08:48:54 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Dynamically reloading the model on change From: Andrus Adamchik In-Reply-To: <5954B38C-D8AD-407F-8F62-24B8A661FE6B@karlmenn.is> Date: Mon, 30 May 2016 15:48:52 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <01F17D00-DBCD-4A77-9534-A6090B7AE938@objectstyle.org> References: <39634F75-DDA4-4F2B-9A8C-96141C7AA011@karlmenn.is> <02613541-E9F6-4AFE-9E67-754A548D84BE@objectstyle.org> <5954B38C-D8AD-407F-8F62-24B8A661FE6B@karlmenn.is> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.3124) archived-at: Mon, 30 May 2016 12:49:06 -0000 In a typical app ServerRuntime is a singleton controlled by your code. = You are probably creating it explicitly in your app somewhere on = startup. Or are you relying on CayenneFilter to bootstrap Cayenne? (in = which case runtime is accessible via WebUtil.getCayenneRuntime(..)). Andrus > On May 30, 2016, at 3:44 PM, Hugi Thordarson wrote: >=20 > I currently use JRebel for class reloading when developing WO. It has = a relatively simple plugin API that can be used to watch changes to = Cayenne project files and trigger stuff on file/class modification. It = could replace the ServerRuntime instance, but it would need some way to = know what ServerRuntime instances to replace with a new instance. This = could be specified in a configuration file=E2=80=94or is there some way = for me to retrieve all ServerRuntime instances related to the modified = entities? >=20 > - hugi >=20 >=20 >=20 >> On 30. ma=C3=AD 2016, at 12:31, Andrus Adamchik = wrote: >>=20 >> Doable in theory - just create a new runtime every time you detect a = change. The bigger question is how practical this is, considering you = also need to reload Java classes. I guess also doable if you run in = debug mode that does class reloading. >>=20 >> Andrus >>=20 >>> On May 30, 2016, at 3:27 PM, Hugi Thordarson = wrote: >>>=20 >>> Hi all, >>> I=E2=80=99ve been working with Ebean for the past couple of months = (customer unfortunately mandated the use of Ebean). I don=E2=80=99t = really like working with it, but it has one feature that I really = like=E2=80=94I can change model classes at will (add attributes, = relationships etc.) and the changes take effect immediately, i.e. I = don=E2=80=99t need to restart the application. >>>=20 >>> Is it possible to do something similes in Cayenne? I.e., can I make = changes to the model and then reload the runtime, or something of the = ilk? >>>=20 >>> Cheers, >>> - hugi >>=20 >=20