Red5 + Groovyfixed oflaDemo + groovy JPA EclipseLink + Derby integration

37 views
Skip to first unread message

iongion

unread,
Jan 26, 2010, 6:47:00 PM1/26/10
to red5, mon...@gmail.com
Had some real pain these past day with an attempt to get a less
verbose than java programming language work with red5 (in my view so
far, groovy).

To spear others from loosing the time i did, here is what happened:

1) I have modified oflaDemo a bit to be groovyDemo, a simple groovy
only application as the original oflaDemo was pretty incomplete in
respect to groovy (not such a big deal, just copy paste java files and
rename them to *.groovy plus some little cleanups)
- This way Application.groovy, DemoService.groovy both work with
http://localhost:5080/demos/ofla_demo.html if you connect to
rtmp://localhost/groovyDemo

2) Solving the groovy issues i thought on moving further so after
reading a bit about ORM tools in Java, decided to go the JPA and
choose as a provider the EclipseLink plus the embedded version of
Apache Derby self contained database with self contained driver

I modeled two widely used Author/Book entities and their relations
with JPA annotations.
Now hell happens, there is no way to make EclipseLink aware of the
entity classes (it cannot find them, and behind the scenes i switched
to Hibernate and the same thing happens, it cannot find the entity
classes)

I conclude this is either a Red5's Spring or a Groovy classeLoader
issue (the same utility class that is used to test JPA, if run from
console, it works flawlesly, but not under red5)
You can find this package with the files here, i don't how much they
keep it it there: http://www.mediafire.com/?oovyhxejuwg

I have reopened a red5: groovy update ticket (http://trac.red5.org/
ticket/567) to put groovy on a higher version that 1.5 (meaning to
put it on 1.7)
It absolutely works without any problems, all red5 tests pass

If any of you know how to make the entities available this would
really increase the quality of this sample.

Please mondain, even if not fixing JPA (is beyond my knowledge) you
can fetch and update the Application.groovy and DemoService.groovy in
oflaDemo to give it full groovy support.
Keep up the great work!

Everson Alves

unread,
Aug 7, 2011, 6:26:51 AM8/7/11
to red5in...@googlegroups.com, mon...@gmail.com
Hello iongion,

Was you able to run Groovy for Red5 in a productive manner? I am starting a new project and would love to use groovy instead of plain java, if possible.
Reply all
Reply to author
Forward
0 new messages