Jorge Ribeiro

Ranch Hand
+ Follow
since Oct 18, 2005
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 Jorge Ribeiro

Hi,

As far as I know myfaces is the most respected JSF 1.1 implementation. But things seem to have changed concerning JSF 1.2. Many people seem to be using Mojarra (Sun's reference implementation) instead of myfaces:

- The big application servers (WebLogic, JBoss, GlassFish) come with Mojarra. That is not a surprise in GlassFish, which is from Sun, but the fact that both WebLogic and JBoss use Mojarra for JSF 1.2 seems to indicate that this a high quality implementation.
- Some people say that support for JSF 1.2 come out much earlier in Mojarra than in myfaces, and therefore is more widely tested.

What are your thoughts? Which one would you use and why?

Thanks!
Jorge
12 years ago
JSF
Hi,

We have a Java EE back-end application using EJBs plus DAOs. We are now going to integrate a Java Web Front-End. The front-end will allow the user to query data, providing numerous query criterias- simple comparisons (= ,<, >, >=, =<, !=), intervals (between X and Y), multiple values (in (A, ..., Z)), etc. That means that the queries we use on the DAOs have to be created dynamically, depending on the criterias provided by the user. It goes without saying that a criteria influences the columns we include in the where clause, the operators and potential joins.

Therefore we need to create a framework that allows us to do this. The FE must pass data in a structured way and the BE must be able to process this data and generate the query according to it. A simple implementation would be to have have an interface QueryCriteria with X different implementations (NormalComparision, In, Between, etc). The FE would pass a Map of <Name, QueryCriteria> to the BE. The BE would take a query template (for example using XSLT or Velocity) and would generate the query dynamically.

But I guess that this is a requirement common to many applications so I was wondering if there is any framework that helps with this- an implementation of the classes needed to represent the query criterias, and/or to define query templates and to generate them during runtime using the query criterias. I know that Hibernate provides the Criteria API, but using Hibernate is not an option for us. Any advice on best practices for this kind of problems is also very welcome.

Many thanks!
Jorge
Hello,

I have a question that seems very basic but I honestly cannot find an answer for it. From what I read in the WebLogic 10.x documentation, my understanding is that if I create EJB3 session bean and I define a local interface, there will be no global JNDI name for the local interface, that is, I can only obtain a instance of my EJB using its local view by injection, using @EJB.
My problem is that I can think of some scenarios where I need to obtain a reference to the local view of the EJB using a JNDI lookup. For example:

* If I have a Web front-end and if I want to use a Business Delegate. I know that many of you will say that I can reference the EJBs directly from my Servlets/JSPs/JSF and I do not need delegates anymore but lets assume that I prefer a more formal approach where I have a simple class that makes the bridge between the front-end and the back-end, decoupling FE and BE. I cannot make use of the @EJB annotation in this simple class so I need to lookup the EJB using JNDI. How do I do it?


* If my application defines a ApplicationLifecycleListener class to manage the application's life cycle. Lets assume that during the postStart I want to access an EJB and invoke a method. Again, I believe that the use of @EJB annotation in these classes does not lead to a real injection. Therefore I need to lookup the EJB from the JNDI. How do I do it?


I am quite confident I must be missing something. This is very simple to do in JBoss and I am sure WebLogic provides similar features. Can anyone help me with this?

Thanks!
Jorge
12 years ago
Hi,

In WebLogic 9, whenever using the console I can browse at the deployments and select an EJB. There I have a "Testing" option, which I can use if I define test points. How do I define test points on my EJBs?

Thanks!
JR
14 years ago
Bingo! Indeed our license specifies "cpus=1". But I am having some problems in convincing some people that this is the reason of the problem. It seems that at certain periods WebLogic was able to use the 4 processors. Does this lincense restriction really makes WebLogic to use only one cpu?
14 years ago
Hi,

We're having a strange problem- we are running WebLogic 9.1 on a Unix box with 4 processors. Strangely enough, we see that WebLogic only uses one processor, leaving the other three quiet. Sometimes it takes almost 100% of the processor (it is impossible to login on the console). Is there something we should change in the WebLogic configuration or it is up to the Unix configuration?

Thanks!
14 years ago
Something strange with your scenario- if the messages are persistent then they must survive an application server restart. What application server are you using? And which JMS Provider- the one coming with the App Server or something else like MQSeries or Oracle Streams?
It seems to me that this violates the spec. I would recommend to replace the use of the sleep with the new Timer Service- create a timer that will be triggered in X seconds (where X is your sleep time) and the timer will invoker your method
Hi!

I have a question regarding the J2EE 1.4 TimerService within clusters. Let�s assume I have a cluster with N servers and I create a timer on server X. Is this timer visible to all servers in the cluster of just in server X, that is, if I use the getTimers() method to get all the existent timers will the result be the same in every server of the cluster?

Thanks
JR
I guess the origin of the problem is quite clear- java.lang.OutOfMemoryError- as the solution- increasing the maximum memory that can be alocated to your JVM.
15 years ago
It will be faster as it does not write the messages to the log files. Still, the problem I was describing will not go away. What's the value of the batch size property of your channels?
I think this is not an issue related with WebSphere, JMS or MDBs, but with MQSeries itself. Have you tried to tune it? MQSeries is a very powerful tool that has many peculiarities. With this kind of volume of messages is very likely that MQSeries is trying to optimize the process- instead of sending messages one by one, MQSeries processes a bacth of messages at each time. This way the overhead with communication and persistence (and don't forget that messages have to be written to the log files) is minimized. But you might have side effects as the one you're describing. There is a parameter that defines this value, but whose name I don't recall. Let's say that MQSeries processes batches of 5000 messages. That means that a QManager X won't send any message to QManager Y while it doesn't have a set of 5000 messages targeted to Y. This causes a very strange behaviour in the application- long periods of inactivity, long waiting times, and short periods of very high activity.
It seems that you're using the same JNDI name for looking up the local and remote homes. Could it be that you're looking up the remote home and then you're trying to cast it to a local home?
If bean A calls a class X with a certain transactional context, and then class X invokes bean B, does B gets the transactional context from A?

Regards
Pjrm
Although is not a good practise, you should be able to play with the content of the binding files. The binding files are just the application server specific deployment descriptors. Unlike most of the other application servers, it seems that the guys from WebSphere like to keep some secret about the format of these files. Probably to assure that their development tools have an advantage in terms of WebSphere integration. Still, if you look carefully in your WebSphere installation you'll be able to find the XSDs for those files. That's a great help.

Pjrm
15 years ago