Anwar Hossain

Ranch Hand
+ Follow
since May 29, 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 Anwar Hossain

I've gone through already but i got invalid command every time i try to compile.

Anyway thnaks for help.

Regards
Anwar
17 years ago
If you are a java programmer you should know how to write a program.
For java engineer you should creat a java product.

Anwar
17 years ago
Dear friends,
can anyone tell me how to compile java files in jsdk1.5.

Thnx
Anwar
17 years ago
Before sitting for the SCJP1.4 exam pls go for the mock exam as much as u can. if your score is above 80 then you're confident enough to pass the exam but if luck favoures u.

On the other hand for better preparation just follow the Kethey Siera and Bate Berts Certifications book very carefully and as soon as u finish it go for the another book of Khalid-a-mughals book.

I think that'll work for u quys.

Regards
Anwar Hossain
SCJP2,MCP
Dear Mohammad,
If you want to override any method from the super class to subclass then it'll look first at the constructor of the super class then it'll execute first,otherwise it'll through a compile time error.

So try to learn it from Khalid-a-Mughals SCJP certification book.okay.

Regards
Anwar Hossain
SCJP2,MCP
Yeah Animesh,

int x=y; not possible because not declared yet
int y=10;

When you create any instance variable it'll automatically initializes but if you don't create first on the heap then it won't compile.So before initilize any variables value with the variable name pls look at the variable declaration first whether it's been declared or not clearly.

I think thats enough for you. If you have any query pls write me at
callanwar@gmail.com

Regards
Anwar Hossain
SCJP2,MCP
setIconImage() is working only for GUI otherthen frame.Can anyone give me the solution?

Anwar
SCJP2,MCP
18 years ago
Dear Evelyn,
I'm interested also. I've already mail to u but haven't got any response from you yet.
Regards,
Anwar Hossain
SCJP2,MCP
Dear all,
Go to www.jdiscuss.com and click on scbcd exam link.
Regards,
Anwar hossain
SCJP2, MCP
Congrates Afsah Shafquat .
It's a great moment 4 u that u passed the exam.

regards,
Md. Anwar Hossain
SCJP2, MCP
20 years ago
Congrates Afsah Shafquat .
It's a great moment 4 u that u passed the exam.

regards,
Md. Anwar Hossain
SCJP2, MCP
Hi All,
Cathe's book will be published within one month.
So u guys will get a nice SCBCD certification book. I hope so. What abt Cathe's comment..?

Regards,
Md. Anwar Hossain
SCJP2, MCP
Hi All,
There is a link for MOC exam and others resources available at : http://www.jdiscuss.com
So Pls visit the site and get more information abt SCBCD exam and others..
Besides, you guys will get a nice Study guide and MOC exam from me very soon..

Regards,
Md. Anwar Hossain
SCJP2, MCP
Hello my friends,
I've done it for my own interest to help the ranchers.
I'll do so both with JBoss and BEA's WebLogics,.

Regards,
Md. Anwar Hossain
SCJP2, MCP
20 years ago
Here are the steps to deploy EJB using BEA/WebLogic Config. for :
==================================================

1.Create a directory where you are going to write all your session beans(Applicable to both Stateless and stateful ).
2.If your session beans are to be in a package then a good option would be to use JCreator for compilation otherwise you have to compile always with the –d option and have to create complicated batch files with classpath settings.
3.For eg. if you have a package statement like -
package examples.SessionBeans;
Then you need to have a directory called examples inside which you need to have a directory called SessionBeans or some Name.
4.Inside the SessionBeans directory put your Home Interface, Remote Interface and Bean classes.
5.Inside the SessionBeans directory create a directory called "META-INF". Note that all the letters should be in capital.
6.In the META-INF directory put your ejb-jar.xml. This you will get along with any sample code.u can search in bea folder also.
7. You need to create another file called weblogic-ejb-jar.xml with the following lines
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>UserSessionBean</ejb-name>
<jndi-name>UserSessionHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
The ejb name that you specify should be same as the one you specify in the ejb-jar.xml. The jndi-name is the one you should use when looking up the home from the JNDI tree.
8. Create a jar file from one level above the package structure where your class files are.
For eg. if your classes are in a package called examples.SessionBeans, the jar file should be created from one directory above the examples directory.
9.Open the jar file in winzip and make sure the directory structure is OK and the XML files are inside the META-INF directory.
10. You now need to do an ejb compilation. Though this is not mandatory it is very useful as it checks your bean’s validity. If your ejbc goes through successfully you can be sure that your bean will be deployed successfully.
The command for ejbc is as follows
java weblogic.ejbc -g -classpath %CLASSPATH% -compiler javac <src-file> <dest-file>
For ease of use, create a batch file called ejbc.bat and put the following lines in it
SET SOURCE_JAR=%1%
SET DEST_JAR=%2%
set classpath=C:\bea\weblogic700\server\lib\weblogic.jar;
java weblogic.ejbc -g -classpath %CLASSPATH% -compiler javac %SOURCE_JAR% %DEST_JAR%
Make sure the classpath is OK.
The bat file can be used as follows
ejbc <Source-bean-jar> <Source-bean-deployable-jar>
For eg.
ejbc UserBean.jar UserBeanDeployable.jar
11. You now have a Enterprise Java bean that is ready to be deployed !!!
12. In Weblogic 7.0 put the jar file created as a result of the ejbc in the following directory
C:\bea\samples\server\config\examples\applications. For Weblogic 6.0 or 6.1 there should be a similar directory called applications where you place your code.
13. Start the Weblogic server. Note that you can put the file here even after you have started the server, any files that are added to this directory are automatically deployed, any that are removed are undeployed and any file whose time stamp changes will be redeployed.
14. If you have a client that you need to run to call the methods of this bean do so with the following class file.
set classpath=.;c:\bea\weblogic700\server\lib\weblogic.jar;
java -Djava.naming.factory.initial=weblogic.jndi.TengahInitialContextFactory -Djava.naming.provider.url=t3://192.10.137.165:7001 <Client-java-class>
You can set the Initial context factory and naming provider url even inside your code if you want but this is a better way. The –D option basically sets a System property.
15.You have now deployed and tested a Session Bean
pls don't do step 10 i mean EJB COmpilation if ur a Beginner.
After ur bean will be Deployed u can check from the Console or the CMD prompt of server where ur Beans name will appear.
That's all..
=================================================
so please let me know about ur comments....
And also my friend's Muhammad Ashikuzzaman's comment.

Regards,
==========================
Md. Anwar Hossain
SCJP2, MCP
20 years ago