Yan Zhou

Ranch Hand
+ Follow
since Sep 02, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Yan Zhou

Hi there,

I built a simple Spring MVC app. and deployed to Weblogic 12c. In WL Console, I can see debug level Spring framework messages, but cannot see debug level application messages. I can see error level application messages, though.

I have configured WL12C to redirect stdout to log, set all log level to DEBUG, still no debug level application messages.

Why cannot I see debug level application messages? I am using JDK logging in WL, I do not think that matters. Here is my log4j.properties, it is packaged in my application war.

Thanks,
Yan

WEB-INF/classes/log4j.properties

log4j.rootLogger=DEBUG, STDOUT

log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.STDOUT.threshold=DEBUG

log4j.logger.org.springframework=DEBUG
log4j.logger.com.medplus=DEBUG // this is my application package, no DEBUG seen in console output
10 years ago
Very clear explanation, thanks so much. Now everything is making sense to me.

Yan
Thanks, but that does not show any difference between the owning side vs. non-owning side. Say, if I define Parent being the owning side vs. Child being the owning side of relationship, would the exact same code work with no change? If it does, then there is no difference who is the owning side; If it does have a difference, what is it?

Yan
Well, I think I tried but do not remember the outcome.

Assume that works. Then, what is the difference between who is the owning side or not? If either side can cascade any persisit() down to the children, does it even matter who owns the relationship? And why would we care who owns the relationship?

Yan
Hi there,

This really confuses me. I am using JPA 1.0, Weblogic 10.3.1.

Say, Parent class has one-to-many relationship with Child class. It is usually set up as Child (owning side) has ManyToOne relationship with Parent.

However, in run-time, we save the Parent and expect all (newly created) children get saved along with it. This is not happening. Is that because Parent is not the owning side? So, I have to save each child and then the parent?

Further, I now use @PrivateOwned (since we are using EclipseLink), now the children are all saved even though Parent is not the owning side. Is @PrivateOwned doing a magic here?

Any clarifications will be greatly appreciated.

Thanks,
yan
I am configuring my Spring app to use Tomcat (Spring tc server), I am getting this error when tc Server 6.0.20 starts up with my app. deployed.

Caused by: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

I have used the following server.xml with datasource configured.

<GlobalNamingResources>
<Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver" maxActive="10" name="jdbc/MyDataSource" password="password" type="javax.sql.DataSource" url="....." username="yan"/>
</GlobalNamingResources>

This is my Spring config XML

<jee:jndi-lookup id="datasource" jndi-name="jdbc/MyDataSource" resource-ref="true"/>

I do not think I missed anything, but cannot seem to get database connection to work.

Thanks,
Yan
14 years ago
Hi there,

I am working in a place that outgoing traffic must go through a HTTP PROXY server.

I am building a WAR that uses XML configuration, which references XSD file, see below. As the app. is deployed to Tomcat, I suppose tomcat will make outbound request to download the XSD to validate my XML. But I cannot figure out how to configure TOMCAT to be aware of proxy.

There are documents about configuring PROXY in TOMCAT, but that is for reverser proxy (incoming traffic), which is different from what I need here.

Basically, how does Tomcat get the XSD in a proxy environment?

Thanks,
Yan

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
14 years ago
Hi there,

I setup in Weblogic server, a foreign JMS queue point to a queue in MQ Series. My message driven bean in Weblogic will process messages from MQ Series.

I wish to implement delivery delay and redelivery delay but cannot seem to find a way to do that.
1) when a messages arrives at a queue, wait for X seconds before my message driven bean gets notified
2) when a message is rolled back to a queue, wait for X seconds before my message driven bean reprocess it.

In Weblogic, you can configure that in ConnectionFactory, but it no longer has that if it is a foreign JMS like MQ.

My question is, how would someone do that?
Thanks,
Yan
15 years ago
I thought all I need to do for EJB3.0 is to use the standard Java compiler to compile it and deploy it.

There is no change in descriptor file because it is optional to EJB3.0. I am not converting existing EJB2.0 to EJB3.0, what I hope to do is to have existing EJB2.0 continue working as it, and add EJB3.0. What would be the process for that?
15 years ago
Hi there,

I have existing EAR that is EJB 2.0. I create an EJB 3.0 session bean, with existing 2.0 EJBs.

After I deploy the EAR, the WL console does not show the new EJB 3.0, it shows all existing EJB 2.0.

Is there anything special I need to do to get WL deploy EJB 3.0? Would the presence of ejb-jar.xml on existing EJB 2.0 cause WL to ignore new EJB 3.0 beans?

Thanks,
Yan
15 years ago
Hi,

The use case seem to not take into consideration of the travel agents, they are using Swing application GUI, so the following in all use case text do not apply:

All interaction with the customer and the system must be secured with SSL.

This only applies to customer with Internet access. I wonder how do you assume the way agents access the system, through RMI? Assuming they are already behind the firewall, etc.?

Thanks,
Yan
Hi there,

SLSB: we need to pass around all the info. about the itinerary back and forth for some of calls. For example, user selects seats and confirms seats are two separate calls, both need itinerary info.

considering the data contained in itinerary (flight specification, seat numbers, etc.), I do not think that is a lot of data.

SFSB: we need to pass around the EJB handle, but this concerns us with scalability. This stores sessions in app. server. But, Rod Johnson did say that, if we have two web servers and only one app. server, we should store sessions in the web server.

Database session: we could store itinerary into database, and return to client a key to the itinerary. Future calls will pass around internal ID, thus no need for SFSB, a SLSB would work. Some discourages this because we are passing around an internal ID but I do not find it troubling me. After all, we are passing around EJB handle with SFSB.

So, it seems that either one of the three would work. I do not know if I missed anything.

Thanks,
Yan
Hi there,

[Andrew - removed - see below]

Did I miss something or is this use case simple?
Thanks,
Yan
[ October 05, 2007: Message edited by: Andrew Monkhouse ]
Hi there,

Do you feel the need to allow customers select seat for each segment?

What if Window seats are available for some flights but not all in the Itinerary? Should not customer be allowed to select Window seats (which he prefers) on some flights and Aisle seats on the others?

The requirement that the system will return seat numbers is a little strange because I have not seen an airline system assign seats at reservation time, they usually done that at check-in time, on a 1st come 1st serve basis. Any one feels the same as I do?

Thanks,
Yan
Hi there,

How detailed the sequence diagram should be? I excluded much of the UI details, common EJB stuff (like look up EJB home via JNDI), exception handling is excluded as well. But the diagram is so big that I feel the need to break it into three smaller diagrams to make it easier to read.

I do not think we can just assume that something will happen magically behind EJB without any concrete explanation of how to achieve it.

How is every one else's experience on this?

Thanks,
Yan