Dhananjay Ghanwat

Greenhorn
+ Follow
since Dec 23, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dhananjay Ghanwat

Can i attemp for IBM 486 only or I have to appear for all the 4 test for IBM Enterprise Application Developer
Thanks Ramakrishnan,

I would like to know the concept of how does the EJB Container manages the state.

Regards,
Dhananjay
How is the state of the Stateful session bean maintained. Like how an HttpSession can be maintained using URL rewriting or cookies.
Similary how does EJB container identifies the Stateful Session Bean for a unique client.

Also what would be the timeout period for a Stateful Session Bean.

Thank you
Dhananjay G.
How do i connect to Oracle with Jboss
I think i have made all the changes to config files

oracle-service.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<server>

<!-- ==================================================================== -->
<!-- ConnectionManager setup for Oracle dbs -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- Thanks to Steven Coy -->
<!-- ==================================================================== -->

<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=OracleDS">


<!-- Include a login module configuration named OracleDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:

<application-policy name = "OracleDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
</login-module>
</authentication>
</application-policy>

NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->

<application-policy name = "OracleDbRealm">
<authentication>
<login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password"></module-option>
<module-option name ="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=OracleDS
</module-option>
</login-module>
</authentication>
</application-policy>

<!--uncomment out this line if you are using the OracleDbRealm above-->
<attribute name="SecurityDomainJndiName">OracleDbRealm</attribute>

<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=OracleDS">

<attribute name="JndiName">OracleDS</attribute>

<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc racle:thin:@dstm2:1521 stm7i</config-property>
<config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String"></config-property>
<config-property name="Password" type="java.lang.String"></config-property>
</properties>

</attribute>

<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>

<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=OracleDS">

<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>

</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>

<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>

<attribute name="TransactionManager">java:/TransactionManager</attribute>

<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>

</mbean>


</server>

oracle-ds.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
<!-- !DOCTYPE datasources SYSTEM "Z:\jboss\docs\dtd\jboss-ds_1_0.dtd" -->
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc racle:thin:@aaa:1521 B</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name></user-name>
<password></password>
<min-pool-size>0</min-pool-size>
<max-pool-size>40</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
</local-tx-datasource>
</datasources>

login-config.xml

<application-policy name = "OracleDbRealm">
<authentication>
<login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">d7i0517</module-option>
<module-option name = "userName">d7i0517</module-option>
<module-option name = "password">d7i0517</module-option>
<module-option name ="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=OracleDS
</module-option>
</login-module>
</authentication>

standardjbosscmp-jdbc.xml
<datasource>java:/OracleDS</datasource>
<datasource-mapping>Oracle8</datasource-mapping>

standardjaws.xml

<datasource>java:/OracleDS</datasource>
<datasource-mapping>Oracle8</datasource-mapping>


it gives me an error

15:13:50,419 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.
2.2/server/default/deploy/oracle-service.xml
org.jboss.deployment.DeploymentException: create operation failed for package fi
le:/C:/jboss-3.2.2/server/default/deploy/oracle-service.xml; - nested throwable:
(org.jboss.deployment.DeploymentException: Trying to install an already registe
red mbean: jboss.jca:service=LocalTxCM,name=OracleDS)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:202)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:476)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
92)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:976)
at $Proxy0.start(Unknown Source)

and is connected to the default hypersonic database
20 years ago
Hi,
Can some one hep me around this exception.
java.rmi.NoSuchObjectException: Bean has been deleted.
java.rmi.NoSuchObjectException: Bean has been deleted. at weblogic.ejb20.swap.DiskSwap.read(DiskSwap.java:172)
at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSessionManager.java:271)
at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:341)
at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:127)
at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:179)
at bweb.control.ejb.fi.trans.voucher.VoucherEJB_597fz_EOImpl.resetVoucher(VoucherEJB_597fz_EOImpl.java:598)
at bweb.control.ejb.fi.trans.voucher.VoucherEJB_597fz_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:157)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:127) at bweb.control.ejb.fi.trans.voucher.Voucher_WLStub.resetVoucher(Unknown Source) at bweb.taglib.UpdateSessionTag.resetVoucher(UpdateSessionTag.java:72) at bweb.taglib.UpdateSessionTag.doEndTag(UpdateSessionTag.java:48) at jsp_servlet._docroot.__menu._jspService(__menu.java:129) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:543) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:369) at bweb.taglib.InsertTag.doEndTag(InsertTag.java:86) at jsp_servlet._docroot.__template._jspService(__template.java:200) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306) at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDispatcherImpl.java:342) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:252) at bweb.control.web.MainServlet.doGet(MainServlet.java:167) at bweb.control.web.MainServlet.doPost(MainServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
We are using Web logic 7
I am getting a strange Error while inserting a set of Records
I am doing batc update
using Statement.executeBatch()
It gives me Invalid Cursor State Exception.
Hi ,
This shouldn't be problem with the database,
Check you driver documents and whether the support this type of Result Set
Hi,
We are facing a problem for Connection time out. I think this is beacuse at some point the connection object is not getting closed. But I am finding it very difficult to debug this as the Connection objects are called from many places.
We have a single class for getting the connection object. I tried by giving SOP s before getConnection() and Return Connection(), but still not possible to debug.
Can somebody help me in this case ??
Use JSP forward when you want pass any object apart between two pages without using session
you can use request.setAttribute() then forward
forward is faster than sendRedirect as it happens in the server without coming to client.
21 years ago
JSP
Use Custom Tags when you want to help your VIEW with some processing.
Use Java Beans when you want to help your BUSINESS with some processing
21 years ago
JSP
Hi
An object that implements the HttpSessionListener interface is notified when a session is created or destroyed in its web app context
It can be used to track how many users are currently logged in the system by keeping an counter in the object that implements the Listener and then subsequently incrementing / decrementing it in the appropriate methods
21 years ago
JSP
How can I configure SSL using Tomcat 4.1 server.
21 years ago
JSP
Thanks ,I know this is a design flaw to keep in Servlet context but i have far exceeded the point to change it to session.
I didn't understand Ravish Kumar's statement
Can you kindly explain why only when the first user chnages it will be updated and why not by the Second user.
21 years ago
JSP
Hi ,
can some one hlep me out with this problem.
I have an object in Servlet context scope,
and I have 2 Users logged on to my system.
If one of the User updates any property of the object in Servlet context will the Second user be able to get the Latest (I mean modified by the First User) data.
Or do all users have to Log out and then Log in again.
Thanks in advance.
21 years ago
JSP
Browser is IE 6.0
on Windows 2000
21 years ago
JSP