<< 30-August-2008 : bevinbot on #glassfish at freenode [download] [back] >>
 
 
time nick message

12:55

<ankylose1>

why toplink doesn't fire event :(

12:55

<ankylose1>

i have 3 session

12:55

<ankylose1>

one ServerSession and two ClientSession

12:55

<ankylose1>

i can add listener for each

12:55

<ankylose1>

and no one event is fired

12:56

<ankylose1>

it's obscure

13:12

<ankylose1>

beatjunkie: you know toplink ?

13:14

<beatjunkie>

Yes, toplink-essentials.

13:17

<ankylose1>

have you already write a SessionEventListener

13:18

<ankylose1>

no event is fired except postLogin

13:19

<ankylose1>

s/is/are/

13:19

<ankylose1>

i speak english like french cow

13:24

<beatjunkie>

no, i haven't written a SessionEventListener yet

13:24

<beatjunkie>

do you use toplink as a jpa provider?

13:25

<ankylose1>

no

13:25

<ankylose1>

on a standalone application

13:26

<ankylose1>

i have decided to rewrite my application without glassfish because i am too newbies to understand ejb :)

13:27

<ankylose1>

i write a rmi server

13:27

<ankylose1>

but i keep toplink

13:28

<ankylose1>

http://pastebin.us/?show=d5e74dc78

13:29

<ankylose1>

see i write a SessionEventListener to know what's fired

13:30

<ankylose1>

okay it's strange

13:30

<ankylose1>

:)

13:30

<ankylose1>

see the output now

13:31

<ankylose1>

http://pastebin.us/?show=d1581c3a2

13:32

<beatjunkie>

and what output are you expecting?

13:32

<ankylose1>

i i have a beginning idea about my pain

13:33

<ankylose1>

i write on output the session hashcode at 3 time on my code

13:33

<ankylose1>

3 session where i add the listener

13:33

<ankylose1>

but i see other hashcode when event is fired

13:33

<ankylose1>

!

13:34

<ankylose1>

the first hashcode is the session customized by SessionCustomizer

13:34

<ankylose1>

the ServerSession i think no ?

13:34

<ankylose1>

[SESSION] entity manager:11498200

13:35

<ankylose1>

that is a ((EntityManagerImpl) em).getSession()

13:36

<ankylose1>

on my code i create 2 EntityManager and 1 ServreSession

13:37

<ankylose1>

but other session exist for these purpose

13:37

<ankylose1>

beatjunkie: you see ?

13:40

<beatjunkie>

perhaps when the internal state of a session will be changed then the hashcode will also be changed.

13:41

<ankylose1>

oh shti

13:41

<ankylose1>

shit*

13:41

<ankylose1>

why all event aren't fired !

13:44

<ankylose1>

okay i past a most detailled output

13:45

<ankylose1>

http://pastebin.us/?show=d477200d1

13:48

<beatjunkie>

can you also post the code that creates the session(s)

13:49

<ankylose1>

the persistence.xml create the first session and after EntityManager instance create Session

13:50

<ankylose1>

beatjunkie: i understand now

13:50

<ankylose1>

the first BEGIN event isn't fired

13:51

<ankylose1>

but postAcquireUnitOfWork and postAcquireClientSession is fired

13:54

<beatjunkie>

what do you mean with "the first begin event"? - the output looks in my poor opinion

13:54

<beatjunkie>

s/looks/looks good

13:54

<ankylose1>

begin event isn't fired

13:55

<ankylose1>

when i do em.getTransaction().begin()

13:55

<ankylose1>

no event is fired

13:55

<beatjunkie>

i see, you mean preBeginTransaction

13:56

<ankylose1>

yes

13:56

<ankylose1>

it's fired after commit() on my code :)

13:58

<ankylose1>

i can't use that on my business logic :)

13:59

<beatjunkie>

i think this events come from jdbc and starting a jpa transaction doesn't mean that a jdbc transaction will be started

13:59

<ankylose1>

yes

14:00

<ankylose1>

why toplink delegate jdbc event ... i want toplink event and not jdbc event :)

14:02

<beatjunkie>

i don't know

14:02

<ankylose1>

i have an another question

14:02

<ankylose1>

what is the java persistence api equivalent for UPDATE

14:03

<ankylose1>

em.persist(em.merge(entity)); ?

14:04

<beatjunkie>

no, you can just use em.merge(entity) or em.persist(entity).

14:06

<ankylose1>

em.persist(entity) doesn't work if the object is not under the manager contex

14:08

<beatjunkie>

if you work with detached entities than you have to use the merge method

14:08

<ankylose1>

okay

14:08

<beatjunkie>

merge can be used for inserts and updates

14:09

<ankylose1>

and if entities are attached i need or i can use persist

14:13

<beatjunkie>

you can be you don't have to

14:13

<beatjunkie>

/s/be/but

14:13

<ankylose1>

? :/

14:14

<ankylose1>

sometime i have problem with language grade on documentation :/

14:22

<ankylose1>

okay i'm going to eat thank you beatjunkie

14:22

<beatjunkie>

bye, you welcome

16:21

<Konvik_Offishall>

any idea for a richfaces skinned command button

17:06

<[pwgr]>

me yawns

17:08

<Konvik_Offishall>

<[pwgr]>:hey do you use richfaces

17:08

<Konvik_Offishall>

?

17:15

<[pwgr]>

Konvik_Offishall: no, i'm doing very little web based stuff at the moment

17:15

<[pwgr]>

sorry

17:15

<Konvik_Offishall>

ic

17:15

<Konvik_Offishall>

tnx

20:43

<nmatrix9>

anyone have any insight as to what this error means

20:43

<nmatrix9>

Exception in thread "main" java.lang.NullPointerException

20:43

<nmatrix9>

at org.glassfish.maven.plugin.command.AsadminCommand.execute(AsadminCommand.java:78)

20:50

<nmatrix9>

in the context of glassfish what exactly is a domain?

20:53

<[pwgr]>

null pointer exception probably caused by a missing argument somewhere in your asadmin command

20:53

<[pwgr]>

(just a guess)

20:55

<[pwgr]>

nmatrix9: i dont know the exact definition of "domain" but it's in the SJAS deployment guide and I believe has a pretty complex definition :)

20:55

<nmatrix9>

[pwgr], what I need right now is less complexity

20:56

<nmatrix9>

[pwgr], it seems these developers are in love with their own complexity

20:57

<[pwgr]>

ugh, i know that scenario

20:57

<[pwgr]>

a domain is kind of like a server or collection of servers with their own configuration

20:57

<[pwgr]>

but, i guess with that explanation the question then becomes what is a "server" :)

20:58

<nmatrix9>

[pwgr], I'm just trying to run this "simple" and I use that term loosely maven glassfish plugin

20:59

<nmatrix9>

https://maven-glassfish-plugin.dev.java.net/

21:00

<[pwgr]>

"An administrative domain (or simply domain) is a group of server instances that are administered together. A server instance belongs to a single administrative domain. The instances in a domain can run on different physical hosts."

21:01

<[pwgr]>

nmatrix9: ok, i have no experience with that plugin... but it looks like a wrapper for asadmin

21:01

<[pwgr]>

and if you're getting null pointer exceptions when using it... i'm not the least bit surprised :(

21:02

<nmatrix9>

[pwgr], maven - configuration overload

21:02

<[pwgr]>

yes, i like to avoid unnecessary complexity... maven isone of those things i avoid

21:03

<[pwgr]>

it offers me absolutely NO value that i cant achieve in other ways with less complexity and fiddliness

21:03

<[pwgr]>

and bugginess

21:04

<nmatrix9>

[pwgr], I was going through it before and I can see how it can dramatically speed up things (when everything works as advertised) but when it doesn

21:04

<nmatrix9>

'

21:04

<nmatrix9>

t

21:04

<nmatrix9>

prepare to get frustrated

21:04

<[pwgr]>

when you install glassfish using a nondistribution specific method... you download the package, run the package which uncompresses into a "glassfish home" and then you're supposed to run a setup.xml script with ant

21:04

<[pwgr]>

that setup.xml script goes through the process of setting up a single domain

21:04

<nmatrix9>

[pwgr], in the glassfish folder?

21:05

<[pwgr]>

yeah... in the glassfish home dir there is a directory called domains

21:05

<[pwgr]>

and in that domains directory are directories for each domain

21:05

<nmatrix9>

theres domain 1 for mine

21:05

<[pwgr]>

by default setup.xml creates a single domain called domain1

21:05

<nmatrix9>

domain1

21:05

<[pwgr]>

yeah

21:05

<nmatrix9>

ok yeah thats my primary domain

21:05

<[pwgr]>

so, in a simple dev environment, you'd only have a single install of glassfish and it would have a single domain

21:06

<[pwgr]>

so, you can setup multiple domains and adminster them seperately

21:06

<nmatrix9>

ok I understand

21:06

<[pwgr]>

start/stop them seperately... configure them separately

21:06

<rasputnik>

nmatrix9, a domain is 'all the stuff an admin server can administer'

21:06

<rasputnik>

so could be mulitple clusters, standalone server instances, etc.

21:06

<nmatrix9>

the maven plugin is asking for two paraemters

21:07

<nmatrix9>

domain and glassfishdirectory

21:07

<[pwgr]>

rasputnik: he said earlier he's trying to avoid that complexity so i dont think those defs help him

21:07

<nmatrix9>

glassfishdirectory is simple

21:07

<nmatrix9>

I entered that parameter

21:07

<[pwgr]>

nmatrix9: it's asking for a domain, or a domain directory ?

21:07

<nmatrix9>

but domain now that is the problem

21:07

<rasputnik>

sorry, miles away :)

21:07

<[pwgr]>

the domain would be "domain1" whilc the domain directory would be <glassfish directory>/domains/domain1

21:08

<nmatrix9>

[pwgr], hmmm that could probally be why I entered simply /opt/glassfish

21:08

<nmatrix9>

for glassfish directory

21:08

<[pwgr]>

that sounds right

21:09

<nmatrix9>

also entered domain1 for domain parameter and all I get is Exception in thread "main" java.lang.NullPointerException

21:09

<nmatrix9>

at org.glassfish.maven.plugin.command.AsadminCommand.execute(AsadminCommand.java:78)

21:11

<[pwgr]>

heh, looking at the config example on the webpage... it looks like they use more than just the glassfish dir and the domain

21:12

<[pwgr]>

maybe you are not specifying enough config params

21:13

<[pwgr]>

it would be quite typical of that crap to do NO validation on config params and just throw NPEs at you

21:31

<nmatrix9>

[pwgr], bah guess I'll have to finish this book with other plugin

21:45

<nmatrix9>

*sigh nmatrix9 does not want to use jetty

21:45

<[pwgr]>

jetty isnt bad

21:45

<[pwgr]>

are you trying to setup a continuous integration environment or something ?

21:53

<nmatrix9>

[pwgr], just trying to figure out how the hell you stop jetty once it's running in myeclipse maven goal

21:53

<nmatrix9>

[pwgr], theres a run goal but no stop?

21:53

<[pwgr]>

oh

21:57

<nmatrix9>

I think it's incredibly stupid there isn't a shutdown or stop goal by default

21:57

<nmatrix9>

I can't think of any other word to call it

21:57

<nmatrix9>

maybe more pc term is "short sighted"

21:57

<nmatrix9>

but then again I'm seeing that in a lot of other developer projects

21:58

<[pwgr]>

maybe they are waiting for you to write it

Drone v1.4 © 2002-2005 Uwyn RIFE powered