Vladimir Ergovic

Ranch Hand
+ Follow
since Apr 22, 2001
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 Vladimir Ergovic

You can use hibernate synchronizer or some other plugin (hibernate tools) for Eclipse. IBM haven't yet put plugin for hibernate inside RAD, I guess they are waiting EJB3.
Here is sample:
Go to Java perspective
Right click on project1
Select properties then J2EE tab for context root type ramina
18 years ago
Sorry folks, this is not new topic it should be reply on RAD/JSF Managed Beans. Please move this.

Thx!
18 years ago
When I was exploring JSF inside WSAD I used first one. Recently IBM published RAD programming guide (which is general).

WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects, SG24-6361-00

Rational Application Developer V6 Programming Guide, SG24-6449-00

http://www.redbooks.ibm.com
18 years ago
A. She has the best look.
19 years ago
If you sign the applet you can access properties. Then you can read vendor and java version.
This peace of code prints out all available props.
Properties p = System.getProperties();
Enumeration en = p.keys();
while (en.hasMoreElements()) {
String kys = "" + en.nextElement();
System.out.println(" * " + kys + " - " + p.getProperty(kys));
}
20 years ago
java -Xms256m -Xmx512m ..
first is start heap size
second is max heap size - if you use more memory you will get OutOfMemory exception
20 years ago
You have framework to read Excell files on jakarta it is POI.
Try jcrontab framework - it is free, and you will have unix-like cron file to setup whgat you need !
20 years ago
You need to be more specifc (what database, driver, servlet container, OS). You can try to add inserts in the batch but I doubt that it can help you.
20 years ago
It is MVC framework for building web apps.
It has ActionServlet which servers as controler and in struts-config.xml you map your Actions (code to perform - commands).
you have specific taglibs which you can use they are quite helpfull but you have to learn them. Plus you have Forms (javabeans) which are populated automaticly if you have the same names for the fields as in HTML (to use struts taglibs is really helpfull in this case). DynaBeas let you specify fields in external files so you don't have to code it!
20 years ago
Yes it can. The best way and the easiest is by using JMS. Remember to use COM.ibm.db2.jdbc.DB2XADataSource for db2 and register IBM MQ to for JMS.
Some sample source:
javax.transaction.UserTransaction ut;
javax.sql.DataSource ds;
java.sql.Connection dcon;
java.sql.Statement stmt;
javax.jms.QueueConnectionFactory qcf;
javax.jms.QueueConnection qcon;
javax.jms.Queue q;
javax.jms.QueueSession qsession;
javax.jms.QueueSender qsender;
javax.jms.Message message;
InitialContext initCtx = new InitialContext();
// obtain db conn object and set it up for transactions
ds = (javax.sql.DataSource)
initCtx.lookup("java:comp/env/jdbc/Database");
dcon = ds.getConnection();
stmt = dcon.createStatement();
// obtain jms conn object and set up session for transactions
qcf = (javax.jms.QueueConnectionFactory)
initCtx.lookup("java:comp/env/jms/qConnFactory");
qcon = qcf.createQueueConnection();
qsession = qcon.createQueueSession(true,0);
q = (javax.jms.Queue)
initCtx.lookup("java:comp/env/jms/jmsQueue");
qsender = qsession.createSender(q);
message = qsession.createTextMessage();
message.setText("some message");
//
// Now do a transaction that involves the two connections.
//
ut = ejbContext.getUserTransaction();
// start the transaction
ut.begin();
// Do database updates and send message. The Container
// automatically enlists dcon and qsession with the
// transaction.
stmt.executeQuery(...);
stmt.executeUpdate(...);
stmt.executeUpdate(...);
qsender.send(message);
// commit the transaction
ut.commit();
// release connections
stmt.close();
qsender.close();
qsession.close();
dcon.close();
qcon.close();
}
...
}
20 years ago
Sure you can. Common use is for example to create AbstractSession with EJB specific code:
public javax.ejb.SessionContext getSessionContext() {
return mySessionCtx;
}
/**
* setSessionContext
*/
public void setSessionContext(javax.ejb.SessionContext ctx) {
mySessionCtx = ctx;
}
/**
* ejbCreate
*/
public void ejbCreate() throws javax.ejb.CreateException {
}
/**
* ejbActivate
*/
public void ejbActivate() {
}
/**
* ejbPassivate
*/
public void ejbPassivate() {
}
/**
* ejbRemove
*/
public void ejbRemove() {
}

and then you implement your own class which extends AbstractSession class.
Answer to second part is that everything is one object. So don't worry about that. But be carefull if you use it in Entity beans.
If your browser is IE it could be IE's bug, you should try to change extension to something like (display.pdf) or (display.html) because it is bug in explorer (it doesn't look to much in headers).
20 years ago
Check out:
http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp
In this PDF you have all details when and why