I have wrote HAR and after deployment into jboss4.0.2 default conf. I have such 
output


  | 13:14:27,234 INFO  [Hibernate] Using JDBC batch size : null
  | 13:14:27,234 INFO  [Configuration] Searching for mapping documents in jar: 
DealerService.har
  | 13:14:27,234 INFO  [Configuration] Found mapping documents in jar: 
ru/zenith/dealer/service/hibernate/Operatio.hbm.xml
  | 13:14:27,296 INFO  [HbmBinder] Mapping class: 
ru.zenith.dealer.service.hibernate.Operatio -> OPERATIO
  | 13:14:27,296 INFO  [Configuration] Found mapping documents in jar: 
ru/zenith/dealer/service/hibernate/PriceUpdateSoapBean.hbm.xml
  | 13:14:27,328 INFO  [HbmBinder] Mapping class: 
ru.zenith.dealer.service.hibernate.PriceUpdateSoapBean -> PriceUpdateSoapBean
  | 13:14:27,328 INFO  [Configuration] Found mapping documents in jar: 
ru/zenith/dealer/service/hibernate/Refgood.hbm.xml
  | 13:14:27,359 INFO  [HbmBinder] Mapping class: 
ru.zenith.dealer.service.hibernate.Refgood -> REFGOOD
  | 13:14:27,390 INFO  [Configuration] Found mapping documents in jar: 
ru/zenith/dealer/service/hibernate/Serno.hbm.xml
  | 13:14:27,406 INFO  [HbmBinder] Mapping class: 
ru.zenith.dealer.service.hibernate.Serno -> SERNO
  | 13:14:27,421 INFO  [Configuration] Found mapping documents in jar: 
ru/zenith/dealer/service/hibernate/Specific.hbm.xml
  | 13:14:27,437 INFO  [HbmBinder] Mapping class: 
ru.zenith.dealer.service.hibernate.Specific -> SPECIFIC
  | 13:14:27,453 INFO  [Configuration] processing extends queue
  | 13:14:27,453 INFO  [Configuration] processing collection mappings
  | 13:14:27,453 INFO  [HbmBinder] Mapping collection: 
ru.zenith.dealer.service.hibernate.Operatio.specific -> SPECIFIC
  | 13:14:27,453 INFO  [HbmBinder] Mapping collection: 
ru.zenith.dealer.service.hibernate.Specific.serno -> SERNO
  | 13:14:27,453 INFO  [Configuration] processing association property 
references
  | 13:14:27,453 INFO  [Configuration] processing foreign key constraints
  | 13:14:27,453 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 13:14:27,468 INFO  [DatasourceConnectionProvider] Using datasource: 
java:/OracleDS
  | 13:14:27,468 INFO  [SettingsFactory] RDBMS: Oracle, version: Oracle9i 
Enterprise Edition Release 9.2.0.1.0 - Production
  | With the Partitioning, OLAP and Oracle Data Mining options
  | JServer Release 9.2.0.1.0 - Production
  | 13:14:27,468 INFO  [SettingsFactory] JDBC driver: Oracle JDBC driver, 
version: 9.2.0.3.0
  | 13:14:27,484 INFO  [Dialect] Using dialect: 
org.hibernate.dialect.Oracle9Dialect
  | 13:14:27,484 INFO  [SettingsFactory] JDBC batch size: 15
  | 13:14:27,484 INFO  [SettingsFactory] JDBC batch updates for versioned data: 
disabled
  | 13:14:27,484 INFO  [SettingsFactory] Scrollable result sets: enabled
  | 13:14:27,484 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
  | 13:14:27,484 INFO  [SettingsFactory] Aggressive release : enabled
  | 13:14:27,484 INFO  [SettingsFactory] Default schema: TRATE
  | 13:14:27,484 INFO  [SettingsFactory] Default batch fetch size: 1
  | 13:14:27,484 INFO  [SettingsFactory] Generate SQL with comments: disabled
  | 13:14:27,484 INFO  [SettingsFactory] Order SQL updates by primary key: 
disabled
  | 13:14:27,484 INFO  [SettingsFactory] Query translator: 
org.hibernate.hql.ast.ASTQueryTranslatorFactory
  | 13:14:27,484 INFO  [ASTQueryTranslatorFactory] Using 
ASTQueryTranslatorFactory
  | 13:14:27,484 INFO  [SettingsFactory] Query language substitutions: {}
  | 13:14:27,484 INFO  [TransactionFactoryFactory] Transaction strategy: 
org.hibernate.transaction.JTATransactionFactory
  | 13:14:27,484 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 13:14:27,484 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: 
org.hibernate.transaction.JBossTransactionManagerLookup
  | 13:14:27,484 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
  | 13:14:27,484 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: 
org.hibernate.transaction.JBossTransactionManagerLookup
  | 13:14:27,484 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
  | 13:14:27,484 INFO  [SettingsFactory] Automatic flush during 
beforeCompletion(): enabled
  | 13:14:27,484 INFO  [SettingsFactory] Automatic session close at end of 
transaction: enabled
  | 13:14:27,484 INFO  [SettingsFactory] Second-level cache: enabled
  | 13:14:27,484 INFO  [SettingsFactory] Query cache: disabled
  | 13:14:27,484 INFO  [SettingsFactory] Cache provider: 
org.hibernate.cache.HashtableCacheProvider
  | 13:14:27,484 INFO  [SettingsFactory] Optimize cache for minimal puts: 
disabled
  | 13:14:27,484 INFO  [SettingsFactory] Structured second-level cache entries: 
enabled
  | 13:14:27,484 INFO  [SettingsFactory] Echoing all SQL to stdout
  | 13:14:27,515 INFO  [SettingsFactory] Statistics: disabled
  | 13:14:27,515 INFO  [SettingsFactory] Deleted entity synthetic identifier 
rollback: disabled
  | 13:14:27,515 INFO  [SettingsFactory] Default entity-mode: pojo
  | 13:14:27,531 INFO  [SessionFactoryImpl] building session factory
  | 13:14:28,531 INFO  [SessionFactoryObjectFactory] Not binding factory to 
JNDI, no JNDI name configured
  | 13:14:28,531 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 13:14:28,531 INFO  [SessionFactoryImpl] Checking 0 named queries
  | 13:14:28,546 INFO  [Hibernate] SessionFactory successfully built and bound 
into JNDI [java:/hibernate/DealerServiceFactory]
  | java:/hibernate/DealerServiceFactory
  | 
As you can see the last string is about the JNDI name of my SessionFactory.
After that I try to lookup this factory object in ejbCreate() of my stateless 
session bean :

  |         InitialContext ctx;
  |             try {
  |                     ctx = new InitialContext();
  |                 SessionFactory sessionFactory =(SessionFactory)
  |                             
ctx.lookup("java:/hibernate/DealerServiceFactory");
  |                     if (this.sessionFactory==null){
  |                             logger.error("sessionFactory is null");
  |                     }
  |             } catch (NamingException e) {
  |                     logger.error(e);
  |             }
  | 
and my session factory is null. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877121#3877121

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877121


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to