-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: cannot lockup SessionFactory out side jboss
PostPosted: Sat Sep 18, 2004 12:02 am 
Newbie

Joined: Sun Nov 23, 2003 8:08 am
Posts: 1
Location: Nam Dinh - Viet Nam
sorry for my bad english if u don't understand

i've follow instruction at http://hibernate.org/66.html, using jboss 4.0.rc2 to deploy caveator.sar (i am also use your caveatemptor POJOs).

i have some problem,
1, some class' id property don't have setter method -> some reflect probs, so i have to put some setter for each POJO

2, i have <depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends> in /META-INF/jboss-service.xml
but it doesn't wait for MySqlDS, so i have delete caveator.sar, wait and undo delete it each time i start jboss AS

3, i can lockup SessionFactory inside jboss (use a jsp at a webapp), but when i lockup outside (in main() of a test class) i've got following things
mycode:
Code:
Hashtable init = new Hashtable();
init.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
init.put(Context.PROVIDER_URL,   "jnp://localhost");
Context context = new InitialContext(init);
//testing
System.out.println(context.lookup("hibernate/HibernateFactory"));

and here is the output:
Code:
2004-09-18 10:50:46,660 WARN net.sf.hibernate.impl.SessionFactoryObjectFactory[main] - Not found: 40e4e48cff0f88d000ff0fa20ff90002
null


thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 18, 2004 4:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
The SessionFactory is not remote-accessible, only inside of the container.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.