Win a copy of Spring Boot in Practice this week in the Spring forum!

Claudio Gualberto

Ranch Hand
+ Follow
since Oct 13, 2002
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 Claudio Gualberto

Hi folks,

I have some business components as Stateful Session Beans and i expose them via local interfaces only.
Now i need acess them in a remote Swing client application, but i whould not like go throught remote interfaces/RMI because of firewall issues.
I know that JBoss provides a way to do it via HTTP/RMI using HttpInvoker, but i tried to find some info about it in JBoss docs but i did not foud anything that could help me ( google did not help too ).
Where can i find some examples of how to configure the container, deploy my beans and use it over RMI/HTTP with a remote Swing application ?

Any kind of help is valuable.

Claudio Gualberto
17 years ago
Could you post your JInternalFrame construction code ?
18 years ago
I dont know if i'm included in the 'pros', but i implement my listeners as
inner classes, not annonymous or static, simple ones.
Coding like this you can separate the listeners methods by subject ,and your code dont get mess.
For buttons or menus you can consider use an Action implementation always you can.
Cl�udio Gualberto
SCJP 1.4
18 years ago
If you are running a 3.2.x JBoss you better download PDF with the steps to configure an JCA adaptor to use with Oracle. Its very easy.
http://prdownloads.sourceforge.net/jboss/JCAConfig322.pdf?download
18 years ago
Thanks for your reply, i think you're right.
I will try this and post the result here.
Thanks again.
Claudio Gualberto.
SCJP 1.4
18 years ago
Hi all,
I have the following situation :
Machine 'A' with JBoss where i deployed an Web application with some JSP and Servlets ( a tipical Struts application ).
Machine 'B' with JBoss ( the same network ) where i deployed an EJB module with some Session Beans ( stateless/stateful ) and some Entity Beans.
The Struts application is client of the EJB's on Machine 'B', and it uses a ServiceLocator, where i get an InitialContext using the constructor version that receives no parameters.
InitialContext ctx = new InitialContext();

Thus, the JBoss constructs the InitialContext using the parameters into the file %JBOSS_HOME%/server/default/conf/jndi.properties , so far so good.
The problem is that, if i edit this file to point to the machine 'B' where my EJBs are deployed, and later restart the server on machine 'A' to the changes take efect, the JBoss just can't start, throwing a lot of "Object already bound exceptions".
Thats my jndi.properties file :
---------------------------------------------------------------------
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming rg.jnp.interfaces
# Do NOT uncomment this line as it causes in VM calls to go over
# RMI!
java.naming.provider.url=jnp://machinebhost:1099
---------------------------------------------------------------------
What is my mistakes ? How to active this on JBoss, one machine with JBoss serving as an Web Server and other machine with JBoss too, serving as an EJB Container.
Thanks for any help.
Claudio Gualberto
SCJP 1.4
18 years ago
I think you're better to post the BMP code here, as your container-configuration if it's not the default for BMP.

Claudio Gualberto
SCJP 1.4
18 years ago
When we are talking about Java Servlets, Web Server is the Servlet/JSP Container, just like Tomcat , Jetty and so on.
Application Server generally is both Servlet/JSP and EJB Container, just like BEA Weblogic, IBM Websphere, and so on.
There is no phisical separation from Web server and EJB Server on the mostly used servers. Some like JBoss, comes with Web Container embebeded, others no, but you must not to worry about it.
In summary, Tomcat can hold only JSP/Servlet, so it is a Web Server ( Web Container ) , Bea Weblogic can hold both JSP/Servlet and EJB, so it is a Web/Ejb Container or an Application Server.
Claudio Gualberto
SCJP 1.4
18 years ago
The tag <ejb-link> when specified, must point to your bean name, the same specified at you bean name tag at ejb-jar.jar.
Claudio Gualberto
SCJP 1.4
Ejb Containers treats two types of exceptions, the system exceptions and the application exception.
When you throw an system exception, the container takes some precautions like take the EJB reference off cache ( in case of Entity Bean ) , invalidate the proxy EJB and so on.
You can test this feature, changing the type of the exception you�re throwing. Subclass the java.lang.Exception to a AplicationException and throw it on your remote metodos instead of RemoteException when applications erros ocurs, let�s see what happen.
Claudio Gualberto
SCJP 1.4
I�m already using XDocLet with BMP, i�m gonna read it�s docs for CMP tags and the JBoss DTD�s for more info. Thanks a lot for the help.
Claudio Gualberto.
19 years ago
Hi all,
This is a very beginner question, but i never used CMP before, only BMP.
So the question is :
How can i tell the container wich table my EJB CMP represents ?
How can i teel the contaiNer wich DataSource to use ?
The question about DataSource is why with BMP we define a service on JBoss, just like the oracle-service.xml that comes with the JBoss examples, then inside the code, we just lookup the DataSource by its JNDI name.
But on every example i ever seen about CMP ,i never saw something about how the container will find the data base, URL used to connect to the data base and so on.
Take this as example :
I have a table called TGFPAR, and i have a CMP called Customers that represents this table.
Where on ejb-jar or JBoss.xml or JAWS.xml should i map it ?
Thanks in advance.
Claudio Gualberto
SCJP 1.4
19 years ago
Hi,
I have no answer to your question, but i have tried JBoss-Ide before and i got frustred. Now i use the Lomboz plug-in to develope and deploy my EJB in JBoss, and it's really great !
Try it,
www.objectlearn.com
There is also another new plug-in for JBoss/J2EE , it's called MyEclipse
and seems to be good, i did not try it yet, but :
www.myeclipseide.com
Claudio Gualberto
SCJP 1.4
19 years ago
It�s up to your web server machine, but i think that you will have better performance ( mainly if you dont use many local interfaces to connect to yours EJB from yours Servlets/JSP )
The only change to performe is to change the JNDI url provider on your code.
Claudio Gualberto
SCJP 1.4
19 years ago
Hi,
I have some Entity Beans with bean managed persistence, and i�m having some problemns about
the JBoss instance caching.
Once the server call the ejbLoad to an instance, and some external application updates the mapping row, the next call to some business methods brings the old datas.
How to configure JBoss to in some cases calls ejbLoad every time an method is called ( or some transaction is initialized ) and for other EJBs call it just once.
I did not make any extra configuration on JBoss till now ( i�m using JBoss 3.0.7 )
Any help is apreciated.
Claudio Gualberto.
SCJP 1.4
19 years ago