Praison Selvaraj

Ranch Hand
+ Follow
since Jun 05, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Praison Selvaraj

Hi Soumik,

I would suggest MS Visio.

Each of the visio digrams (class diagram, component, diagram, sequence diagrams...) must be exported to JPG or Gif and then included in HTML (use an authoring tool...I used MS Word and saved the doc as a web page. Make sure that the generated HTML does not have any width/height attributes in the IMG tags)

Thanks,
Praison
Hi,

Components in one layer must talk to the components in immediately adjacent layers only.

MDB is an integration tier component.

package com.sapadapter.poc;

import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.resource.ResourceException;
import javax.resource.cci.ConnectionFactory;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import com.sap.mw.jco.JCO.Exception;
import javax.resource.cci.Connection;
import javax.resource.cci.Interaction;
import javax.resource.cci.IndexedRecord;
import javax.resource.cci.MappedRecord;
import javax.resource.cci.Record;
import javax.resource.cci.RecordFactory;


public class TestServlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse respone) {
try {
InitialContext initialContext = new InitialContext();
ConnectionFactory connFactory;

System.out.println("Beginning...");
Object objRef = initialContext.lookup("ibmsapadapter");
System.out.println("lookup done...");
connFactory = (ConnectionFactory) objRef;
System.out.println("connFactory: " + connFactory.toString());
Connection con = connFactory.getConnection();
System.out.println("Connection: " + con);
Interaction action = con.createInteraction();
System.out.println(" action: " + action);
javax.resource.cci.Record inRec = null;
javax.resource.cci.Record outRec = null;


/*
* IndexedRecord inRec = connFactory.getRecordFactory()
* .createIndexedRecord("input");


SAPInteractionSpec is = new SAPInteractionSpec();
is.setFunctionName("GET");*/


RecordFactory rf = connFactory.getRecordFactory();
MappedRecord input = rf.createMappedRecord("ZCSSI_BR_COMP_VALIDATION");
input.put("IM_BRANCH", "03");
input.put("IM_COMPANY", "M65");

// inRec = new Record();

String requestStr = "<ZCSSI_BR_COMP_VALIDATION ><IM_BRANCH>03</IM_BRANCH><IM_COMPANY>M65</IM_COMPANY></ZCSSI_BR_COMP_VALIDATION>";

Record rec=null;

action.execute(null,input);

//IndexedRecord response = (IndexedRecord) action.execute(is, rec);

//System.out.println(response.getRecordName());
} catch (ResourceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
}


throws this exception

[6/3/11 10:14:43:028 PDT] 00000016 SystemOut O Beginning...
[6/3/11 10:14:43:108 PDT] 00000016 SystemOut O lookup done...
[6/3/11 10:14:43:109 PDT] 00000016 SystemOut O connFactory: com.ibm.j2ca.sap.SAPConnectionFactory@7df87df8
[6/3/11 10:14:43:140 PDT] 00000016 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet ibmsap1 in application ibmsapEAR. Exception created : java.lang.NoClassDefFoundError: com.sap.mw.jco.JCO$Exception
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at com.ibm.j2ca.sap.SAPManagedConnectionFactory.createManagedConnection(SAPManagedConnectionFactory.java:72)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2032)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1709)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2465)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1057)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:696)
at com.ibm.j2ca.base.WBIConnectionFactory.getConnection(WBIConnectionFactory.java:74)
at com.adp.sapadapter.poc.TestServlet.doGet(TestServlet.java:33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1589)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:870)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3799)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:930)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:182)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: java.lang.ClassNotFoundException: com.sap.mw.jco.JCO$Exception
at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 35 more


Please help me resolve [6/3/11 10:14:43:028 PDT] 00000016 SystemOut O Beginning...
[6/3/11 10:14:43:108 PDT] 00000016 SystemOut O lookup done...
[6/3/11 10:14:43:109 PDT] 00000016 SystemOut O connFactory: com.ibm.j2ca.sap.SAPConnectionFactory@7df87df8
[6/3/11 10:14:43:140 PDT] 00000016 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet ibmsap1 in application ibmsapEAR. Exception created : java.lang.NoClassDefFoundError: com.sap.mw.jco.JCO$Exception
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at com.ibm.j2ca.sap.SAPManagedConnectionFactory.createManagedConnection(SAPManagedConnectionFactory.java:72)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2032)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1709)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2465)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1057)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:696)
at com.ibm.j2ca.base.WBIConnectionFactory.getConnection(WBIConnectionFactory.java:74)
at com.adp.sapadapter.poc.TestServlet.doGet(TestServlet.java:33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1589)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:870)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3799)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:930)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:182)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: java.lang.ClassNotFoundException: com.sap.mw.jco.JCO$Exception
at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 35 more


I have no clue as to why this is happening...Please advice
13 years ago
Thank you, Tim.

One question I have is, will the redirect mean that a redirect request will be sent to the browser?

If that is the case, then it would become an overhead....

Cheers,
Praison
14 years ago
JSF
Hi All,

This is the scenario:

A facelet has a command link (part of a menu bar). When this link is clicked the URL in the address bar is not changing to the URL that is being requested. It is displaying the URL that was requested previously.

Clicking on the same link again changes the URL to what is being requested now.

The idea is to use the URL in a filter to perform authorization. As the URL is not the current one, this will lead to inconsistent results.

What needs to be done to ensure that the current URL gets displayed in the address bar (and not the previous one)?

Thanks,
14 years ago
JSF
Hi Maja,

The JEE Tutorial is a good one that I'd used.
http://download.oracle.com/docs/cd/E17477_01/javaee/5/tutorial/doc/bnayk.html

Cheers,
Praison
14 years ago
Hi,

I meant, whether the underlying tables have indexes?

Create the indexes and check if the indexes are making the query to execute any faster?

Thanks,
Praison
Hi Eshwar,

1. Is the Id column the primary key in Table A and id column in table B the corresponding foreign key?
2. Is the date column part of the key? If not create an index on the date column.

Cheers,
Praison
Congrats!!!

Cheers,
Praison
Hi Sagar,

Here's the extract from the certification site http://in.sun.com/training/certification/java/scwcd.xml

"Prior to attempting certification, candidates must be certified as a Sun Certified Programmer (SCJP), any edition."

Cheers,
Praison
Which is the best UML Modelling Tool you have come across?

Here are a few that I evaluated.
1. StarUML
2. Visual Paradigm's SDE
3. TopCased
4. Microsoft Visio

I finally decided on Visio. Its simple and feature-rich. ( a personal opinion though)

Thanks,
Praison
Hi Raj,

A composite entity still holds good in JEE 5.0. Consider an entity User (mapped to the User table), which has among other properties a property called billingInfo (mapped to the billing table), preferences (mapped to the preferences table) etc. The Entity 'User' is a Composite Entity.

Thanks,
Praison
Hi Chelaru, I would say that if a relation exists between two entities, then such a relationship should be retained in the solution too. The directions uni or bi may not matter so much (a personal opinion though). But, as long as you have an explanation for your choices, all should be fine.

Cheers,
Praison