<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=GB2312" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
See the inline response....<br>
<br>
Il 27/05/2010 10:51, Xu Hui Sheng ha scritto:
<blockquote cite="mid:201005271651322486797@163.com" type="cite">
  <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
  <meta content="MSHTML 6.00.2900.5945" name="GENERATOR">
  <style>@font-face {
        font-family: ËÎÌå;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @ËÎÌå;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
  </style>
  <div><font size="2" color="#000080" face="Verdana">Hi Andrea,</font></div>
  <div>&nbsp;</div>
  <div><font color="#000080">Export service is much easier than handle
the persistence layer.</font></div>
</blockquote>
Yeah, i know.... it's exactly what i'm doing now... but i'm not
exposing the original jbpm services, because some<br>
objects used in jbpm signature API are directly bound to hibernate so
they could be not fully initialized (CGLib proxied<br>
and so on ) so exposing a similar interface as OSGi could result in
unexpected results...<br>
<br>
This is the reason why at the moment i'm exposing ( not directly JBPM
API ) but a mine custom API as OSGi services.<br>
So improving jbpm code to be not so coupled with hibernate could help a
lot towards an OSGi integration<br>
<br>
<br>
<blockquote cite="mid:201005271651322486797@163.com" type="cite">
  <div>&nbsp;</div>
  <div><font color="#000080">Hibernate is truely hard to integrate into
OSGi environment.&nbsp; Since it just store the classname as String and
initialize instance everytime.&nbsp; I don't know other JPA framework could
handle this.</font></div>
</blockquote>
<br>
Yes it's. EclipseLink is at the moment well integrated within OSGi. BTW
don't know if you know but in the OSGi Enterprise Specification, there's<br>
a formal specification that address the integration between JPA and
OSGi, and explain how to do that...<br>
Probably this is an Hibernate related question but i don't really know
if Hibernate Team has in it's plan... to implement this, or to work this<br>
<br>
<blockquote cite="mid:201005271651322486797@163.com" type="cite">
  <div>&nbsp;</div>
  <div><font color="#000080">And in the jBPM 4, there is still some
classloader issue for running on&nbsp;OSGi environment.&nbsp; Or Maybe we should
provide an OSGi platform with jbpm as a system package.&nbsp; So we needn't
worry about the classloader issues.</font></div>
  <div>&nbsp;</div>
</blockquote>
<br>
Yes... the problems within OSGi are not only related to hibernate, but
to jbpm too... Classloadin issue are present also when you get custom
handlers<br>
within an OSGi environent.<br>
<br>
As i said before also for this, i managed this problem keeping jbpm,
hibernate ( their dependencies ) and the custom handlers incapsulated
in a<br>
whole bundle...<br>
<br>
I'm not sure what do you mean when you're proposing to provide "jbpm as
system packages" but i would really prefer to have a roadmap from
hibernate and <br>
jbpm team to get two of my favourite frameworks to work with OSGi.<br>
<br>
<br>
Andrea<br>
</body>
</html>