`
zhangjunyuan
  • 浏览: 9875 次
  • 性别: Icon_minigender_1
  • 来自: 兰州
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

配置GateIn Portal为oracle10g或Sql Server2008

阅读更多

  又要开发portal了,最近下载了GateIn with JBoss AS 5.1.0 JDK6 (zip)进行试用,可是按照GateIn的官方文档进行数据库配置,在oracle10g下试了几次都不成功,于是换成了Sql Server2008,结果很快成功了,于是得到启发,可能是数据库原因,查了下问题,才知道oracle10g下有个序列创建不了,最后手动创建了一个序列,OK,居然成功了,在此记录下我的经验。
    GateIn Portal最新版3.1下载地址
http://www.jboss.org/gatein/downloads
解压到磁盘,如D:\
一、创建用户名为jdbcjcr_portal的数据库(确保数据库拥有DBA权限)
二、根据以下语句创建序列(Sql Server2008下不需要)
-- Create sequence
create sequence JCR_SVALUE_SEQ
minvalue 1
maxvalue 999999999999999999999999999
start with 2
increment by 1
nocache;


-- Create sequence
create sequence HIBERNATE_SEQUENCE
minvalue 1
maxvalue 999999999999999999999999999
start with 2
increment by 1
nocache;
三、修改D:\GateIn-3.1.0-GA\server\default\conf\gatein\configuration.properties中的JCR和IDM两部分内容
# JCR
#gatein.jcr.config.type=local
#gatein.jcr.datasource.name=java:jdbcjcr
#gatein.jcr.datasource.dialect=auto
#gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
#gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
#gatein.jcr.datasource.username=sa
#gatein.jcr.datasource.password=

#oracle 10g配置
gatein.jcr.config.type=local
gatein.jcr.datasource.name=java:jdbcjcr
gatein.jcr.datasource.dialect=auto
gatein.jcr.datasource.driver=oracle.jdbc.driver.OracleDriver
gatein.jcr.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
gatein.jcr.datasource.username=jdbcjcr_portal
gatein.jcr.datasource.password=111111

gatein.jcr.data.dir=${gatein.data.dir}/jcr
gatein.jcr.storage.data.dir=${gatein.jcr.data.dir}/values
gatein.jcr.cache.config=classpath:/conf/jcr/jbosscache/${gatein.jcr.config.type}/config.xml
gatein.jcr.lock.cache.config=classpath:/conf/jcr/jbosscache/${gatein.jcr.config.type}/lock-config.xml
gatein.jcr.index.data.dir=${gatein.jcr.data.dir}/lucene
gatein.jcr.index.changefilterclass=org.exoplatform.services.jcr.impl.core.query.DefaultChangesFilter
gatein.jcr.index.cache.config=classpath:/conf/jcr/jbosscache/cluster/indexer-config.xml
gatein.jcr.jgroups.config=classpath:/conf/jcr/jbosscache/cluster/udp-mux.xml

# IDM
#gatein.idm.datasource.name=java:jdbcidm
#gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
#gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
#gatein.idm.datasource.username=sa
#gatein.idm.datasource.password=

#oracle 10g配置
gatein.idm.datasource.name=java:jdbcidm
gatein.idm.datasource.driver=oracle.jdbc.driver.OracleDriver
gatein.idm.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
gatein.idm.datasource.username=jdbcjcr_portal
gatein.idm.datasource.password=111111


# EMail
gatein.email.smtp.username=
gatein.email.smtp.password=
gatein.email.smtp.host=smtp.gmail.com
gatein.email.smtp.port=465
gatein.email.smtp.starttls.enable=true
gatein.email.smtp.auth=true
gatein.email.smtp.socketFactory.port=465
gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
四、直接去掉D:\GateIn-3.1.0-GA\server\default\deploy下的gatein-sample-portal.ear包和hsqldb-ds.xml文件
五、运行run.bat
六、在浏览器中输入http://localhost:8080/portal即可访问GateIn Portal了

 

分享到:
评论
2 楼 ufidanc 2011-10-12  
非常感谢,学习中,gatein,只能是Oracle和mssql吗?
能用MySQL吗?我改为MySQL,它找不到驱动。
1 楼 solomon 2011-08-08  
  好文,学习了。

相关推荐

Global site tag (gtag.js) - Google Analytics