fox hk

Greenhorn
+ Follow
since Nov 12, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by fox hk

Hi ias experts
Please help on following questions
1) Does any one know how to set isolation level of ejb / an app with ias 6.5 ?
2) what are the differences between "free-pool-size" and "ready-pool-size"? l have idea about read-pool-size but have no idea about what is "free-pool-size" and what it is used for. They are 2 tags of ias6.5 for configuring ejb
regards
fox
21 years ago
Hi All
l am migrating an application from other app server to iPlanet 6.5. l hit a hassle. My app always ran into TransactionRolledBackException as a use case deleted a record and then inserted a record with same primary key with the use of CMP. In fact, both delete / insert operations were done within same transaction. It is quite perplexing problem to me. l have enabled iPlanet 6.5's transaction monitoring and tracing feature. However, l found the info logged is not detailed enough. May l know is there any way to trace all sql statements issued by iPlanet for CMP ? It is very thankful one can share with me your knowledge on this issue.
regards
fox
21 years ago
Dear David
thank you a lot for your answers to my posted question. They really help me very much
As in your reply, <ejb-name> will be the JNDI of registered ejb. l become kind of confused about this. Because as far as l know, most of app server will allow to set the JNDI name other than <ejb-name> in its app server specific descriptor.
In addition, below snippet is cut from descriptors from an e.g (ias-samples\j2eeguide\enroller\) coming with iAS.
ejb-jar.xml
<ejb-jar>
<display-name>j2eeguide-enrollerEjb</display-name>
<enterprise-beans>
<entity>
<ejb-name>StudentEJB</ejb-name>
<home>j2eeguide.enroller.StudentHome</home>
<remote>j2eeguide.enroller.Student</remote>
<ejb-class>j2eeguide.enroller.StudentEJB</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>false</reentrant>
<ejb-ref>
<ejb-ref-name>ejb/MyEnroller</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>j2eeguide.enroller.EnrollerHome</home>
<remote>j2eeguide.enroller.Enroller</remote>
<ejb-link>EnrollerEJB</ejb-link>
</ejb-ref>
<resource-ref>
<description></description>
<res-ref-name>jdbc/CollegeDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
<session>
<ejb-name>EnrollerEJB</ejb-name>
<home>j2eeguide.enroller.EnrollerHome</home>
<remote>j2eeguide.enroller.Enroller</remote>
<ejb-class>j2eeguide.enroller.EnrollerEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<description></description>
<res-ref-name>jdbc/CollegeDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
.........
ias-ejb-jar.xml
<ias-ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>StudentEJB</ejb-name>
<guid>{f85f34ad-3c45-1a41-c9a8-080020c058b0}</guid>
<pass-timeout>0</pass-timeout>
<is-thread-safe>false</is-thread-safe>
<pass-by-value>false</pass-by-value>
<pool-manager>
<factory-class-name></factory-class-name>
<commit-option>COMMIT_OPTION_C</commit-option>
<Ready-pool-timeout>0</Ready-pool-timeout>
<Ready-pool-maxsize>0</Ready-pool-maxsize>
<free-pool-maxsize>1</free-pool-maxsize>
</pool-manager>
<ejb-ref>
<ejb-ref-name>ejb/MyEnroller</ejb-ref-name>
<jndi-name>ejb/EnrollerEJB</jndi-name>
</ejb-ref>
<resource-ref>
<res-ref-name>jdbc/CollegeDB</res-ref-name>
<jndi-name>jdbc/j2eeguide/CollegeDB</jndi-name>
</resource-ref>
</entity>
<session>
<ejb-name>EnrollerEJB</ejb-name>
<guid>{b9deb571-3c45-1a41-aa98-080020c058b0}</guid>
<pass-timeout>0</pass-timeout>
<is-thread-safe>false</is-thread-safe>
<pass-by-value>false</pass-by-value>
<session-timeout>0</session-timeout>
<resource-ref>
<res-ref-name>jdbc/CollegeDB</res-ref-name>
<jndi-name>jdbc/j2eeguide/CollegeDB</jndi-name>
</resource-ref>
</session>
................
If according to your previous answer (<ejb-name> is equal to JNDI), the ias-ejb-jar.xml should be changed as follows:
<ejb-ref-name>ejb/MyEnroller</ejb-ref-name>
<jndi-name>EnrollerEJB</jndi-name>

why ???
It is highly appreciated you can help me to clear up some conceptual stuff
thx
fox
21 years ago
Hi all iAS expert
It is highly appreciated one can teach me how to get around below problem
l deployed an app using "/" as context root. But the iAS could respond to any HTTP request.
However, as l changed the context root to sth other than root. iAS responded properly.
Can someone help me get around this problem ?
thank you a lot
fox
21 years ago
Hi all iAS expert

It is very thankful one can provide me with answers to my below questions.
How can l configure the JNDI of session/entity bean ?
l have looked into DTD definitions of all xml doc of iAS6.5. In particular, l paid
special attention to DTDs of ias-ejb-jar.xml and property-file-name.xml. There seems no way to
set the JNDI location of session / entity bean. How can l use "ejb-ref" in ejb-jar.xml /
web.xml to map to the actual JNDI location of EJB.
thanks you a lot !
dso
21 years ago
Dear David
thank you very much for your quick reply. After l deployed the petstore app installed along with ias, l came across some puzzling setting. It is very thankful you can give me some idea why it is this case.
1) according to admin / developer guide of ias6.5, it seems that ias6.5 only supports commit option c. But l find following setting in a ias-ejb-jar.xml
<entity>
<ejb-name>TheOrder</ejb-name>
<guid>{701A16D4-352F-18AB-E469-080020877B69}</guid>
<pass-timeout>0</pass-timeout>
<is-thread-safe>false</is-thread-safe>
<pass-by-value>false</pass-by-value>
<pool-manager>
<factory-class-name></factory-class-name>
<commit-option>COMMIT_OPTION_B</commit-option>
<Ready-pool-timeout>0</Ready-pool-timeout>
<Ready-pool-maxsize>0</Ready-pool-maxsize>
</pool-manager>
Also at p423 of "devloper's guide", l found following setting
<entity>
<ejb-name>TheAccount</ejb-name>
<guid>{deadbabe-ab3f-11d2-98c5-999999990000}</guid>
<pass-timeout>100</pass-timeout>
<is-thread-safe>false</is-thread-safe>
<pass-by-value>false</pass-by-value>
<pool-manager>
<commit-option>NO_CACHE_READY_INSTANCE</commit-option>
<Ready-pool-timeout>0</Ready-pool-timeout>
<Ready-pool-maxsize>0</Ready-pool-maxsize>
</pool-manager>
why ?
2) Also, in ias-web.xml, l found following
<session-info>
<impl>lite</impl>
<dsync-type>dsync-local</dsync-type>
<timeout-type>last-access</timeout-type>
<secure>false</secure>
But after petstore was deployed, l found at iAST, mode of the application components of pestore.war package (webTierEntryPoint and populateServlet) are set to "distributed". Why ?
Also, what does "dsync-local" mean ? does this mean this app will not support failover as deployed to iAS
3) where can l find the DTD of all xml configuration files needed for iAs. Some info can be found at the developer's guide. But the problems with the dev's guide seems not that detailed. Because in Q1 l raised out, the dev guide doesn't mention such values are supported for those tag.
thanks a million !
fox
21 years ago
Dear David
thank you very much for your detailed explanation. But l still have a few questions, it is highly appreciated you can drop a few comments on them.
1) As l checked the manul, your book and ias samples, it seems that only the servlet can be set sticky as following eg in ias-web.xml file.
Is there any similar tag in ias-ejb-jar.xml which is used for enabling the sticky behaviour of session/entity bean ? Or setting the servlet "sticky" can make all calls to EJB from this servlet happen within same JVM ?
<servlet>
<servlet-name>populateServlet</servlet-name>
<guid>{396803E0-246D-11D5-A09C-0010A4C4735E}</guid>
<validation-required>false</validation-required>
<servlet-info>
<sticky>true</sticky>
<encrypt>false</encrypt>
<number-of-singles>10</number-of-singles>
<disable-reload>false</disable-reload>
</servlet-info>
</servlet>
2) If there are many servlets defined in my web.xml, not all servlets are set as "sticky" but all of them will reference "httpsession" object. what happen ? Is there any difference if
"lite" or "distributed" is used for "session-info" tag.
<session-info>
<impl>lite</impl>
........
21 years ago
Hi all
It is very thankful some one can provide me with answer to following questions. The iAs is version 6.5
1) If a component is set using "sticky load balancing". Requests of same sessin will be sent to same JVM. If my app is composed of jsp/servlet, session and entity bean. Will all calls from jsp/servlet to session and entity bean happen in same JVM if sticky load balancing is used? (As you see, it is not a must for entity/session bean reside in same JVM).
2) If not so, is there any way to configure the ias to achieve the invocations of same session -- (servlet/jsp --> stateful/stateless session bean --> entity bean)almost happen in same JVM
3) If l remember correctly that ias6.5 only support "commit-option" C, is there any way to leverage cache machanism in persistence layer
thx a lot
fox hk
21 years ago
Hi all j2ee guru
As l went through the a few manuals of iplanet 6.5. l have a few questions in mind. It is highly appreciated somebody can share with me your insight into following questions
1) In some samples come along with iplanet 6.5, in their ias-web.xml and web.xml, the web app are set as "distributable". Also, all servlets are set "sticky". My question is why the JSP don't need to be set as "sticky". If l have a web site made up of serveral ten of thousand of JSP pages, it will be a big trouble to explicitly set each page as "sticky" ??
2) Technically, are there any difference in setting the web app as "distributable" and setting servlet / jsp explicitly as "sticky" ?
3) Let's say, if the sample include a stateful session bean, do l have to set that stateful session bean to "sticky". If so,
does it mean the invocation from servlet to stateful session bean and from stateful session to CMP/BMP will take place in same JVM process.
4.1) how can l config the iplanet to make the invocation from session bean to entity bean take place in same VM
4.2) how can l config the iplanet to make the invocation from servlet to EJB including session bean and entity bean take place in same VM
4.3) how can l config the iplanet to direct the requests from same session to same JVM including HTTP session / stateful session bean.
5) Is there any latency as session is synchronized by "dsync" process. If the application is set as "distributable" (support load-balancing), but the servlet is NOT set as sticky. Will it cause any trouble due to latency of synchronization of session among iplanet servers
6) l find that l can't clear up all concept of iplanet merely studying its manual. Are there any good material / website for iplanet. Please provide them to me
thanks a lot
fox
21 years ago
Dear David
thx a lot for your advice. In fact, l have already checked the log file before, it can startup properly. Would u please telling me where l can get LDAP browser ?
By the way, Yesterday, l just brought the book, iplanet app server: Design and Building J2EE app written by u.
regards
Danny
21 years ago
It is very thankful someone can kindly provide insight into following questions
1)
At installation of directory server which is part of installation of
iplanet app server, l need to assign id / password to following

* Administrator for the Configuration Directory Server (default is
"admin/admin")
* Administrator for the Directory Server directory data, this
"superuser" is
identified by the Directory Manager Distinguished Name (DN) (default is
"cn=Directory Manager / DManager").
The Configuration Directory Server is the part of the Directory Server
used to store configuration information. The Directory Server also
stores directory data.
What is the difference between these 2 accounts ? It seems that both are
administrator account . But config dir server seems part of the dir
server. The DN seems an entry in dir server and what is the purpose of
first account (admin of config dir server)
?

2) when l tried to kick off iplanet admin server as follows, l got
following errors

iplanet@node0 /d99/iplanet/ias6> start-admin
admin40_check_ds_availability_init(): WARNING: Configuration Directory
Server is down or unreachable (Can't contact LDAP server)
Info: Cache expiration set to 600 seconds
Warning! admin40_task_eval_init(): unable to set User/Group baseDN
iPlanet-WebServer-Enterprise/4.1SP3 BB1-09/17/2000 01:08
startup: listening to http://xyz.mycompany.com
<http://xyz.mycompany.com>; , port 28498 as iplanet

Although, it is warned that the configuration LDAP server seemed down.
But l could find the LDAP server using "ps" command and l checked the
log file for LDAP service, it seemed ok.
iplanet@node0 /d99/iplanet/ias6> ps -ef | grep
slapd
iplanet 9519 9450 0 14:45:48 pts/2 0:00 grep slapd
iplanet 9376 1 0 13:02:39 ? 0:01 ./ns-slapd -D
/d99/iplanet/ias6/slapd-xyz -i /d99/iplanet/ias6/slapd-web
Log file content:

[14/Nov/2002:13:02:39 +0800] - iPlanet-Directory/5.0 ServicePack 1
B2001.264.142
5 starting up
[14/Nov/2002:13:02:40 +0800] - slapd started. Listening on all
interfaces port
389 for LDAP requests
Any idea about the failure to reach the configuration dir server ???
many thanks !
dso
21 years ago
Hi all j2ee guru.
l installed iplanet 6.5 on a solaris 8 box. After installation, l can run the "fortune" sample to quickly test out successful setup. However, as l try out various iplanet command at command prompt, l encountered lots of error message as follows
1) when l used "iasdeploy" to try to deploy sample "Helloworld" application, following error message occured.
[
iasdeploy for iPlanet Application Server 6.5
Could not connect to LDAP server on xyz.test.com. port 389...retrying
Could not connect to LDAP server on xyz.test.com. port 389...retrying
Could not connect to LDAP server on xyz.test.com. port 389 as user cn=Directory Manager : Can't connect to the LDAP server
GXBindInit: GXBindBasic failed
GXContextInit: GXBindInit failed 2
[12/Nov/2002 17:42:20:0] error: ENGINE-context_init_failed: EngineClassSpace ContextModule.createContextInit failed:
error: could not get context
java.lang.NullPointerException
at com.kivasoft.tools.KSReg.getSubKey(Unknown Source)
at com.kivasoft.tools.KSReg.getSubKey(Unknown Source)
at com.iplanet.ias.tools.iascli.DestInfo.initialize(Unknown Source)
at com.iplanet.ias.tools.iascli.DestInfo.initLocalHost(Unknown Source)
at com.iplanet.ias.tools.iascli.DestInfo.<init>(Unknown Source)
at com.iplanet.ias.tools.iascli.IasCommand.getDestInfo(Unknown Source)
at com.iplanet.ias.tools.iascli.IasCommand.preExecute(Unknown Source)
at com.iplanet.ias.tools.buzz.cli.DeployAppCommand.preExecute(Unknown Source)
at com.iplanet.ias.tools.iascli.IasCommand.execute(Unknown Source)
at com.iplanet.ias.tools.iascli.IasCommandLineHandler.executeCommand(Unknown Source)
at com.iplanet.ias.tools.iascli.IasCommandLineHandler.execute(Unknown Source)
at com.iplanet.ias.tools.buzz.cli.IasDeploy.main(Unknown Source)
]
2) l used "ps" command to verify exisitence of LDAP server. Result is as follows. Why the owner of this process of "iplanet" even l run LDAP startup script in "root" identity ???
[
root@node0 /d01/iplanet/ias6/ias/bin> ps -ef | grep slapd
iplanet 7908 1 0 17:17:38 ? 0:01 ./ns-slapd -D /d01/iplanet/ias6/slapd-websams-ed -i /d01/iplanet/ias6/slapd-web
root 8477 7522 0 17:47:34 pts/3 0:00 grep slapd
]
3) then l tried out "iascontrol" command to try to shutdown an instance of iplanet app server. Following errors occured
Could not connect to LDAP server on xyz.test.com. port 389...retrying
Could not connect to LDAP server on xyz.test.com. port 389...retrying
Could not connect to LDAP server on xyz.test.com. port 389 as user cn=Directory Manager : Can't connect to the LDAP server
GXBindInit: GXBindBasic failed
GXContextInit: GXBindInit failed 2
[12/Nov/2002 17:53:18:7] error: ENGINE-context_init_failed: EngineClassSpace ContextModule.createContextInit failed:
error: could not get context
Error in command. Please check arguments.
It is very thankful someone can help me out !!!
fox
21 years ago