joseph edwards

Greenhorn
+ Follow
since Nov 26, 2005
Merit badge: grant badges
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 joseph edwards

THe performance will depend on the database. Are you using Oracle as the DB?

In Oracle, you may notice a performance benefit if you use the native Oracle Driver APIs to insert an empty clob first, and then update the CLOB afterwards.

However, in MySQL, inserting the CLOB directly may give you better performance.

Originally posted by Christa Koch:
In the application I'm reviewing a clob is written like this:

- insert a row with an empty clob (with EMPTY_CLOB())
- select the clob-column with the empty clob to get the lob locator
- update the row to write the new clob with "meaningful" data

Now I'm told that performance is better when the lob locator is returned by the insert statement. I know that the syntax for the sql is like that:

insert into <table_name> (<attribute list> values(<attributes>,EMPTY_CLOB()) returning <clob column> into clob_selected;

Can anybody help me doing this in Java? I'd appreciate your help very much but don't be angry if I don't reply for hours on end. I'm in Germany and my working day is almost over...

Although I haven't used their SCDJWS simulator, I had used their practice tests to prepare for my SCWCD and SCBCD exams. For the SCWCD / SCBCD exams, I found their simulators to be very helpful and a good reflection of the types of questions you'll find on the actual exams. In fact, I passed the SCWCD / SCBCD on my first attempts, and scored 92% and 88% respectively.

When I take the SCDJWS exam in the next 6 months, I'll defintely give their SCDJWS product a try. Hopefully, they will come out with their SCDJWS simulator by then.


Originally posted by Mudunuri Raju:
Hi,

Did any one use the certgear exam simulators. They were planning to relase SCDJWS exam simulator on 03/2006. http://www.certgear.com/products/info/scdjws.htm

Please let me know if you use any of their products for other exams.

Price seems to be effortable as compared to Whizlabs.

Appreciate the feed back.

Thanks
Raju (SCJP, SCJD, SCEA, SCBCD, Weblogic-7.0)

The best choice of course will depend on your specific needs.

For instance, will you application require distributed transactions or 2 phase commits? Do you have any security requirements, such as authentication and authorization of services? How will your application handle failures, such as network failures or hardware failures, while tasks are being processed? Is there a specific ordering of tasks that must be synchronized, such as task A must be performed before task B? What are the dependencies between the different clients?

As you can see, you'll need to analyze all the other aspects of the system before determining the ideal architecture. Performance is just one aspect of the design.



Originally posted by Allan Sam:
I need to conceive an application which has to get input from a POS terminal or some other server. The application has to communicate with another module residing in a mainframe, get the results and output the response back to the POS terminal. The components with which the application communicates may be non-java components. Please recommend the best architecture for this system. This a performace critical application with the application needing to support 10000+ client hits at a time. Considering these, what technology is best suited? Simple TCP server socket/WebServices/Servlet/CORBA/RMI??

16 years ago
The stubs and skeletons are used to identify the remote connection and session, specifically the location of the distributed objects. This includes ports / ip address / naming information, etc...

In fact, you can examine the contents of the stub and skeleton using a decompiler or a hexeditor. You'll see meta information regarding the location of the objects.

Originally posted by Deepak Vernekar:
Hi,

I have small query regarding the remote interfaces used in the distributed java (RMI and EJB). When we lookup the remote object, why the type cast is done as RemoteInterface. and what is the content of Stub and Skeleton. Please explain this process clearly.

Thanks in Advance.
Deepak

16 years ago
If you know the router's IP address, you can also get the MAC address by using RARP (Reverse Address Resolution Protocol).

Take a look at the jPcap library package, which uses the raw sockets API / libpcap libs, and supports the following protocols Ethernet, IPv4, IPv6, ARP/RARP, TCP, UDP, ICMPv4
The MAC address is part of the layer 2 (data link) layer of the tcp/ip stack. However, the java.net libraries don't really provide access to the lower layers of the tcp/ip packets. Instead, the libraries provide access to layer 3 and layer 4 of the stack, specifically the IP and TCP parameters, such as IP address and ports.

You may want to try java "raw sockets" if you need access to the lower levels of the tcp/ip stack.

Originally posted by Oren Gross:
Hi there, I have heard somewhere that there might be a way to fetch the Router's MAC address from the Request/Session. Anyone knows anything about it?

You should be careful about converting bytes into Strings. This may cause problems when it comes to internationalization and localizations. The conversion needs to take account regional settings and locales.


Originally posted by Tony Evans:
I have a byte[] and I am trying to check to see what data it contains.

checkData(byte [] data)
{
if(data != null && data.length > 0)
{
String dataString = new String(data);
System.out.println("data "+dataString);
}
}

This snippet of code causes a error exception

The code is called via a config so the error is not the actual error but a config error.

What I need to know is what is the best way to convert byte [] into a string.

Thansk for any help Tony

16 years ago
You can convert the ip address in to a 32-bit value. For instance, each tuple in the IP address will be represented as one byte. Once converted, you can do simply integer comparison to see whether a specific IP address falls within a specific range.

For example:

192.168.111.200 = 11000000 10101000 11011111 11001000

Originally posted by Prasann Mathur:
I have an XML file like this . I want to check an IP , say 172.31.1.47 or 192.39.1.89 which is the IP of the client and check whihc range (defined in begin and end tag of nodes) .

Say for an example, Ip 172.31.1.47 falls inside <begin> and<end> value 172.31.1.1 - 172.31.1.254 once it verifies these, it will retrieve all the other attributes of the node.

<?xml version="1.0"?>

<project>
<AppA>
<begin>172.31.1.1</begin>
<end>172.31.1.254</end>
<attribute1>275</attribute1>
</AppA>
<AppB>
<begin>192.39.1.1</begin>
<end>192.39.1.254</end>
<attribute1>285</attribute1>
</AppB>
</project>

Tell me is there any logic to check whether an Ip falls under the begin and end tag Ip address values.

16 years ago
You can try the following:

KeystoreManager.setCacertsFile(cacertsFile);
PrivateKey privKey= KeystoreManager.getPrivKey();
X509Certificate[] certChain = KeystoreManager.getCertChain();

Set the keystore manager to point to the file that contains your keys, and then retrieve the corresponding public and private keys.

Originally posted by James Tikalsky:
This seems like it should be simple, but I'm getting confused. I have a binary file which I've discovered contains two keys: A Master and a Sub.

I've been able to read the file as a byte array from the file system, then add it to the keyStore using the method:


I've verified that the key exists using:



which returns true. I can also delete the key from the keyStore using:



Now, I'd like to use the public key to encrypt a file, but I'm unable to get a reference to the Key using:



Is there something I'm missing?

16 years ago
You can store the encrypted password in the heap, and have each function that needs the password to decrypt the password as a local variable on the stack. As stack memory is very temporary unlike heap memory, the clear-text password will only be visible for a limited amount of time.

Originally posted by Jim Frank:
I have to get rid of a password in memory after decrypted and used. The password is encypt and decrypt with JCE. I was thinking such:

StringBuffer x = Pass.decrypt();

//use it

for(d=0; d<x.length();d++)
x.setCharAt(d,'X');

x=null;

I guess I have to do the same thing to the decrypted password in the decrypt() method.

Any thoughts?

16 years ago
This isn't that hard to do. Just download the file in to a temporary directory, and call the following API:

Runtime.getRuntime().exec ("FILE_PATH");
16 years ago
The reason why the byte [] to String conversions may not always work reliably is due to internationalization & localization support.

Specifically, the conversion may result in different Strings if your locale was set to Japan versus North America.

It is best to avoid such byte [] to String conversions, especially if you plan to internationalize your application.

Originally posted by Thanga prakash Somasundaram:
Hi all,

Currently we are working with JDK 1.3 base version. We are planning to go for JDK 1.5 Tiger.

I found one of the issues as String to byte[] and viceversa, leads to improper string.

Please, highlight your experience / guide for the same..

thanks in advance,

regards,
stp.

16 years ago